- Joined
- Sep 3, 2010
- Messages
- 50
- Motherboard
- ASUS K501UQ
- CPU
- i3-6100U
- Graphics
- HD 520
Intro
Current version: Catalina 10.15.4 — OpenCore 0.5.8
Overall status — stable, 99+%. Issues: none known.
Thanks to
Hardware overview
CPU
i3 6100U (or other) Skylake. Power management enabled through SSDT-PLUG, or SSDT-data from CPUFriend. Also, if you haven't yet switched CFG Lock, enable corresponding kernel quirks.
GPU
Intel HD 520. Use Lilu/WhateverGreen, inject device properties in Clover.
NVidia 940MX. Since it's Optimus, it has to be disabled. See Graphics below.
Display
AUO B156HTN03.8 panel. (Pretty shitty, I recommend replacing with something better)
Backlight by WhateverGreen and SSDT-PNLF.
Note: I'm having some PWM issues with replacement panel – at low brightness display backlight flicker until laptop is put to sleep at least once. Seems to be some bug in ACPI initialization with replacement panels.
Battery
SMCBatteryManager + ASUS N55SL/Vivobook DSDT patch from RehabMan's repo.
Ethernet
RealtekRTL8111.
WiFi
Intel 7265NGW or similar. M.2 2230. Not supported, replace. Look for compatible models.
I've got Broadcom BCM943602BAED, and I assume you have Broadcom combo card, too. Note that laptop has two antennas - if card has three, you need to plug in a short internal antenna (there's enough free space) or some dummy load, do not leave connector unplugged. Use Lilu/AirportBrcmFixup for masking it as Apple and some optimization.
Bluetooth
Surprisingly, BT part of the original Intel card works OOB. Can be used for temporary internet connection using phone as BT modem.
Broadcom BT requires BrcmPatchRAM. Note: I had some intermittent KPs likely related to Bluetooth (IOUSBHostFamily.kext, Wake transition timed out...). As per the manual, this is fixed with bpr_initialdelay=400 bpr_postresetdelay=400 in boot args.
USB
USB2.0 ports work OOB. Requires either USBInjectAll with corresponding SSDT or (better) custom USBMap kext. See USB port loadout below.
Audio
Conexant CS20751/2. Use Lilu/AppleALC, layout 21 (other layouts do not have working microphone jack).
Intel HDMI. In addition requires connector-id patch. See Audio and HDMI below.
Keyboard
VoodooPS2Controller for keyboard.
AsusSMC for Fn shortcuts and keyboard backlight. See Fn keys below.
Touchpad
ELAN 1000, I2C, so VoodooI2C/VoodooI2CELAN. Requires DSDT patches. See Touchpad below.
Peripherals
Camera – USB2.0 VGA UVC WebCam, works OOB.
SD card reader – USB2.0, works OOB.
BIOS settings
Disable CSM, Secure boot, fast boot, VT-d. Set SATA to AHCI. Set DVTM to 128 Mb. Disable CFG Lock. If you intend to dual boot Windows, you may leave VT-d enabled and enable DisableIOMapper quirk instead.
EFI drivers and tools
You need:
DSDT
Using patched DSDT is not recommended nowadays, especially since OpenCore would apply it to all OSes, and will not be supported by this guide. Fortunately, this laptop's ACPI is mostly without errors, so we can utilise hotpatching. Still, laptop ACPI requires quite extensive modifications, moving them to SSDTs requires some experience, and you'll probably have to check and remake some patches against your DSDT.
First, disassembly. Read the guide on patching DSDT here. Carefully and several times. You might use Rehabman's builds, or get newer: Acidanthera's MaciASL supports correct disassembling of all tables at once – go to settings/iASL and tick "Autoload tables in same directory". Also add
Second, fixing errors that prevent recompiling:
Otherwise, fixes are:
A final note on replacing DSDT — unlike Clover, OpenCore doesn't support patching files after replacing it, so if you're using any rename patches (like _OSI→XOSI rename), you have to apply renames to files manually. And, of course, if you're replacing tables, you should add originals to ACPI→Block list in OC config.
You should have a solid understanding of static ACPI patching before attempting hotpatching. The idea is to move all modifications to SSDTs and then patch ACPI to rename modified methods and correct errors. This way we do not replace DSDT and have (hopefully) universal solution that would work when DSDT would change. See this guide on hotpatching for more details.
Often we don't need to copy complete replaced method — we can call renamed original from replacement wrapper. This way has better readability, is less error-prone and requires way less External declarations. For example:
Word of caution — patches still might not work with different UEFI versions and motherboard revisions. At the very least make sure that patches work as intended — load original DSDT.aml in binary editor and check that certain patch strings can be found exactly once.
Custom SSDTs
This also lists all required patches in config. Unless specified otherwise, they apply to DSDT and have only one occurrence. For details see comments in provided *.dsl files.
SSDT-EC
Fake EC device and USB power injection.
Do not disable original _SB.PCI0.LPCB.EC0 device in macOS — Fn keys and battery wouldn't work.
SSDT-PNLF
Backlight device, requires WhateverGreen, get it here, and change in it _CID to "backlight".
SSDT-HPET
IRQ conflict fix. A minor incompatibility with RTC and TIMR devices being assigned IRQ that might conflict with something else. May be unnecessary. Use SSDTTime to generate SSDT and corresponding patches for your system.
Patches:
Fake SMBUS and MCHC devices. Probably unnecessary in recent macOS.
SSDT-data
PluginType=1 and CPU frequency data generated by CPUFriendFriend script. You should generate one manually for your CPU. Refer to script's manual.
You can also use SSDT-PLUG with only PluginType=1.
SSDT-XOSI
Replacement for _OSI to access some OS-dependent functionality.
Some functionality gets enabled only for certain Windows versions (most notably, some I2C stuff might require Windows 7+). When OS boots, it sets some internal variable accessed by a built-in _OSI method. We replace all calls to it with our custom XOSI method.
Patches:
AsusSMC additions — keyboard backlight and Fn keys. Refer to Fn keys.
Recheck what EC register is accessed in original keyboard backlight method SLKB in DSDT. It should look like _SB.PCI0.LPCB.EC0.WRAM (0xXXXX, Local0). Custom SKBV method should access the same register.
Patches:
Replacement for USB3 _PRW 0x6D Skylake DSDT patch. Instawake fix for USB 3.0. In short, calling GPRW with first argument 0x6D (or 0x0D, not the case here) and second argument non-zero causes wake. Replacement method checks this condition.
Patches:
VoodooI2C compatibility patches.
Made in assumption of IOInterruptSpecifiers = 0x6d, which corresponds to pin number 0x55. You might have a different pin number. Refer to Touchpad section.
Patches:
NVidia disabler patch. Refer to Graphics.
Patches:
Battery compatibility patches. For information on how to create it refer to hotpatch guide. (actually, example in the guide fits this laptop almost perfectly).
Patches:
CPU
There's an issue of CFG Lock, also known as MSR 0xE2 register lock. Not getting into details, it's an UEFI switch that messes with some CPU feature that macOS kernel expects to be present. Unfortunately, it is hidden in stock UEFI firmware. You can either circumvent this with OC quirks (AppleCpuPmCfgLock and AppleXcpmCfgLock), but much better is to switch it in UEFI.
A short guide from acidanthera:
You might need to redo that if you ever reset UEFI.
Another thing important to any hack and doubly for laptops is CPU power management. It is required for sleep and for any adequate battery life. The main part could easily be enabled through SSDT-PLUG. To further finetune and improve battery life or performance, get CPUFriend Lilu plugin.
It requires CPU data. To generate it get CPUFriendFriend script. It will ask among other things about "TDP down frequency" — you can find it on Intel Arc website for your CPU. For i3 6100U it's 800 MHz. Then you place resulting ssdt or kext (surprisingly not named CPUFriendFriendFriend) into right place along with CPUFriend and reboot.
Graphics
Quick solution for disabling gDPU is just to add disable-external-gpu = true in properties injection for WhateverGreen. I think it would still remain powered (and drain battery) unless disabled through ACPI patches, though.
First, carefully read this guide. This is a bit convoluted.
Now, for this model we have to patch only _INI in SSDT-5. _OFF method is in SSDT-6, but it don't require patching. YMMV, check if this is correct in your case as described in the guide.
You have to call _OFF (in SSDT-6) from _INI (in SSDT-5). _OFF in turn calls HGOF (in SSDT-5), which accesses some EC0 fields, which would crash when called that way.
In my case that were these lines:
So you have to comment them out and call them from _REG, but with a condition:
Second, you need _PTS/_WAK patch. Part of it is in patch repository (Note that you have to modify it, NVidia GPU is \_SB.PCI0.RP01.PEGP)
Now, THE caveat. Since you're calling _OFF from _WAK (when waking), you have to call those EC0 lines from _WAK too, like this:
Not doing that would result in random reboots when waking. (See this thread)
To convert these patches to separate SSDT-DGPU, we rename original methods in DSDT and SSDT-5 and call them from wrapper methods, like described before.
Audio and HDMI
To enable speakers and headphones, you can just install Lilu plugin AppleALC along with alc-layout-id=21 injection in any way (preferably through device properties).
That alone won't enable HDMI audio, though, because system believes by default that you have DP port, not HDMI. Non-working HDMI audio might cause problems when plugging in HDMI, so it's highly recommended to fix it.
Now, for properties injection. Hackintool can generate all we need semiautomatically. We need:
USB port loadout
For theory see guide for USBInjectAll or USBMap and for power properties injection. USBMap is preferred for laptops with few ports.
USB ports:
You'll also need SSDT-EC for fake Embedded Controller (since you can't rename EC0). Fortunately, nowadays you can use Hackintool or USBMap to check USB ports and generate correct SSDT or kext.
Touchpad
VoodooI2C is not really plug-n-play. Fortunately, it has a well-writted guide here. You will need some ACPI patches. First, you need GPIO Controllers Enable patch. (I2C controllers patch isn't required).
Next comes GPIO pinning. See guide for it here. To save you some time, in my case touchpad for this laptop model is called ETPD and it's connected to I2C1 (I don't know what I2C0 for. Maybe it's empty, maybe it's sensor hub). IOInterruptSpecifiers = 0x6d, which corresponds to pin number 0x55. But do recheck that.
Finally, install VoodooI2C (don't worry, VoodooI2CGPIO is inside it) and VoodooI2CELAN (both ELAN and HID satellite kexts work for me, but ELAN seems to be better).
Fn keys
Volume and media control keys should work with VoodooPS2Controller.
AsusSMC also provides Fn keys and keyboard backlight. That requires DSDT patches, probably modified for your model.
AsusSMC provides MaciASL patches, but they require some customization. Check your original SLKB method in DSDT, used by Windows drivers; here's mine:
Now you need to set correct address in patch/SSDT. Optionally you can use same logic - using KBLV to pick value from PWKB array. You also need to replace PWKB for 15-levels backlight. Here's my result:
You also would need Fake ALS device and patches for some Fn keys that didn't work OOB – for me that were F2, F5, F6 and F8. Note that installing AsusSMC on Catalina requires some workarounds - see details here.
OpenCore config
Refer to this guide and to Configuration.pdf supplied with OC for general information.
One problem with OC in dual boot situations is that it applies all settings, ACPI patches and whatnot to all OSes it boots. While that is more consistent and allows, for example, seamless BootCamp functionality, that means you have to make all ACPI edits safe for Windows by wrapping them in If(_OSI("Darwin")) { }. Also, it might deactivate your installed Windows, as it would think it suddenly runs on Mac now, so take care.
If you want more traditional dual boot, you can use OC to boot only macOS, and run rEFInd to switch between OC and Windows bootloader. Another option out there is an OC fork by N-D-K that disables ACPI patching, SMBIOS, etc. for other OSes, allowing easier dualboot configuration.
OpenCore is more strict than Clover in that it loads only files specified in config. Run ProperTree and use OC Snapshot option to automatically populate config with ACPI files and kexts.
Current version: Catalina 10.15.4 — OpenCore 0.5.8
Overall status — stable, 99+%. Issues: none known.
This is an updated version of my High Sierra Clover guide. If you need historical information, check it here.This guide is intended mostly for troubleshooting and hinting at less obvious things. It will not serve as complete installation guide, as there are enough of much better-written ones (probably start here). It is expected that you're able to google. I'll provide my config, but it should serve only as an example. You should build it yourself for your hardware.
Thanks to
- RehabMan for his guides, software and personal help.
- All people who created software I used.
- All people whose guides and ideas I googled up.
- Latest OpenCore, both debug and release versions (this config was written for 0.5.7; I will update it from time to time)
- MaciASL, iasl (acidanthera's MaciASL build contains iasl inside app package)
- IORegistryExplorer 2.1, exactly this version. Get it here.
- Hackintool – extremely useful multitool software. Here.
- Decent programming-class editor (Sublime Text, for example).
- Plist editor – XCode (7Gb download, 20Gb installed), PlistEdit Pro (paid but good, has trial), ProperTree (free, useful for OpenCore)... Or you can edit them raw in a text editor (not recommended). You should run ProperTree at least once — it can automatically populate config with your kexts and SSDTs.
- Other tools — several scripts by corpnewt, optionally macserial and gfxutil from acidanthera.
- Kexts:
- Lilu
- VirtualSMC
- WhateverGreen
- AirportBrcmFixup
- BrcmPatchRAM (BrcmBluetoothInjector, BrcmPatchRAM3 and BrcmFirmwareData)
- RealtekRTL8111
- VoodooPS2 (you can remove Mouse and Trackpad kexts from inside it)
- VoodooI2C (with VoodooI2CELAN)
- AppleALC
- AsusSMC
- CPUFriend (optional)
Plist files store hex data keys in base64 format. If you're using plist editor like PlistEdit Pro, it does the conversion automatically. If you're using text editor, you will have to convert hex to base64 yourself. Hackintool has a neat calculator for that.DO NOT use any kind of visual configurator or automatic checker for editing config.plist. I cannot stress this enough. I once spent a day trying to debug non-booting installer because of config broken by the configurator. Always refer to OpenCore configuration manual and sample configs for your current OC version.
Hardware overview
CPU
i3 6100U (or other) Skylake. Power management enabled through SSDT-PLUG, or SSDT-data from CPUFriend. Also, if you haven't yet switched CFG Lock, enable corresponding kernel quirks.
GPU
Intel HD 520. Use Lilu/WhateverGreen, inject device properties in Clover.
NVidia 940MX. Since it's Optimus, it has to be disabled. See Graphics below.
Display
AUO B156HTN03.8 panel. (Pretty shitty, I recommend replacing with something better)
Backlight by WhateverGreen and SSDT-PNLF.
Note: I'm having some PWM issues with replacement panel – at low brightness display backlight flicker until laptop is put to sleep at least once. Seems to be some bug in ACPI initialization with replacement panels.
Battery
SMCBatteryManager + ASUS N55SL/Vivobook DSDT patch from RehabMan's repo.
Ethernet
RealtekRTL8111.
WiFi
Intel 7265NGW or similar. M.2 2230. Not supported, replace. Look for compatible models.
I've got Broadcom BCM943602BAED, and I assume you have Broadcom combo card, too. Note that laptop has two antennas - if card has three, you need to plug in a short internal antenna (there's enough free space) or some dummy load, do not leave connector unplugged. Use Lilu/AirportBrcmFixup for masking it as Apple and some optimization.
Bluetooth
Surprisingly, BT part of the original Intel card works OOB. Can be used for temporary internet connection using phone as BT modem.
Broadcom BT requires BrcmPatchRAM. Note: I had some intermittent KPs likely related to Bluetooth (IOUSBHostFamily.kext, Wake transition timed out...). As per the manual, this is fixed with bpr_initialdelay=400 bpr_postresetdelay=400 in boot args.
USB
USB2.0 ports work OOB. Requires either USBInjectAll with corresponding SSDT or (better) custom USBMap kext. See USB port loadout below.
Audio
Conexant CS20751/2. Use Lilu/AppleALC, layout 21 (other layouts do not have working microphone jack).
Intel HDMI. In addition requires connector-id patch. See Audio and HDMI below.
Keyboard
VoodooPS2Controller for keyboard.
AsusSMC for Fn shortcuts and keyboard backlight. See Fn keys below.
Touchpad
ELAN 1000, I2C, so VoodooI2C/VoodooI2CELAN. Requires DSDT patches. See Touchpad below.
Peripherals
Camera – USB2.0 VGA UVC WebCam, works OOB.
SD card reader – USB2.0, works OOB.
BIOS settings
Disable CSM, Secure boot, fast boot, VT-d. Set SATA to AHCI. Set DVTM to 128 Mb. Disable CFG Lock. If you intend to dual boot Windows, you may leave VT-d enabled and enable DisableIOMapper quirk instead.
EFI drivers and tools
You need:
- OpenRuntime — obviously;
- HFS driver — either VBoxHFS of HFSPlus, for the installer;
- OpenShell — optionally, to manually edit boot records in case of debugging.
DSDT
Using patched DSDT is not recommended nowadays, especially since OpenCore would apply it to all OSes, and will not be supported by this guide. Fortunately, this laptop's ACPI is mostly without errors, so we can utilise hotpatching. Still, laptop ACPI requires quite extensive modifications, moving them to SSDTs requires some experience, and you'll probably have to check and remake some patches against your DSDT.
First, disassembly. Read the guide on patching DSDT here. Carefully and several times. You might use Rehabman's builds, or get newer: Acidanthera's MaciASL supports correct disassembling of all tables at once – go to settings/iASL and tick "Autoload tables in same directory". Also add
-dl
to "Extra decompiler options" – that forces decompiler to output legacy syntax, required for patches.Second, fixing errors that prevent recompiling:
- PARSEOP_ZERO – apply "Fix PARSEOP_ZERO aggressive", or just delete excess Zero lines.
- PARSEOP_ARG - delete whole IfCondRef blocks with SDSM and MDBG, they're not used anywhere anyway.
- Illegal open scope... - again, _SB.PCI0.RP01.PXSX is not defined anywhere, so delete whole IfCondRef(\_SB.PCI0.RP01.PXSX) blocks. Note: RP01 is NVidia GPU, which is unused anyway.
Code:
External (_SB_.GGOV, MethodObj)
External (_SB_.PCI0.LPCB.EC0_.WRAM, MethodObj)
External (_SB_.PCI0.LPCB.EC0_.RRAM, MethodObj)
External (GPRW, MethodObj)
Code:
Return (GPRW) -> Return (GPRW(0x69, 0x04))
0x69
0x04
Store (\_SB.PCI0.LPCB.EC0.RRAM, 0xF921)
Local0 -> Store (\_SB.PCI0.LPCB.EC0.RRAM (0xF921), Local0)
Store (\_SB.GGOV, Arg2) -> Store (\_SB.GGOV (Arg2), Local0)
Local0
You should have a solid understanding of static ACPI patching before attempting hotpatching. The idea is to move all modifications to SSDTs and then patch ACPI to rename modified methods and correct errors. This way we do not replace DSDT and have (hopefully) universal solution that would work when DSDT would change. See this guide on hotpatching for more details.
Often we don't need to copy complete replaced method — we can call renamed original from replacement wrapper. This way has better readability, is less error-prone and requires way less External declarations. For example:
Code:
External (_SB_.PCI0.RP01.PEGP.XINI, MethodObj) // external declaration
Method (_INI, 0, NotSerialized) // replacement wrapper method
{
XINI () // <== calling original method that we renamed with patch
If (_OSI ("Darwin")) // <== applying changes only for macOS
{
_OFF () // doing whatever we need
}
}
Custom SSDTs
This also lists all required patches in config. Unless specified otherwise, they apply to DSDT and have only one occurrence. For details see comments in provided *.dsl files.
SSDT-EC
Fake EC device and USB power injection.
Do not disable original _SB.PCI0.LPCB.EC0 device in macOS — Fn keys and battery wouldn't work.
SSDT-PNLF
Backlight device, requires WhateverGreen, get it here, and change in it _CID to "backlight".
SSDT-HPET
IRQ conflict fix. A minor incompatibility with RTC and TIMR devices being assigned IRQ that might conflict with something else. May be unnecessary. Use SSDTTime to generate SSDT and corresponding patches for your system.
Patches:
- Method replacement: _CRS → XCRS
- RTC IRQ 1, TIMR IRQ 8 patch
Fake SMBUS and MCHC devices. Probably unnecessary in recent macOS.
SSDT-data
PluginType=1 and CPU frequency data generated by CPUFriendFriend script. You should generate one manually for your CPU. Refer to script's manual.
You can also use SSDT-PLUG with only PluginType=1.
SSDT-XOSI
Replacement for _OSI to access some OS-dependent functionality.
Some functionality gets enabled only for certain Windows versions (most notably, some I2C stuff might require Windows 7+). When OS boots, it sets some internal variable accessed by a built-in _OSI method. We replace all calls to it with our custom XOSI method.
Patches:
- _OSI → XOSI; all occurrences in all files.
AsusSMC additions — keyboard backlight and Fn keys. Refer to Fn keys.
Recheck what EC register is accessed in original keyboard backlight method SLKB in DSDT. It should look like _SB.PCI0.LPCB.EC0.WRAM (0xXXXX, Local0). Custom SKBV method should access the same register.
Patches:
- Replacing PWKB → XWKB for 15-levels keyboard backlight — original has 3 levels, but macOS expects 15.
- _Q0B → XQ0B, etc. Enabling several Fn keys: F2, F5, F6, F8.
Replacement for USB3 _PRW 0x6D Skylake DSDT patch. Instawake fix for USB 3.0. In short, calling GPRW with first argument 0x6D (or 0x0D, not the case here) and second argument non-zero causes wake. Replacement method checks this condition.
Patches:
- Rename method at declaration: GPWR → XPRW
VoodooI2C compatibility patches.
Made in assumption of IOInterruptSpecifiers = 0x6d, which corresponds to pin number 0x55. You might have a different pin number. Refer to Touchpad section.
Patches:
- GPIO pinning - _CRS => XCRS in ETPD device
- GPIO enabling - replacing _STA with XSTA in GPI0 device
NVidia disabler patch. Refer to Graphics.
Patches:
- _REG → XREG, _WAK → XWAK, _PTS → XPTS
- _INI → XINI, HGOF → XGOF in SSDT-5 (OemTableId=53675063 68000000)
Battery compatibility patches. For information on how to create it refer to hotpatch guide. (actually, example in the guide fits this laptop almost perfectly).
Patches:
- Replacement methods for _BIX, BIFA, SMBR, SMBW, ECSB, TACH
- FBST - fix battery status at full charge
CPU
There's an issue of CFG Lock, also known as MSR 0xE2 register lock. Not getting into details, it's an UEFI switch that messes with some CPU feature that macOS kernel expects to be present. Unfortunately, it is hidden in stock UEFI firmware. You can either circumvent this with OC quirks (AppleCpuPmCfgLock and AppleXcpmCfgLock), but much better is to switch it in UEFI.
A short guide from acidanthera:
CFG Lock option is available on most APTIO V firmwares, although it may be hidden from the GUI. If VerifyMsrE2 reports that your 0xE2 register is consistently locked, you may try to unlock this option directly.
WARNING: variable offsets are unique not only to each motherboard but even to its firmware version. Never ever try to use an offset without checking.
- Download UEFITool and IFR-Extractor.
- Open your firmware image in UEFITool and find CFG Lock unicode string. If it is not present, your firmware does not support this and you should stop.
- Extract the Setup.bin PE32 Image Section that UEFITool found via Extract Body.
- Run IFR-Extractor on the extracted file (e.g. ./ifrextract Setup.bin Setup.txt).
- Find CFG Lock, VarStoreInfo (VarOffset/VarName): in Setup.txt and remember the offset right after it (e.g. 0x123).
- Download and run a modified GRUB Shell, thx to brainsucker for the binary. A more up to date version may be found in grub-mod-setup_var repo.
- Enter setup_var 0x123 0x00 command, where 0x123 should be replaced by your actual offset and reboot.
You might need to redo that if you ever reset UEFI.
Another thing important to any hack and doubly for laptops is CPU power management. It is required for sleep and for any adequate battery life. The main part could easily be enabled through SSDT-PLUG. To further finetune and improve battery life or performance, get CPUFriend Lilu plugin.
It requires CPU data. To generate it get CPUFriendFriend script. It will ask among other things about "TDP down frequency" — you can find it on Intel Arc website for your CPU. For i3 6100U it's 800 MHz. Then you place resulting ssdt or kext (surprisingly not named CPUFriendFriendFriend) into right place along with CPUFriend and reboot.
Graphics
Quick solution for disabling gDPU is just to add disable-external-gpu = true in properties injection for WhateverGreen. I think it would still remain powered (and drain battery) unless disabled through ACPI patches, though.
First, carefully read this guide. This is a bit convoluted.
Now, for this model we have to patch only _INI in SSDT-5. _OFF method is in SSDT-6, but it don't require patching. YMMV, check if this is correct in your case as described in the guide.
You have to call _OFF (in SSDT-6) from _INI (in SSDT-5). _OFF in turn calls HGOF (in SSDT-5), which accesses some EC0 fields, which would crash when called that way.
In my case that were these lines:
Code:
Method (HGOF, 0, Serialized)
{
...
Store (\_SB.PCI0.LPCB.EC0.RRAM (0xF921), Local0)
And (Local0, 0xCF, Local0)
\_SB.PCI0.LPCB.EC0.WRAM (0xF921, Local0)
\_SB.PCI0.LPCB.EC0.WRAM (0xF920, 0x95)
\_SB.PCI0.LPCB.EC0.WRAM (0xF7A4, Zero)
\_SB.PCI0.LPCB.EC0.WRAM (0xF7A5, Zero)
...
}
Code:
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))
{
Store (\_SB.PCI0.LPCB.EC0.RRAM (0xF921), Local0)
And (Local0, 0xCF, Local0)
\_SB.PCI0.LPCB.EC0.WRAM (0xF921, Local0)
\_SB.PCI0.LPCB.EC0.WRAM (0xF920, 0x95)
\_SB.PCI0.LPCB.EC0.WRAM (0xF7A4, Zero)
\_SB.PCI0.LPCB.EC0.WRAM (0xF7A5, Zero)
}
Now, THE caveat. Since you're calling _OFF from _WAK (when waking), you have to call those EC0 lines from _WAK too, like this:
Code:
If (CondRefOf(\_SB.PCI0.RP01.PEGP._OFF))
{
\_SB.PCI0.RP01.PEGP._OFF()
Store (\_SB.PCI0.LPCB.EC0.RRAM (0xF921), Local0)
And (Local0, 0xCF, Local0)
\_SB.PCI0.LPCB.EC0.WRAM (0xF921, Local0)
\_SB.PCI0.LPCB.EC0.WRAM (0xF920, 0x95)
\_SB.PCI0.LPCB.EC0.WRAM (0xF7A4, Zero)
\_SB.PCI0.LPCB.EC0.WRAM (0xF7A5, Zero)
}
To convert these patches to separate SSDT-DGPU, we rename original methods in DSDT and SSDT-5 and call them from wrapper methods, like described before.
Audio and HDMI
To enable speakers and headphones, you can just install Lilu plugin AppleALC along with alc-layout-id=21 injection in any way (preferably through device properties).
That alone won't enable HDMI audio, though, because system believes by default that you have DP port, not HDMI. Non-working HDMI audio might cause problems when plugging in HDMI, so it's highly recommended to fix it.
Now, for properties injection. Hackintool can generate all we need semiautomatically. We need:
- Skylake with platform-id 0x19160000 (also for graphics)
- Connectors patch: connector 0 is LVDS, 1 is dummy, 2 is HDMI.
- Choose DeviceProperties, for connectors, graphics and audio, on advanced tick Disable eGPU.
USB port loadout
For theory see guide for USBInjectAll or USBMap and for power properties injection. USBMap is preferred for laptops with few ports.
USB ports:
- Left side – HS01 and HS04 (also SS01 and SS04), set as USB3.0
- Right side - HS02 and HS03, USB2.0
- Cardreader - HS05, internal
- Webcamera - HS06, internal
- Bluetooth - HS08, internal
You'll also need SSDT-EC for fake Embedded Controller (since you can't rename EC0). Fortunately, nowadays you can use Hackintool or USBMap to check USB ports and generate correct SSDT or kext.
Touchpad
VoodooI2C is not really plug-n-play. Fortunately, it has a well-writted guide here. You will need some ACPI patches. First, you need GPIO Controllers Enable patch. (I2C controllers patch isn't required).
Next comes GPIO pinning. See guide for it here. To save you some time, in my case touchpad for this laptop model is called ETPD and it's connected to I2C1 (I don't know what I2C0 for. Maybe it's empty, maybe it's sensor hub). IOInterruptSpecifiers = 0x6d, which corresponds to pin number 0x55. But do recheck that.
Finally, install VoodooI2C (don't worry, VoodooI2CGPIO is inside it) and VoodooI2CELAN (both ELAN and HID satellite kexts work for me, but ELAN seems to be better).
Fn keys
Volume and media control keys should work with VoodooPS2Controller.
AsusSMC also provides Fn keys and keyboard backlight. That requires DSDT patches, probably modified for your model.
AsusSMC provides MaciASL patches, but they require some customization. Check your original SLKB method in DSDT, used by Windows drivers; here's mine:
Code:
Method (SLKB, 1, NotSerialized)
{
Store (And (Arg0, 0x7F), KBLV)
If (And (Arg0, 0x80))
{
Store (DerefOf (Index (PWKB, KBLV)), Local0)
}
Else
{
Store (Zero, Local0)
}
//note correct EC address for backlight
^^PCI0.LPCB.EC0.WRAM (0xF8B1, Local0).
Return (One)
}
Code:
Name (PWKB, Buffer (0x10)
{ //note: original PWKB has three backlight levels. This is a replacement.
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
})
Method (SKBV, 1, NotSerialized)
{
Divide (Arg0, 0x10, , KBLV) /* \_SB_.KBLV */
Store (DerefOf (Index (PWKB, KBLV)), Local0)
^^PCI0.LPCB.EC0.WRAM (0xF8B1, Local0)
Return (Arg0)
}
OpenCore config
Refer to this guide and to Configuration.pdf supplied with OC for general information.
One problem with OC in dual boot situations is that it applies all settings, ACPI patches and whatnot to all OSes it boots. While that is more consistent and allows, for example, seamless BootCamp functionality, that means you have to make all ACPI edits safe for Windows by wrapping them in If(_OSI("Darwin")) { }. Also, it might deactivate your installed Windows, as it would think it suddenly runs on Mac now, so take care.
If you want more traditional dual boot, you can use OC to boot only macOS, and run rEFInd to switch between OC and Windows bootloader. Another option out there is an OC fork by N-D-K that disables ACPI patching, SMBIOS, etc. for other OSes, allowing easier dualboot configuration.
OpenCore is more strict than Clover in that it loads only files specified in config. Run ProperTree and use OC Snapshot option to automatically populate config with ACPI files and kexts.
Again, it is strongly advised to use specialized plist editor or at least programming-class text editor (see required software above). Anything else will break your config file, which will result in non-booting system.
- ACPI
- Add
- Add custom SSDTs from the list above. Use Propertree to quickly populate this list.
- Block — empty
- Patch
- See custom SSDTs.
- I also have two patches that fix PARSEOP_ZERO patches. Not that these errors matter much.
- Unless explicitly noted (only XOSI rename so far), all patches apply at exactly one occurrence (Count=1). To limit patches to a specific table, we also use TableSignature and OemTableId. For example, to limit patch to DSDT only, TableSignature=44534454.
- Quirks
- If using patched DSDT, enable RebaseRegions. Otherwise, leave all disabled.
- Add
- Booter
- MmioWhitelist — empty
- Quirks
- Enable AvoidRuntimeDefrag, EnableWriteUnprotector and SetupVirtualMap, everything else disabled.
- DeviceProperties
- Add
- PciRoot(0x0)/Pci(0x14,0x0)
- Intel USB controller. Unlike Clover, OC doesn't provide automatic InjectUSB option. You need to inject USB controller device-id manually.
- PciRoot(0x0)/Pci(0x1f,0x0)
- LPC device property injection, aka FixLPC.
- PciRoot(0x0)/Pci(0x1f,0x3)
- Audio — injecting alc-layout-id.
- PciRoot(0x0)/Pci(0x2,0x0)
- iGPU — injecting ig-platform-id, setting connector to HDMI (it is DP by default) and additionally disabling dGPU through WhateverGreen.
- PciRoot(0x0)/Pci(0x14,0x0)
- Block — empty
- Add
- Kernel
- Add
- Here we add kexts. Some kexts contain other kexts inside, you have to add them too. Use ProperTree to correctly populate this list with OC Snapshot command.
- Kext load order is important. Dependencies:
- Lilu → VirtualSMC → everything else
- BrcmBluetoothInjector → BrcmFirmwareData → BrcmPatchRAM3
- VoodooI2CServices → VoodooGPIO → VoodooI2C → VoodooI2CELAN
- VoodooPS2Controller → VoodooPS2Keyboard
- Block — empty
- Emulate — CPU spoofing. Don't touch unless you understand what it is for.
- Patch — empty
- Quirks
- Enable DisableIOMapper, then you can enable Vt-d in UEFI for Windows.
- ThirdPartyDrives if you have SSDs
- You did switch CFG Lock, didn't you? If not, enable AppleCpuPmCfgLock and AppleXcpmCfgLock.
- Enable PanicNoKextDump when debugging.
- Add
- Misc
- BlessOverride
- If you have problems booting Windows, you might need to provide path to bootmgfw.efi — by default OpenCore looks for bootx64.efi.
- It should look like this: \EFI\Microsoft\Boot\bootmgfw.efi
- Boot
- If you can't find Windows bootloader, that might be because it's on same EFI partition as OC, and HideSelf is set to True.
- Debug
- refer to OpenCore manual for settings for debugging.
- Security
- Keep Vault=Optional until you're absolutely sure that you're done with the config.
- Set ScanPolicy to 0 to scan all possible volumes. It slows down boot a little, so later you might want to limit it — refer to Configuration.pdf.
- Tools — should be populated by ProperTree.
- BlessOverride
- NVRAM
- Add — read OC manual on how to add boot args. You need only '-v keepsyms=1 debug=0x100' for debugging, and maybe some Lilu plugins options.
- Block — ditto
- WriteFlash — True.
- PlatformInfo
- This is analogue of Clover SMBIOS section. Set all values in the root to True, UpdateSMBIOSMode = Create, and fill out Generic with SMBIOS information. No need to touch other dictionaries here — they will be autogenerated.
- Refer to OC manual and this guide.
- Set AdviceWindows in Generic to True for dual boot.
- UEFI
- Refer to OC manual. Normally you don't need to touch anything in here aside from quirks. At the moment of writing, OpenCanopy was not recommended for end users, and I do not use picker at all.
- Quirks
- Set ReleaseUSBOwnership, RequestBootVarFallback and RequestBootVarRouting to True.
Attachments
Last edited: