From ef5543b6c04bb819631cc170e3588dee3ef8160f Mon Sep 17 00:00:00 2001 From: Avery Black Date: Sat, 25 Apr 2020 18:00:52 -0700 Subject: [PATCH 1/2] Combine pages --- Desktops/desktop-ec.md | 2 + Laptops/laptop-ec.md | 2 + README.md | 6 +- SUMMARY.md | 3 +- Universal/desktop-ec.md | 157 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 165 insertions(+), 5 deletions(-) create mode 100644 Universal/desktop-ec.md diff --git a/Desktops/desktop-ec.md b/Desktops/desktop-ec.md index f5f4ba4..38425fc 100644 --- a/Desktops/desktop-ec.md +++ b/Desktops/desktop-ec.md @@ -1,6 +1,8 @@ # Fixing Embedded Controller (Desktop) +## You'll want to go to [SSDT-EC under the Universal tab](/Universal/desktop-ec.md) for the new SSDT-EC page. + What we'll be doing is hiding our actual EC and creating a fake Embedded Comtroller for macOS to play with. To find out what EC you have, open your decompiled DSDT and search for `PNP0C09`. This should give you a result like this: diff --git a/Laptops/laptop-ec.md b/Laptops/laptop-ec.md index 26b3a6a..e11d979 100644 --- a/Laptops/laptop-ec.md +++ b/Laptops/laptop-ec.md @@ -1,5 +1,7 @@ # Fixing Embedded Controller (Laptop) +## You'll want to go to [SSDT-EC under the Universal tab](/Universal/desktop-ec.md) for the new SSDT-EC page. + To fix the ECs found in laptops, we'll be renaming them to look like the ones macOS expects. The reason for this is that many laptops break when you turn off their EC with an SSDT. So this is why we can't use the fancy SSDTTime to make a patch for us. To find out what EC you have, open your decompiled DSDT and search for `PNP0C09`. This should give you a result like this: diff --git a/README.md b/README.md index 6f06dd9..9fc21a9 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ You can read more about ACPI and it's spec here: [ACPI 6.3 Manual](https://uefi. macOS can be very picky about the devices present in the DSDT and so our job is to correct it. The main devices that need to be corrected for macOS to work properly: * Embedded controllers(EC) - * All semi-modern intel machines have an EC exposed in their DSDT, with many AMD systems also having it exposed. These controllers are not compatible with macOS so then need to be hidden from macOS and replaced with a dummy EC when running macOS Catalina. - * With laptops, we still need these ECs so we rename them into what macOS would expect ECs to look like + * All semi-modern intel machines have an EC (usually called H\_EC, ECDV, EC0, etc...) exposed in their DSDT, with many AMD systems also having it exposed. These controllers are generally not compatible with macOS and can cause panics, so then need to be hidden from macOS. macOS Catalina requires a device named `EC` to be present though, so a dummy EC is created. + * With laptops, the actual embedded controller still needs to be enabled for battery and hotkeys to work, and renaming the EC can additionally cause issues with windows, so creating a fake EC without disabling the real embedded controller is preferable to renaming. * Plugin type * This allows the use of XCPM providing native CPU power management on **Intel** Haswell and newer CPUs, the SSDT will connect to the first thread of the CPU. Not meant for AMD * AWAC system clock. @@ -58,7 +58,7 @@ Please see the **specific ACPI section of your config.plist**, all SSDTs needed | SSDT | IvyBridge | Haswell | Broadwell | Skylake | KabyLake | CoffeeLake(8thGen) | Coffee/Comet/IceLake(9/10thGen) | | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | **CPU** | [CPU-PM](https://github.com/Piker-Alpha/ssdtPRGen.sh)(Run in Post-Install) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | [SSDT-PLUG](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PLUG.dsl) | -| **EC** | [EC ACPI Patch](/Laptops/laptop-ec.md) | [EC ACPI Patch](/Laptops/laptop-ec.md) | [EC ACPI Patch](/Laptops/laptop-ec.md) | [EC ACPI Patch](/Laptops/laptop-ec.md) + [SSDT-USBX](https://github.com/khronokernel/USB-Map-Guide/blob/master/extra-files/SSDT-USBX.aml) | [EC ACPI Patch](/Laptops/laptop-ec.md) + [SSDT-USBX](https://github.com/khronokernel/USB-Map-Guide/blob/master/extra-files/SSDT-USBX.aml) | [EC ACPI Patch](/Laptops/laptop-ec.md) + [SSDT-USBX](https://github.com/khronokernel/USB-Map-Guide/blob/master/extra-files/SSDT-USBX.aml) | [EC ACPI Patch](/Laptops/laptop-ec.md) + [SSDT-USBX](https://github.com/khronokernel/USB-Map-Guide/blob/master/extra-files/SSDT-USBX.aml) | +| **EC** | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) | [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) | | **Backlight** | [SSDT-PNLF](https://github.com/acidanthera/WhateverGreen/blob/master/Manual/SSDT-PNLF.dsl) | [SSDT-PNLF](https://github.com/acidanthera/WhateverGreen/blob/master/Manual/SSDT-PNLF.dsl) | [SSDT-PNLF](https://github.com/acidanthera/WhateverGreen/blob/master/Manual/SSDT-PNLF.dsl) | [SSDT-PNLF](https://github.com/acidanthera/WhateverGreen/blob/master/Manual/SSDT-PNLF.dsl) | [SSDT-PNLF](https://github.com/acidanthera/WhateverGreen/blob/master/Manual/SSDT-PNLF.dsl) | [SSDT-PNLF-CFL](https://i.applelife.ru/2019/12/463488_SSDT-PNLFCFL.aml.zip) | [SSDT-PNLF-CFL](https://i.applelife.ru/2019/12/463488_SSDT-PNLFCFL.aml.zip) | | **I2C TrackPad** | [SSDT-GPI0](https://github.com/hackintosh-guides/vanilla-laptop-guide/tree/master/Misc-files/SSDT-GPIO.aml) | [SSDT-GPI0](https://github.com/hackintosh-guides/vanilla-laptop-guide/tree/master/Misc-files/SSDT-GPIO.aml) | [SSDT-GPI0](https://github.com/hackintosh-guides/vanilla-laptop-guide/tree/master/Misc-files/SSDT-GPIO.aml) | [SSDT-GPI0](https://github.com/hackintosh-guides/vanilla-laptop-guide/tree/master/Misc-files/SSDT-GPIO.aml) | [SSDT-GPI0](https://github.com/hackintosh-guides/vanilla-laptop-guide/tree/master/Misc-files/SSDT-GPIO.aml) | [SSDT-GPI0](https://github.com/hackintosh-guides/vanilla-laptop-guide/tree/master/Misc-files/SSDT-GPIO.aml) | [SSDT-GPI0](https://github.com/hackintosh-guides/vanilla-laptop-guide/tree/master/Misc-files/SSDT-GPIO.aml) | | **AWAC** | N/A | N/A | N/A | N/A | N/A | N/A | [SSDT-AWAC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-AWAC.dsl) | diff --git a/SUMMARY.md b/SUMMARY.md index e0c5a54..78fda2f 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -10,18 +10,17 @@ ## Desktop -* [Embedded Controllers](/Desktops/desktop-ec.md) * [Disabling desktop dGPUs](/Desktops/desktop-disable.md) ## Laptop -* [Embedded Controllers](/Laptops/laptop-ec.md) * [Backlight PNLF](/Laptops/backlight.md) * [Trackpad GPI0](/Laptops/trackpad.md) * [Disabling laptop dGPUs](/Laptops/laptop-disable.md) ## Universal +* [Embedded Controller](/Universal/desktop-ec.md) * [Plugin type](/Universal/plug.md) * [AWAC vs RTC](/Universal/awac.md) * [NVRAM PMC](/Universal/nvram.md) diff --git a/Universal/desktop-ec.md b/Universal/desktop-ec.md new file mode 100644 index 0000000..37fd007 --- /dev/null +++ b/Universal/desktop-ec.md @@ -0,0 +1,157 @@ + +# Fixing Embedded Controller + +What we'll be doing is creating a fake Embedded Controller (EC) to satisfy macOS Catalina's EC addiction, and disabling the EC on desktops to prevent panics and crashes. + +You'll want to begin by grabbing either one of these uncompiled SSDT files: + +* [SSDT-EC-USBX](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC-USBX.dsl) + * For Skylake and newer and all AMD systems +* [SSDT-EC](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EC.dsl) + * For Broadwell and older + +### Fixing the Path + +For Intel systems, the path is *likely* correct, though it's worth double checking. You will want to find your current EC by opening your decompiled DSDT and searching for `PNP0C09`. You should get a result similar to this: + +![](/images/Desktops/pnp.png) + +> Note: If your EC device happens to already be named `EC` in your DSDT, you do not need SSDT-EC at all and can move on. + +As you can see, `PNP0C09` is found under the `EC0` device and `_SB.PC00.LPC0` scope. Looking at the SSDT though, this differs from the path `_SB_.PCI0.LPCB` seen within. This will need to be corrected in the SSDT to match what is found in the DSDT. Using the above image, you should get something similar to this: + +```text +Scope (\_SB.PC00.LPC0) <- Rename this +{ + Device (EC) <- DO NOT RENAME THIS + { + Name (_HID, "ACID0001") // _HID: Hardware ID + Method (_STA, 0, NotSerialized) // _STA: Status + { + If (_OSI ("Darwin")) + { + Return (0x0F) // Enable our Fake EC only when in macOS + } + Else + { + Return (Zero) + } + } + } +} +``` + +Generally, `PC00.LPC0` is most common on Intel HEDT while `PCI0.SBRG` is most common on AMD. **Always verify your path and device. DO NOT ASSUME**. +If you are having issues finding the Scope, you can use the below Hardware IDs or Addresses: + +* Finding the LowPinCount path: + * Intel: Search `Name (_ADR, 0x001F0000)` + * AMD: Search `Name (_ADR, 0x00140003)` +* Finding the PCI path: + * Intel: Search `PNP0A08` (If multiple show up, use the first one) + * AMD: Assume `PCI0`(most AMD DSDTs don't declare the PCI path directly) + +**Make sure that you do not rename `Device (EC)`. This is what macOS Catalina looks for to boot!** + +**Desktop users, continue down below to disabling your actual EC** + +### Disabling real EC (Desktops only) + +For desktops, it's preferable to disable the actual Embedded Controller as it is not supported by macOS 100% and is known to sometimes cause panics. If we use the screenshot above, we'll see that the device name is `EC0`. Other common names for ECs are `H_EC`, `ECDV`, and `EC0`. You'll want to grab your SSDT again and uncomment the `_STA` method to disable it (remove the `/*` and `*/` around it): + +```text +/* <- REMOVE THIS +External (_SB_.PCI0.LPCB.EC0, DeviceObj) <- Rename this + + Scope (\_SB.PCI0.LPCB.EC0) <- Rename this + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + If (_OSI ("Darwin")) // Darwin = macOS + { + Return (0) // Hides our real EC only when in macOS + } + Else + { + Return (0x0F) + } + } +} +*/ <- REMOVE THIS +``` + +Like above, make sure the path is correct for the External and Scope field. + +### What happens if device in the DSDT is already named `EC` + +For laptops, you don't need SSDT-EC at all. + +### What happens if multiple `PNP0C09` show up + +When this happens you need to figure out which is the main and which is not, it's fairly easy to figure out. Check each controller for the following properties: + +* `_HID` (Hardware ID) +* `_CRS` (Current Resource Settings) +* `_GPE` (General Purpose Events) + +Note if you have an STA Method as well, see below: [STA Edge Case](/Desktops/desktop-ec.md#sta-edge-case) + +### What happens if no `PNP0C09` show up? + +This means you only need to fake an Embedded Controller rather so that AppleBusPowerController will load and handle USB power properly and continue booting. To make the actual SSDT, its *almost* plug and play as no uncommenting needed. The main thing that needs to be changed: + +* LowPinCount path +* PCI path + +We want to make sure the SSDT hooks into our DSDT correctly so we need to make sure the ACPI path is correct: + +* Finding the LowPinCount path: + * Intel: Search `Name (_ADR, 0x001F0000)` + * AMD: Search `Name (_ADR, 0x00140003)` +* Finding the PCI path: + * Intel: Search `PNP0A08` (If multiple show up, use the first one) + * AMD: Assume `PCI0`(most AMD DSDTs don't declare the PCI path directly) + +![](/images/Desktops/lpc.png) + +Once you find out, change `PCI0.LPCB` to your correct path: + +```text +Scope (\_SB.PC00.LPC0) <- Rename this +{ + Device (EC) <- DO NOT RENAME THIS + { + Name (_HID, "ACID0001") // _HID: Hardware ID + Method (_STA, 0, NotSerialized) // _STA: Status + { + If (_OSI ("Darwin")) + { + Return (0x0F) // Enable our Fake EC only when in macOS + } + Else + { + Return (Zero) + } + } + } +} +``` + +![](/images/Desktops/ec.png) + +For those having issues, you can also check `Device Manager -> CPU -> BIOS device Name`. Windows will only report the main EC so will save you some headache on that + +### STA Edge Case + +![Credit to rottenpants466](/images/Desktops/sta.png) + +Do note that if your PNP0C09 device has a `Method (_STA` already you can skip down to "What happens if no `PNP0C09` show up?". +The reason for this is that the real EC is considered disabled already. + +### Correcting USB Power + +> Hey what about USBX? Do I need to do anything? + +USBX is universal across all systems, it just creates a USBX device that forces USB power properties. This is crucial for fixing Mics, DACs, Webcams, Bluetooth Dongles and other high power draw devices. This is not mandatory to boot but should be added in post-install if not before. Note that it requires the EC functioning correctly and that USBX is only used on skylake+ systems - those on Broadwell and older can ignore. + +## [Now you're ready to compile the SSDT!](/Manual/compile.md) From e424ca008cb5bd6d1b2a4a004de56241049d6924 Mon Sep 17 00:00:00 2001 From: Avery Black Date: Sat, 25 Apr 2020 18:27:11 -0700 Subject: [PATCH 2/2] Fix ec page name --- SUMMARY.md | 2 +- Universal/{desktop-ec.md => ec-fix.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename Universal/{desktop-ec.md => ec-fix.md} (100%) diff --git a/SUMMARY.md b/SUMMARY.md index 78fda2f..33b43c0 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -20,7 +20,7 @@ ## Universal -* [Embedded Controller](/Universal/desktop-ec.md) +* [Embedded Controller](/Universal/ec-fix.md) * [Plugin type](/Universal/plug.md) * [AWAC vs RTC](/Universal/awac.md) * [NVRAM PMC](/Universal/nvram.md) diff --git a/Universal/desktop-ec.md b/Universal/ec-fix.md similarity index 100% rename from Universal/desktop-ec.md rename to Universal/ec-fix.md