- Joined
- Sep 3, 2010
- Messages
- 50
- Motherboard
- ASUS K501UQ
- CPU
- i3-6100U
- Graphics
- HD 520
ASUS K501UQ-DM068T
(likely all K501UQ, may be useful for K501UX)
Overall status: 98+% working, might need some optimization.
Not working: some Fn shortcuts, microphone in jack. Don't know about Handoff and stuff, don't have an iPhone to check.
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.
Read pinned guides in Laptop support forum. All of them. Carefully. Almost all problems I had were caused by missing some step from one of those guides.
Thanks to
Required software
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. For a base config use files created by RehabMan from here. Choose config closest to your configuration, as described here. Also use RehabMan's fork of Clover, it has a bit better config syntax. Download it here.
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 that automatically. If you're using text editor, you will have to convert hex to base64 yourself. Use this converter.
To install a kext, use 'sudo cp -R /path/to/kext/KextFile.kext /Library/Extenions/'. Note that there should be no trailing '/' after kext. If you forget to remove it, you will copy content of kext instead. After that execute 'sudo kextcache -i /' to update cache.
Hardware overview
BIOS settings
Disable CSM, Secure boot, fast boot, VT-d. Set SATA to AHCI. Set DVTM to 128 Mb.
DSDT patches
Read guide on patching DSDT here. Carefully and several times.
First, fix errors. I had to use "PARSEOP_ZERO agressive". Also there were couple warnings about "Illegal open scope on external object". While in RehabMan's MaciALS it shows as warning, I had errors in kernel log. To remove, comment out entire blocks related to (in my case) _SB.PCI0.RP01.PXSX.
Second, add generic system patches: add MCHC, fix _WAK v2, fix Mutex, fix IRQ, fix RTC, fx SMBUS, USB3 _PRW 0x6D Skylake.
Third, add battery (ASUS N55SL/Vivobook) and audio (inject layout 3) patches.
There are other patches, read further.
Clover config
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.
Some additional SSDT files can be found here.
As base I used config_HD520_530_540.plist from RehabMan's repo as written above. You would have to disable/remove patches you don't need, add some others, fill in your SMBIOS information and configure boot menu. Also check my config files for examples and patches.
Native NVRAM works with AptioFixMemory (included in latest Clover), no need for EmuVariableUefi.
List of settings with some explanations:
(likely all K501UQ, may be useful for K501UX)
Overall status: 98+% working, might need some optimization.
Not working: some Fn shortcuts, microphone in jack. Don't know about Handoff and stuff, don't have an iPhone to check.
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.
Read pinned guides in Laptop support forum. All of them. Carefully. Almost all problems I had were caused by missing some step from one of those guides.
Thanks to
- RehabMan for his guides, software and personal help.
- rafigh89 for explaining EDID patching here and here.
- All people that created software I used.
- All other people whose guides and ideas I googled up and don't remember to whom they belong. (sorry)
Required software
- RehabMan's builds of Clover, MaciASL, iasl
- IORegistryExplorer 2.1 (exactly this version, get it here. DO NOT use any other version, you will need it for debug reports)
- Drivers (again, prefer RehabMan's forks if available): FakeSMC, ACPIBatteryManager, Lilu, AirportBrcmFixup, IntelGraphicsFixup, AppleALC, RealtekRTL8111, VoodooPS2Controller, VoodooI2C, AppleBacklightInjector, AsusNBFnKeys, BrcmFirmware, USBInjectAll
- Necessary: DarwinDumper, FixEDID, AppleHDAPatcher, plist editor (PlistEdit Pro, has trial), decent programming text editor (BBEdit, Sublime Text,..)
- Not necessary: DPCI Manager, hex editor (Hex Fiend), diff tool (Meld)
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. For a base config use files created by RehabMan from here. Choose config closest to your configuration, as described here. Also use RehabMan's fork of Clover, it has a bit better config syntax. Download it here.
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 that automatically. If you're using text editor, you will have to convert hex to base64 yourself. Use this converter.
To install a kext, use 'sudo cp -R /path/to/kext/KextFile.kext /Library/Extenions/'. Note that there should be no trailing '/' after kext. If you forget to remove it, you will copy content of kext instead. After that execute 'sudo kextcache -i /' to update cache.
Hardware overview
- CPU
i3 6100U (or other) Skylake. Power management enabled through Clover XPCM/HWP patches – see this for details
Basically you have to add config.plist/ACPI/SSDT/Generate/PluginType=true and enable xcpm_idle patch in config.plist/KernelAndKextPatches/KernelToPatch section.
SSDT generated by ssdtPRGen.sh works too.
Basically you have to add config.plist/ACPI/SSDT/Generate/PluginType=true and enable xcpm_idle patch in config.plist/KernelAndKextPatches/KernelToPatch section.
SSDT generated by ssdtPRGen.sh works too.
- GPU
Intel HD 520. Use Lilu/IntelGraphicsFixup, inject ig-device-id=19160000 in Clover.
NVidia 940MX. Since it's Optimus, it has to be disabled. See Patching – graphics below.
NVidia 940MX. Since it's Optimus, it has to be disabled. See Patching – graphics below.
- Display
AUO B156HTN03.8 panel. (Pretty shitty, I recommend replacing with something better)
Gives black screen after wake, requires patched EDID. See Patching – EDID below. (not needed since 10.13.4)
Backlight by AppleBacklightInjector/SSDT-PNLF, see guide here. Note – you have to reboot and rebuild kext cache twice for injector to work so don't panic.
Gives black screen after wake, requires patched EDID. See Patching – EDID below. (not needed since 10.13.4)
Backlight by AppleBacklightInjector/SSDT-PNLF, see guide here. Note – you have to reboot and rebuild kext cache twice for injector to work so don't panic.
- Battery
ACPIBatteryManager + ASUS N55SL/Vivobook DSDT patch.
Some visual glitches. Battery incorrectly reports empty when full and plugged in.
Some visual glitches. Battery incorrectly reports empty when full and plugged in.
- Ethernet
RealtekRTL8111.
- WiFi
Intel 7265NGW. M.2 2230. Not supported, replace. See compatible models and guide here.
I've got Broadcom BCM943602BAED. Note that it has three antenna connectors while laptop has two antennas. Works OOB, use Lilu/AirportBrcmFixup for masking it as Apple and probably some optimization.
- Bluetooth
Requires BrcmFirmwareRepo/BrcmPatchRAM2.
Surprizingly, BT part of original Intel card works OOB. Can be used for temporary internet connection using phone as BT modem.
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. See USB port loadout below.
- Audio
Conexant CS20751/2. Can be used with either Lilu/AppleALC or with patched AppleHDA.
Intel HDMI. In addition requires connector-id patch. See Patching – audio below.
Intel HDMI. In addition requires connector-id patch. See Patching – audio below.
- Keyboard
VoodooPS2Controller for keyboard.
AsusNBFnKeys also for some Fn shortcuts and keyboard backlight. See Fn keys below.
AsusNBFnKeys also for some Fn shortcuts and keyboard backlight. See Fn keys below.
- Touchpad
ELAN 1000, I2C, so VoodooI2C/VoodooI2CELAN. Requires DSDT patches. See Patching – touchpad below.
- 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 settingsSD 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.
DSDT patches
Read guide on patching DSDT here. Carefully and several times.
First, fix errors. I had to use "PARSEOP_ZERO agressive". Also there were couple warnings about "Illegal open scope on external object". While in RehabMan's MaciALS it shows as warning, I had errors in kernel log. To remove, comment out entire blocks related to (in my case) _SB.PCI0.RP01.PXSX.
Second, add generic system patches: add MCHC, fix _WAK v2, fix Mutex, fix IRQ, fix RTC, fx SMBUS, USB3 _PRW 0x6D Skylake.
Third, add battery (ASUS N55SL/Vivobook) and audio (inject layout 3) patches.
There are other patches, read further.
Clover config
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.
Some additional SSDT files can be found here.
As base I used config_HD520_530_540.plist from RehabMan's repo as written above. You would have to disable/remove patches you don't need, add some others, fill in your SMBIOS information and configure boot menu. Also check my config files for examples and patches.
Native NVRAM works with AptioFixMemory (included in latest Clover), no need for EmuVariableUefi.
List of settings with some explanations:
- ACPI/DSDT/Fixes
- Enable only FixHeaders. Enable other patches only if required.
- ACPI/DSDT/Patches
- OSID and _OSI patches. These also require SSDT-XOSI, uncomment Windows 10 line in it (because laptop came with Windows 10)
- HDAS > HDEF, HECI > IMEI, GFX0 > IGPU
- Do not use any EC rename patches, this will break ECDT device. Use SSDT-EC from here.
- ACPI/SSDT/Generate
- PluginType = Yes. This, along with _xpcm_idle patch, is alternative to CPU SSDT generated by ssdtPRGen.sh. I hadn't any problem with it, but it might be less stable than static SSDT. See here for more information.
- Devices/AddProperties
- Three "inject stuff to disable NVidia drivers" patches.
- layout-id=3. Yep, I use this and DSDT patch and Clover Devices/Audio/Inject. Redundant, but doesn't seem to break anything.
- Two "hda-gfx=onboard-1" patches. This is required for HDMI audio.
- Graphics
- EDID/Custom = Yes. This is required to fix black screen after sleep.
- EDID/Inject — See Patching - EDID. DO NOT use mine, it is only to serve as example. It it specific to your hardware.
- Inject — set Yes to Intel
- ig-platform-id — Set to 19160000. 191b0000 should work too.
- KernelAndKextPatches
- AppleIntelCPUPM, AppleRTC, KernelLapic, KernelPm = Yes. Most importantly KernelPm.
- KernelToPatch — _xpcm_idle patch by Pike R. Alpha.
- ForceKextsToLoad — useful for installer only, must be removed after that.
- KernelAndKextPatches/KextsToPatch
- Change 15-port limit to 26 — for USBInjectAll. Use only when preparing correct USB ports loadout. Disable before that and remove after. See here for details.
- HDMI audio — patching framebuffer for correct connector-id. See Patching - audio below.
- 0x19160000 etc. 32MB BIOS... — remove. This is for laptops that doesn't have BIOS options for setting DVTM.
- eDP, port 0000... — remove. This is for laptops with LVDS connector. This model already has eDP.
- change F%uT%04x to F%uTxxxx — required for AppleBacklightInjector. See here for details.
- RtVariables and SMBIOS – see guide for setting up App Store / iMessage here. I use MacBookPro13.1 definition.
Last edited: