[Guide] Asus GL551JW (and similar) (via hotpatching)

Mar 26, 2011
Classic Mac
Mobile Phone
Updated to 10.14.3 working fine!

Hiya all,

So I hackintosh'd my laptop a while back to run High Sierra, with help from @RehabMan. This setup has lasted me through to 10.14.3, and hopefully will beyond, with little modifications.

This is a guide for anyone with a GL551, or similar Asus laptops (e.g. same generation CPU etc).
This guide may also help those with HD4600m problems.

Laptop Specs
  • i7-4720HQ
  • NVidia 960m (disabled), with Intel HD 4600m
  • DVD drive swapped for HDD caddy, and 1TB SSD to replace original 1TB HDD
  • WiFi card swapped to a Broadcom BCM4352 (standard card isn't compatible)
What works
  • Everything except for the SD Card Reader (although there is apparently some work on this but it breaks sleep), and microphone via headphone jack (never looked into fixing it).
My GitHub Repo
Here you can view my configs. There are also scripts to automate the tedious process of downloading kexts etc.

Installing macOS
So, I'll assume you've read RehabMan's guide here, which was the foundation for my configs. Basically follow that to produce the USB installer, with the following modifications:
  1. Install these kexts into /EFI/CLOVER/kexts/Other/:
    • VirtualSMC, along with SMCBatteryManager, which replaces FakeSMC, and means I don't need a battery patches SSDT.
    • FakePCIID + FakePCIID_Broadcom_WiFi + FakePCIID_XHCIMux, for various of fixes. The Broadcom is only necessary if you're using the same WiFi card/one that needs it.
    • RealtekRTL8111, for ethernet.
    • Lilu, for WhateverGreen.
    • WhateverGreen, to fix various display issues.
    • ApplePS2SmartTouchPad, for the keyboard. I don't think I'm allowed to link this one, but I do have a customised configured copy in my repo, alternately a google search will find it).
  2. Copy the configs/config-installer.plist file to /EFI/CLOVER/, and rename it to config.plist:
    1. If you want iMessage/FaceTime to work (not guaranteed), you'll need to fill in SMBIOS and RT Variable with valid data. There are plenty of guides around, but success varies.
  3. Alternately, if you run run, these are organised in an output folder. If you edit, then run, the SMBIOS and RT Variables are filled in and the configs are stored in output/efi. Or to do everything in one go, run

  4. A note on APFS: I opted to use APFS for the SSD, meaning I have not enabled TRIM. If you choose to install with HFS+, you'll need to enable TRIM.

Post Install Setup
After installing macOS, you'll want to install Clover to your boot drive, and install your required kexts to /L/E, followed by rebuilding your kextcache.

Your required kexts depend on your hardware. I installed the following:
If you used my download_kexts or generate_output scripts, these should already be in the output folder.

Install by copying to /Library/Extensions as root, else permissions will get messed up.
sudo cp -R output/local/kexts/*.kext /Library/Extensions/
Then rebuild kextcache.
sudo kextcache -i /
You should then copy /configs/config.plist (or output/efi/config.plist if you ran the my patch_plists or generate_output scripts) to your boot drive clover folder, and make these changes:
  1. Disable unnecessary device properties - you may not need the same framebuffer patches, or audio layout id.
  2. Disable the unnecessary DSDT patches (they are explained in more detail in the hotpatching section below):
    1. _OFF -> XOFF + _REG -> XREG are for disabling MY dedicated GPU. Your patches may differ, so disable these and refer to the hotpatching section below on how to modify them. They must be combined with SSDT-DGPU.
    2. _Q0E -> XQ0E + _Q0F -> XQ0F are for the brightness and keyboard backlight function keys if you are using ApplePS2SmartTouchPad and AsusNBFnKeys. They must be combined with SSDT-PS2K.
    3. Note that if you leave the 2nd patch from the top (_OSI -> XOSI) enabled, you MUST add SSDT-XOSI to you patched folder.
This should be sufficient to get a booting macOS install, but in order to fix the numerous bugs, you'll need to either do static DSDT/SSDT patching, or use hotpatching, as covered below in more detail.

This is where everything gets more complex. Hotpatching is basically a nicer alternative to static patching, as with BIOS updates etc, things are less likely to break. I'll assume you've read the guide on static patching, and have your DSDT/SSDTs extracted via Clover, and disassembled with iasl.
Before continuing, please read RehabMan's guide, specifically the 'Redirect/Rename and Replace' sections.

So first off, there are a three generic DSDT patches, listed here:
    This is important as it basically fakes that macOS is a version of Windows to the BIOS, ensuring things load if necessary.
    This one enables powermanagement on Haswell (and later) CPUs. It's basically an alternative to generating one.
For these, simply compile the dsl files, and add the aml's to /EFI/CLOVER/ACPI/patched. You'll also need to make sure the _OSI -> XOSI patch is enabled in the config plist. Next are the more individual fixes.

Patching for LPC
In the event you have an incompatible CPU, and AppleLPC.kext doesn't load, you can inject a custom ID instead. This was the case for me, so SSDT-XLPC fixes it. Note that my version is for Haswell CPUs. If you need it, just compile it and drop the aml in /EFI/CLOVER/ACPI/patched.

Disabling the NVidia GPU
My completed patch can be found here. Please note that yours may differ, so don't just copy it and hope it works.
To disable your GPU, you need to call the _OFF method for it. First locate where this _OFF method is, as per RehabMan's guide:
grep -l Method.*_OFF *.dsl
Also find the _INI methods:
grep -l Method.*_INI *.dsl
Now chances are some of the same files will show up here, so open one up and search for the _INI nethod. From my experience the GPU will be down a path such as '\_SB.PCI0.PEG0.PEGP'. Next find the respective _OFF method down that same path.

In my SSDT, it was defined as:
Method (_OFF, 0, Serialized)  // _OFF: Power Off
    If (LEqual (CTXT, Zero))
        \_SB.PCI0.LPCB.EC0.SPIN (0x96, Zero)
        If (LNotEqual (GPRF, One))
            Store (VGAR, VGAB)
        Store (One, CTXT)
    SGOF ()
Now you need to check what this method calls. If you're lucky, it won't call anything involving the EmbeddedController (EC, or EC0 generally). I wasn't as lucky (see the SPIN call above). It's important that you also check any other methods that are called too, as sometimes these will call one involving the EC.

Assuming you're lucky, you'll just need to create your own device that calls the _OFF method, such as:
DefinitionBlock ("", "SSDT", 2, "hack", "DGPU", 0)

Device(ZRD1) // Custom device to call _OFF on _INI
        Name(_HID, "ZRD10000")
            If (CondRefOf(\_SB.PCI0.PEG0.PEGP._OFF)) { \_SB.PCI0.PEG0.PEGP._OFF() }
In the event that you're unlucky (e.g. me), you'll need to override the _OFF method, removing the calls to the EC, and then patch the _REG method of the EC to call it instead. Here you'll use the rename and replace technique, renaming the _OFF and _REG methods and implementing your own in SSDT-DGPU.dsl to replace them.

To rename you'll use the rename section of Clover's DSDT patches. To know what to rename it's easiest to disassemble the related DSDT/SSDTs with the '-l' flag, to produce a mixed listing. This will show you both the disassembled code, and the related bytecode.

For example, the _REG method in my DSDT for the EC was:
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability

  AA85: 14 12 5F 52 45 47 02                             // .._REG.

                If ((Arg0 == 0x03))

  AA8C: A0 0B 93 68 0A 03                                // ...h..
Thus to rename this method from _REG -> XREG, the patch I used was 5F52454702A00B93680A03 -> 5852454702A00B93680A03. You will need to convert this to base64, then add it to Clover. This is one of the patches you disabled/removed when installing.
Note that you don't need that _REG part is only 5F524547, but the rest is part of the method definition, and ensures I don't change any other _REG methods. For the _OFF method I did the same, this time renaming it to XOFF.
Make sure you use your own bytecode, as this likely won't be the same.

Next you need to create your own _OFF and _REG methods at the same ACPI paths. This is best done by copying the previous one's out under their own scopes, then cutting the call to the EC method, and replacing it in the _REG method. Note you'll also want to call your renamed _REG method so that it does what it originally did too. Here's mine after the aforementioned changes:
    External(_SB.PCI0, DeviceObj)
        External(PEG0.PEGP, DeviceObj)
            External(CTXT, IntObj)
            External(GPRF, IntObj)
            External(VGAB, BuffObj)
            External(VGAR, FieldUnitObj)
            External(SGOF, MethodObj)
            Method (_OFF, 0, Serialized) // Copied _OFF method, without EC call
                If (CTXT == Zero)
                    If ( GPRF != One)
                        VGAB = VGAR
                    CTXT = One
                SGOF ()

        External(LPCB.EC0, DeviceObj)
            OperationRegion(ECR4, EmbeddedControl, 0x00, 0xFF)

            External(XREG, MethodObj) // renamed method
            External(SPIN, MethodObj)
            Method (_REG, 2) // replacement for above renamed
                XREG(Arg0, Arg1) // call the original
                If(Arg0 == 3 && Arg1 == 1) // also call spin as _OFF doesn't
                    SPIN (0x96, Zero)
Now compile this, and drop the aml in /EFI/CLOVER/ACPI/patched, then reboot. If all goes well, there won't be an NVidia device under System Information -> Graphics and Displays.

Fixing the Internal GPU (HD4600 mobile)
The HD4600m seems to be a common issue on a variety of laptops. There are a variety of things to try, depending on your issue. Start with my SSDT-IGPU, and make changes as necessary, or write your own from scratch.

For this SSDT, I combined the Intel FakeID injection, and also the PNLF device for brightness, as I felt they go together.
For all mobile HD4600s, it is necessary to inject the ID as 0x04128096, as is done in this file. The differences are in the ig-platform-id. There are a few different values to try, depending on your issue.

I no longer handle FakeID injection here, and instead rely on clover. This SSDT does still handle the PNLF device, for brightness control. You will most likely need to change the _UID value on line 14, and the LMAX value on line 42.

I'd recommend either enabling CSM in your BIOS, or changing the Clover screen resolution to 1024x768. This seems to help with the glitchy loading and login screens, which require a sleep/wake cycle to fix. Next depending on your laptop, try the following ig-platform-ids in the clover plist: 0x04260000 (mine), 0x0a260006, 0x0d260007. With each ig-platform-id, you will need the accompanying LMAX and _UID values, to update the SSDT-IGPU with. It may be useful to look at the SSDT-PNLF in the repo for AppleBrightnessFixup, found here.

If you're lucky everything will work wonderfully, including brightness. If not, change the ig-platform-id value in clover, and update the SSDT-IGPU values, then try again.

Note: I used 0x04260000 as when I had it set as either of the above, I faced a weird issue where my screen would flicker on and off every so often. If you face the same issue, I suggest you try it too. If you're on a different laptop, make the modifications above, trying ig-platform-id as '0x0a260006' first, as it seems the most common.

Note 2: If you are using ApplePS2SmartTouchpad, you'll require DSDT patches for the brightness keys to work, as are detailed below.

Fixing Audio
This doesn't necessarily need to be a DSDT patch, as you can use Clover to inject the layout ID, but I chose to do it as one as I needed CodecCommander, which needs a custom configuration for AppleALC compatibility.
I now handle the layout-id injection via clover device properties. The HDEF SSDT simply holds the CodecCommander config, to fix wake-sleep and dual boot audio loss.

Fixing Brightness and Keyboard Backlight Keys (For ApplePS2SmartTouchpad + AsusNBFnKeys)
With ApplePS2SmartTouchpad, another DSDT patch must be applied to get the function keys to work, being SSDT-PS2K. This likely generic, although you may need to modify the ACPI paths, as detailed on the forum for AsusNBFnKeys. After this, just compile and add the aml to the patched folder.

Hope this helps someone,
Any questions, just ask!

(If you need help with a specific issue, see the problem reporting section of the FAQ, and include the mentioned files).

Hi, plasmaboltrs
Can you please share your EFI file, i have exactly the same laptop...Many thanks for you work and share.