Contribute
Register

[GUIDE] ASUS K501UQ - Catalina

Joined
Sep 3, 2010
Messages
47
Motherboard
ASRock Z77 Extreme6
CPU
i5-3470
Graphics
RX 560
ASUS K501UQ-DM068T
(likely all K501UQ variants, may be useful for other K501U models)

Overall status: 98+% working.
Not working: microphone in jack. Don't know about Handoff and stuff, don't have an iPhone to check.

This is an updated version of my High Sierra guide. If you need historical information, check it here.

NOTE: 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 only as an example. You'll have to 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.
Required software
  • Latest build of Clover
  • MaciASL, iasl (acidanthera's MaciASL build contains iasl inside app package)
  • IORegistryExplorer 2.1 (exactly this version) Get it here, or install gen_debug (you'll probably need it, anyway)
  • Hackintool – extremelly useful multitool software. Here.
  • Decent programming-class editor (Sublime Text, for example).
  • Plist editor – XCode (7Gb download), PlistEdit Pro (paid but really good, has trial), ProperTree (free, okayish, made for OpenCore)... Or you can edit them raw in text editor.
  • Drivers – Lilu, VirtualSMC, WhateverGreen, AirportBrcmFixup, BrcmBluetoothInjector, RealtekRTL8111, VoodooPS2, VoodooI2C, AppleALC, AsusSMC. Always get newest builds.
Important notes in advance
DO NOT use any visual configurator for editing config.plist. Especially Clover configurator. I cannot stress this enough. I spent a day trying to debug non-booting installer because of botched config. Use it (or Cloud Clover Editor) only for generating SMBIOS information (and even then there are other options). For a base config you can use files created by RehabMan from here. Or use mine, but you might need to change some things

Plist files store hex data keys (used with patches and EDID) in base64 format. If you're using plist editor like PlistEdit Pro, it does conversion automatically. If you're using text editor, you will have to convert hex to base64 yourself. Hackintool has a neat calculator for that.

Hardware overview
CPU
i3 6100U (or other) Skylake. Power management enabled through Clover XPCM/HWP patches – see this for details. In short, you have to add config.plist/ACPI/SSDT/Generate/PluginType=true (and, if you haven't switched CFG Lock, enable xcpm_idle patch in config.plist/KernelAndKextPatches/KernelToPatch section).

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.
Note: I'm having some PWM issues – at low brightness display backlight flicker. Not sure if that's generic problem or faulty panel, though it's not happening in Windows.

Battery
SMCBatteryManager + ASUS N55SL/Vivobook DSDT patch.

Ethernet
RealtekRTL8111.

WiFi
Intel 7265NGW. M.2 2230. Not supported, replace.
I've got Broadcom BCM943602BAED. Note that it has three antenna connectors while laptop has two antennas - you'll need to get a short antenna (there's enough free space) or some dummy load, do not leave connector unplugged. Works OOB, use Lilu/AirportBrcmFixup for masking it as Apple and probably some optimization.

Bluetooth
Requires BrcmFirmwareRepo/BrcmPatchRAM2/BrcmBluetoothInjector.
Surprizingly, BT part of original Intel card works OOB. Can be used for temporary internet connection using phone as BT modem.

USB
USB2.0 works OOB. Requires USBInjectAll with corresponding SSDT or custom USBPorts kext. See USB port loadout below.

Audio
Conexant CS20751/2. Use Lilu/AppleALC, layout-id=3.
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. Might require beta build, provided in download.

Peripherals
Camera – USB2.0 VGA UVC WebCam, works OOB. CustomPeripheral.kext might be used for masking it as Apple.
SD card reader – USB2.0, works OOB.

General settings
BIOS settings
Disable CSM, Secure boot, fast boot, VT-d. Set SATA to AHCI. Set DVTM to 128 Mb. Disable CFG Lock (see below).

DSDT patches
Read guide on patching DSDT here. Carefully and several times.

First, disassembly method. You might use Rehabman's builds, or get newer build: 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 decompler options" – that forces decompiler to output legacy syntax, that is required for patches.

Second, fix errors.
  • PARSEOP_ZERO – apply "Fix PARSEOP_ZERO agressive", 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.

Third, add generic system patches: _OSI patch (Windows 10), fix _WAK v2, fix Mutex, fix RTC, USB3 _PRW 0x6D Skylake, Skylake LPC (this one better to add manually, if ever, patch might break something).

Fourth, add battery patch (Rehabman - ASUS N55SL/Vivobook).
There are other patches, read further.

SSDT patches
Only origin SSDT you'll need to inject is SSDT-5, to disable eGPU. It decompiles with some PARSEOP_INTEGER errors (because disassembler guesses that some names are integer variables, while they're methods). Fixes:
Code:
Return (GPRW)  ->   Return (GPRW(0x69, 0x04))
0x69
0x04
Code:
Store (\_SB.PCI0.LPCB.EC0.RRAM, 0xF921)
Local0     ->     Store (\_SB.PCI0.LPCB.EC0.RRAM (0xF921), Local0)
Code:
Store (\_SB.GGOV, Arg2) -> Store (\_SB.GGOV (Arg2), Local0)
Local0
You might also correct external declarations in the beginning of the file:
Code:
External (_SB_.GGOV, MethodObj)
External (_SB_.PCI0.LPCB.EC0_.WRAM, MethodObj)
External (_SB_.PCI0.LPCB.EC0_.RRAM, MethodObj)
External (GPRW, MethodObj)
For patching it see Graphics.

Custom SSDTs
Compatible dummy EC, USB power injection, HPET and IRQ fixes, SMBUS and MCHC devices. Use SSDTTime to generate them for your system. They would need some DSDT rename patches.

EFI drivers
Nothing special here, but if you want to get FileVault 2, you need AppleGenericInput, AppleUISupport and AptioMemoryFix, and they are currently being deprecated with dev switching to OpenCore.

Clover config
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.

As base I used config_HD520_530_540.plist from RehabMan's repo. You would have to disable/remove patches you don't need, add some others, fill in your SMBIOS information and configure boot menu. Or just use my config file as base and/or example.

Native NVRAM works with AptioMemoryFix.

List of settings with some explanations:
  • ACPI/DSDT/Fixes - Enable only FixHeaders. Enable other patches only if required.
  • ACPI/DSDT/Patches
    • GFX0 > IGPU - hotpatching both DSDT and SSDTs
    • Do not use any EC rename patches, this will break ECDT device. Use SSDT-EC-USBX, see above.
    • HPET _CRS rename and IRQ patches - produced by SSDTTime, see above.
  • ACPI/DropTables – since we'll be injecting SSDT-5, we drop original.
  • ACPI/SSDT/Generate
    • PluginType = Yes. This is alternative to CPU SSDT generated by ssdtPRGen.sh.
  • Boot/Arguments
    • abm_firstpolldelay is related to battery driver, delays first polling to decrease problems (visual bug with full battery reported as empty)
    • brcmfx-driver - used for choosing specific WiFi driver to load (had rare KPs when wrong driver tried to load). If you're using different WiFi card, you might need to change this.
  • Devices/Properties - see *Patching - graphics* below
  • KernelAndKextPatches
    • AppleRTC, KernelLapic, KernelPm = true. Most importantly KernelPm.
    • AppleIntelCPUPm = false, unless you haven't disabled CFG Lock.
    • KernelToPatch — _xpcm_idle patch by Pike R. Alpha, again, not needed with disabled CFG Lock.
    • ForceKextsToLoad — useful for installer, mostly.
    • KextsToPatch – two patches that disable Apple I2C kexts, required for VoodooI2C.
  • RtVariables and SMBIOS – see guide for setting up App Store/iMessage here. I use MacBookPro13.1 definition. For generating serial numbers use Acidanthera's macinfo or Clover Cloud Editor.
Patches for devices
CFG Lock

This issue also known as MSR 0xE2. 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 Clover option (AppleIntelCPUPm=true) or, better, switch it in UEFI.

See complete guide here. You might need to redo that if you ever reset UEFI.

Graphics
First, follow this guide. This is going to be a bit convoluted.

Now, for my model I had to patch only _INI in SSDT-5. _OFF method is in SSDT-6, but it didn'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 cause errors 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)
    ...
}
So you have to comment them out and call them from _REG, but with a condition:
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)
}
Second, you need _PTS/_WAK patch. Part of it is in patch repository (Note that you have to modify it, NVidia GPU in my case 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:
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)
        }
Not doing that would result in random reboots when waking. (See this thread)

For properties injection see below.

Audio and HDMI
To enable speakers and headphones, you can just install Lilu plugin AppleALC along with layout-id=3 injection in any way.

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 in Clover. 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.
Resulting patch is inserted into config.plist.

USB port loadout
First, for theory see guides for USBInjectAll and for power properties injection.
USB ports:
  • Left side – HS01 and HS04 (also SS01 and SS04), considered USB3.0
  • Right side - HS02 and HS03, USB2.0
  • Cardreader - HS05, internal
  • Webcamera - HS06, internal
  • Bluetooth - HS08, internal
All are connected to 8086_9d2f.
You'll also need SSDT-EC for fake Embedded Controller (since you can't rename EC0). Fortunately, nowadays you can use Hackintool to check USB ports and generate correct SSDT. Or you can generate SSDT only for EC and USB power, and define ports in USBPorts kext, all with the same tool.

Touchpad
New VoodooI2C version is somewhat less plug-n-play. Fortunately it has well-writted guide here. You will need some DSDT editing. First, apply GPIO Controllers Enable patch to DSDT. (I2C controllers patch likely isn't required).

Next comes GPIO pinning. See guide for it here. To save your 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. Note: IOInterruptSpecifiers might be missing from ETPD device in IOReg. In that case check Interrupts block that you deleted from SBFI, I think that it's the same number.

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).

At time of writing this (v2.2 release), VoodooGPIO caused kernel panic at boot for me for some reason. I attached fixed beta version just in case.

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, 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)
            }
Now you need to set correct address in patch. Optionally you can use same logic - using KBLV to pick value from PWKB array. Here's my result:
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)
}
You also would need Fake ALS patch and patches for some Fn keys that didn't work OOB – for me that were F2 through F6 and F8. Note that installing AsusSMC on Catalina requires some workarounds - see details here.

Fan control
Still under construction.

Until done, see this topic for more info.
 

Attachments

Joined
Sep 3, 2010
Messages
47
Motherboard
ASRock Z77 Extreme6
CPU
i5-3470
Graphics
RX 560
Updates and errata

I'll keep this guide updated, but most current version can be found here (unless it is down). Current version of all files is here.

EFI drivers
Since AptioMemoryFix is deprecated in favor of Opencore, there's OcQuirks — more recent replacement built for Clover. It requires FwRuntimeServices, but comes bundled with it. One downside is that it's harder to customize (you need to build it with certain options) but in my case it worked as a drop-in replacement.

Custom SSDTs
SSDT-PNLF is used for backlight. If mine doesn't work, you can get template from WhateverGreen.
SSDT-XOSI considered preferable to _OSI DSDT patch. For that one, get and compile SSDT-XOSI, add _OSI→XOSI rename patch to Clover and optionally revert Windows patch in DSDT.

Another way to improve battery life or performance is to use CPUFriend Lilu plugin. To create config for it get CPUFriendFriend. Check your CPU on Intel Ark and find "TDP down frequency" — for i3 6100U it's 800MHz. Put either resulting ssdt or kext (counterintuitively not named CPUFriendFriendFriend) to right place in EFI along with CPUFriend.

Clover config
Turns out, you most likely don't need AppleRTC, KernelLapic and KernelPm, all these patches are for older chipsets and/or macOS versions. Read the manual.
Add Devices/Audio/ResetHDA=true, if you're going to dualboot other OS — else it might leave codec in bad state or something.

Devices
You'll need BrcmPatchRAM3, since Nov 2019 BrcmPatchRAM2 doesn't work with 10.15.
Also try booting with only BluetoothInjector — it might be enough.

I had some intermittent KPs at boot, likely related to Bluetooth (IOUSBHostFamily.kext, Wake transition timed out…). As per BrcmPatchRAM manual, you might need to add bpr_initialdelay=400 bpr_postresetdelay=400 to boot args. Seems that it helped.

Fan control — TL;DR that method requires FakeSMC, and won't work with VirtualSMC
 
Last edited:
Joined
Nov 1, 2019
Messages
2
Motherboard
x99 ROG RAMPAGE V EDITION 10
CPU
i7-6900K
Graphics
GTX 1080 Ti
Mobile Phone
Android
I have the same CPU and GPU, is the attachment enough to boot ?
 
Last edited:
Joined
Sep 3, 2010
Messages
47
Motherboard
ASRock Z77 Extreme6
CPU
i5-3470
Graphics
RX 560
I have the same CPU and GPU, is the attachment enough to boot ?
Since you ask such question — no, it is not enough. First of all you need to understand what are you doing.

Also, unless I'm mistaken, per forum rules you have to provide hardware information in your profile or signature.
 
Joined
Nov 1, 2019
Messages
2
Motherboard
x99 ROG RAMPAGE V EDITION 10
CPU
i7-6900K
Graphics
GTX 1080 Ti
Mobile Phone
Android
Ty for the replay, well now i have a better view of what i'm doing after i have read your guide :)
I'm just trying to install Catelina on my "Dell Latitude e7270", as i need it for my studies.
Also thanks for the info, i'll add them right away.


Dell Latitude e7270:

ProcessorIntel Core i5-6300U 2.4 GHz @ 3 GHz
Graphics adapterIntel HD Graphics 520
Memory 8192 MB
MainboardIntel Skylake-U Premium PCH
StorageLiteon L8H-256V2G, 256 GB M.2 2280
 
Last edited:
Joined
Sep 3, 2010
Messages
47
Motherboard
ASRock Z77 Extreme6
CPU
i5-3470
Graphics
RX 560
Dell Latitude e7270 is a completely different model of completely different vendor. You should not use this guide.

Also read this.
 
Joined
May 6, 2016
Messages
59
Motherboard
asus k501ux
CPU
i5-6200U
Graphics
GTX 950M
Mac
MacBook Pro
what is your bios version? Asus has released a new bios version 302 in 2019/05/27. my laptop (K501ux) work cooler and smother with new bios under windows 10 OS. I haven't tryed Mac os in new bios yet. you can try and tell the difference.:)
 
Top