Contribute
Register

[Guide]Asus ROG 502vy (Skylake, i7-6700HQ, GTX 980m) High Sierra 10.13.6

Joined
Aug 17, 2016
Messages
92
Motherboard
Asus GL502vy
CPU
i7 6700hq
Graphics
Nvidia GTX980M 8gb
Mobile Phone
Android
ASUS ROG GL502 Guide
Credit to safar46


388762
Working:
  • Battery
  • Sleep
  • QE/CI (Nvidia Web Driver)
  • Keyboard + Backlight
  • Touchpad / ELAN1200
  • USB 2.0/3.0/3.1
  • Speakers, Internal mic and Headphone
  • Web Cam
  • Wi-Fi (replace with Dell BCM94532z NGFF)
  • Ethernet
  • Brightness Control
  • HDMI
  • HDMI Audio
  • Display Port
  • Keyboard Backlight
Not yet working:
  • None
Not Tested:
  • SD Card
Prerequisites:

BCM94532Z NGFF Wi-Fi card (DW1560) for Wi-Fi. (Clover config includes the patch)

Bios Preparation:

Reboot and access the BIOS setup by pressing ESC then select Enter Setup.
  • Disable Secure Boot
  • Disable VT-d
  • Disable Intel Virtualization Technology
Create partition for OS X:

Boot to Windows 10. Install MacDrive from Mediafour to create a partition for OS X. Open MacDrive and click create. You can now create a HFS+ partition on the drive you just installed Windows 10 on. I suggest you give them 50/50 GB storage each.

In my case, since this laptop has 2 Hard Drive (NVMe SSD and SATA HDD) I have dedicated the 256GB nvme to have the HFS+ partition.

Create the USB Installer (16gb or larger required):

Everything is covered at Rehab-man guide on how to create a USB Installer, go read his guide first then come back here to continue with the creation of USB Installer. Link to his guide:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

USB Boot creation as follows:
388764


388765


388766


  • While the usb drive's EFI partition is mounted (or use EFI Mounter), replace the config.plist in the EFI>CLOVER file with the one in the ROG_502>config.plist and put HFSPLUS.efi driver into the drivers64UEFI folder(or use the drivers64UEFI folder attached). place the kexts from "ROG_502>clover_kexts" to EFI>CLOVER>kexts>Other. Open the EFI>CLOVER>kexts folder and delete all the folders apart from "Other".
  • Place the ROG_502> folder onto the usb drive.
  • Boot from the usb drive by pressing ESC at boot. When clover comes up choose the OSX installer. You will get errors but allow a full 5 minutes for it to boot.
Use Disk Utility to erase/format your disk or partition in APFS for OS X then install to it. It will take about 20 minutes.

Post Install:
  • ESC at boot and choose the usb drive again to load clover and choose the partition you just installed to. It will continue installing then reboot.
  • ESC at boot again and choose the usb drive again to load clover then choose the OSX install on the hard drive when clover comes on.
  • Install clover to the hard drive using the default UEFI settings as we done for the USB clover installation (screen shots above)
  • While the SSD's EFI folder (or use EFI Mounter) is mounted open it up in finder and go to EFI>CLOVER and replace the config.plist with the one from the ROG_502>config.plist. Open the EFI>CLOVER>kexts folder and delete all the folders apart from "Other”. place the kexts from the "ROG_502>clover_kexts" folder in there. Copy HFSPLUS.efi driver from the ROG_502> into the CLOVER>drivers64UEFI folder(or use the drivers64UEFI folder attached).
  • Use Kext Wizard to install the kexts in the ROG_502>system_kexts folder to System/Library/Extensions.
  • Rebuild kernel cache.
Code:
sudo kextcache -u /
Patching DSDT And SSDTs:

  • Turn on your laptop and press ESC and boot the Clover boot-loader.
  • Highlight the OS X disk and press “F4” to generate the native ACPI files. (Note: You won’t see anything while pressing F4 - the files are generated silently)
  • Boot OS X and mount EFI partition with Clover Configurator
  • Go to “EFI/Clover/ACPI/” and copy the “origin” folder you just created to your desktop
  • Delete all files from the folder on your desktop that doesn’t start with DSDT or SSDT
  • Copy “ROG_502/refs.txt” into this folder
  • Open terminal and run this command to install iasl (password will be prompted)
Code:
cd ~/Desktop/ROG_502sudo cp iasl /usr/bin
  • Copy the code below into the terminal to disassemble those files into the form we can edit (use your account name in the code)
Code:
cd ~/Desktop/origin
iasl -da -dl -fe refs.txt DSDT.aml
--> This command will create DSDT.dsl files in the origin folder

DSDT Patching:
  • Place ROG_502/MaciASL.app into your Applications folder
  • Open DSDT.dsl (from your origin folder) in MaciASL

    Note: Now we are going to edit this file and compile it back again to use it to load with your system later. It is really important that you don’t make mistake here. You can click on “Compile” to check if you extracted the DSL files correctly. Warnings doesn’t matter but errors do. If you got an error here it means you disassembled the files wrong. Now there are many edits which we are going to do with this file. After each one you can click on “Compile” to check for errors.

    before patching, open MaciASL. Go to the program’s preferences and add this source:
    http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master

  • Click on Patch and apply the following patches (Must use Internet connection):

    [syn] Rename _DSM methods to XDSM
    [bat] Asus G75VW
    [sys] Fix _WAK Arg0 v2
    [sys] Fix PNOT/PPNT
    [sys] IRQ Fix
    [sys] OS Check Fix (Windows 8)
    [sys] SMBUS Fix
    [sys] Skylake LPC

    see 'Before' column in MaciASL and look if '0x6D' exist, then use this patch
    [usb] USB3_PRW 0x6D Skylake (instant wake)
    if not, use [usb] USB3_PRW 0x0D Skylake (instant wake)
Keyboard Backlight Patch:
under this method
Code:
            Method (SCDG, 1, NotSerialized)
            {
            ....
            }
add this
Code:
            Name (BOFF, Zero)
            Method (SKBL, 1, NotSerialized)
            {
                If (Or (LEqual (Arg0, 0xED), LEqual (Arg0, 0xFD)))
                {
                    If (And (LEqual (Arg0, 0xED), LEqual (BOFF, 0xEA)))
                    {
                        Store (Zero, Local0)
                        Store (Arg0, BOFF)
                    }
                    ElseIf (And (LEqual (Arg0, 0xFD), LEqual (BOFF, 0xFA)))
                    {
                        Store (Zero, Local0)
                        Store (Arg0, BOFF)
                    }
                    Else
                    {
                        Return (BOFF)
                    }
                }
                ElseIf (Or (LEqual (Arg0, 0xEA), LEqual (Arg0, 0xFA)))
                {
                    Store (KBLV, Local0)
                    Store (Arg0, BOFF)
                }
                Else
                {
                    Store (Arg0, Local0)
                    Store (Arg0, KBLV)
                }

                Store (DerefOf (Index (PWKB, Local0)), Local1)
                ^^PCI0.LPCB.EC0.WRAM (0x04B1, Local1)
                Return (Local0)
            }

            Method (GKBL, 1, NotSerialized)
            {
                If (LEqual (Arg0, 0xFF))
                {
                    Return (BOFF)
                }

                Return (KBLV)
            }
Click Compile and if you have any errors (warnings don’t matter) try again. Save the file as: DSDT.aml in a new folder on desktop called “SSDTs” and file format: ACPI Machine Language Binary.

SSDT.aml Creation

This is the file we need to create to ensure proper CPU power management and turbo mode. This part refers to [Guide] Native Power Management for Laptops. If you have troubles with creating ssdt.aml you can check there.
  • To prepare we need to use this code in terminal (this will download the SSDT generator)
Code:
curl -o ~/ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/Beta/ssdtPRGen.sh
Now enter this code to give the program permissions
Code:
chmod +x ~/ssdtPRGen.sh
Code:
./ssdtPRGen.sh
  • After the warning type “y” to continue (You should see only one Warning and one Error. If you get more you should check if your SMBIOS is right). Then type “n” twice to finish the process
  • Copy this command to move the created SSDT to your desktop folder (Note: This is easier because the file is in hidden folder. You have to change the username in the code for it to work)
Code:
cp ~/Library/ssdtPRGen/ssdt.aml ~/Desktop/SSDTs/SSDT.aml
--> SSDT.aml should appear in Desktop/SSDTs
  • Copy SSDT.aml to EFI/Clover/ACPI/patched/
  • Shut down your laptop.
SSDT Patching

Go to the “ROG_502” and copy SSDT-UIAC.aml to Desktop/SSDTs folder too
--> You should now have these *.aml files without errors in your SSDTs folder on desktop. If the patched ones are missing .aml add it.
  • DSDT.aml (patched)
    SSDT.aml
    SSDT-UIAC.aml (ROG_502)
  • Open Clover Configurator (or efimounter) and mount internal EFI.
  • Open EFI/Clover/ACPI/patched/ and place all your *.aml files here
  • Open the EFI/Clover/config.plist with Clover Configurator (*make sure it’s from Desktop EFI not USB EFI). Go to the section SMBIOS and click the magic wand icon. Choose the MacBook icon and select MacBook Pro 11,2 in the dropdown menu. Shake a few times with the Week and Unit until you find a Serial that’s not valid (means it isn’t used yet by an official Mac). You can check that here: Check Your Service and Support Coverage - Apple Support
  • Reboot.
Choose Clover To Be Your Default Boot Option
  • Turn of your laptop and enter BIOS settings (Press F8 on boot)
  • Go to Boot section and choose “Add Boot Option” —> Choose your system disk —> Navigate to “EFI/Clover” —> Choose “CLOVERX64.efi” and name it “CLOVER”
Extra

To correct the Alt and Cmd keys just swap the option and cmd modifier keys in the keyboard section in System Preferences.

Fix ELAN1200 Trackpad
Code:
cd /System/Library/Extensions
sudo rm -rf AppleIntelLpssI2C.kext
sudo rm -rf AppleIntelLpssI2CController.kext
Next, install the kext in VoodooI2C folder from ROG_502 folder use Kext Wizard. When you are done, rebuild your kextcache:
Code:
sudo kextcache -i /
Install Nvidia Web Driver for QE/CI

download from here: http://www.macvidcards.com/drivers.html (Check the appropriate model no)
Install it and reboot, then you have full QE/CI

If nvidia not work have black-screen on boot, you need to remove EmuVariableUefi-64.efi from EFI/Clover/drivers64UEFI

Brightness Fix:

DSDT Patch:
fist find the _DSM method for your Graphics card, ignore any devices that are on PCI0 ie: PCI0.GFX0 your looking for graphics cards Under PCI0.PEG0
ie: PCI0.PEG0.GFX0._DSM or PCI0.PEG0.PEGP._DSM
rename the _DSM Method to XDSM and insert this Below
Code:
 Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LEqual (Arg2, Zero))
            {
                Return (Buffer (One)
                {
                     0x03                                        
                })
            }

            Return (Package (0x34)
            {
                "AAPL,backlight-control",
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                      
                },

                "@0,backlight-control",
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                      
                },

                "AAPL,aux-power-connected",
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                      
                },

                "@0,AAPL,boot-display",
                Buffer (One)
                {
                     0x01                                        
                },

                "@0,display-cfg",
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0x36, 0x00                      
                },

                "@1,display-cfg",
                Buffer (0x04)
                {
                     0xFF, 0xFF, 0xFF, 0xFF                      
                },

                "@0,connector-type",
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                      
                },

                "@1,connector-type",
                Buffer (0x04)
                {
                     0x00, 0x08, 0x00, 0x00                      
                },

                "@0,built-in",
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x01                      
                },

                "@0,use-backlight-blanking",
                Buffer (0x04) {},
                "AAPL,gray-page",
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                      
                },

                "AAPL00,inverter",
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x00                      
                },

                "@1,can-hot-plug",
                Buffer (0x04) {},
                "AAPL00,blackscreen.preferences",
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                      
                },

                "AAPL01,blackscreen.preferences",
                Buffer (0x04)
                {
                     0x00, 0x00, 0x00, 0x08                      
                },

                "@0,pwm-info",
                Buffer (0x18)
                {
                    /* 0000 */  0x02, 0x18, 0x00, 0x64, 0x90, 0x59, 0x02, 0x00,
                    /* 0008 */  0x08, 0x52, 0x00, 0x00, 0xA5, 0x1C, 0x00, 0x00,
                    /* 0010 */  0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
                },

                "@0,NVMT",
                Buffer (0x70)
                {
                    /* 0000 */  0x0E, 0x03, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x40, 0x0B, 0x08, 0x07, 0xE0, 0x0B, 0x70, 0x0B,
                    /* 0010 */  0x90, 0x0B, 0x00, 0x00, 0x3C, 0x07, 0x0B, 0x07,
                    /* 0018 */  0x11, 0x07, 0x00, 0x00, 0xF0, 0xA7, 0x21, 0x14,
                    /* 0020 */  0x00, 0x00, 0x00, 0x01, 0xAF, 0x00, 0x00, 0x00,
                    /* 0028 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0030 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0038 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0040 */  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
                    /* 0048 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0050 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
                    /* 0058 */  0x00, 0x00, 0x00, 0x00, 0xBC, 0x02, 0x01, 0x5A,
                    /* 0060 */  0x0A, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
                    /* 0068 */  0x40, 0x0B, 0x08, 0x07, 0x40, 0x0B, 0x08, 0x07
                },

                "NVPM",
                Buffer (0x1C)
                {
                    /* 0000 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0010 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                    /* 0018 */  0x00, 0x00, 0x00, 0x00                      
                },

                "@0,compatible",
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                },

                "@0,device_type",
                Buffer (0x08)
                {
                    "display"
                },

                "@0,display-type",
                Buffer (0x04)
                {
                    "LCD"
                },

                "@0,name",
                Buffer (0x0F)
                {
                    "NVDA,Display-A"
                },

                "@1,compatible",
                Buffer (0x0B)
                {
                    "NVDA,NVMac"
                },

                "@1,device_type",
                Buffer (0x08)
                {
                    "display"
                },

                "@1,name",
                Buffer (0x0F)
                {
                    "NVDA,Display-B"
                },

                "hda-gfx",
                Buffer (0x0A)
                {
                    "onboard-1"
                }
            })
        }
we also need to add a pnlf patch to your DSDT

Code:
Scope (_SB)
    {
        Device (PNLF)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, EisaId ("APP0002"))  // _HID: Hardware ID
            Name (_CID, "backlight")  // _CID: Compatible ID
            Name (_UID, 0x0A)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
        }
    }
thats all thats needed for the acpi files.

Kext Installation:
we now need to create a backlight injector for your display, use the script below to make the injector and install it to System/Library/Extensions.
https://github.com/onejay09/AppleBacklightInjector

Or

Backup original AppleBacklight.kext from S/L/E for KP recovery, if required.
Use the kext Wizard to install the AppleBacklight.kext in to S\L\E folder. When you are done, rebuild your kextcache:
Code:
sudo kextcache -i /
 

Attachments

Last edited:
Joined
Jun 5, 2013
Messages
3
Motherboard
Asus ROG GL502VM (Clover)
CPU
i7-6700HQ/HM170
Graphics
Nvidia GTX 1060 6GB, 1920x1080
Hello, thanks for this guide.
I have a very very similar laptop to yours (GL 502VM, it's the same except for GTX 1060)
I have followed the original guide from safar46 but on High Sierra (it was before you did this), I have managed to make everything work except for HDMI Audio and any audio source from the 3.5mm combo audio jack. If i plug headphones or external speakers on the 3.5mm, I hear distorted audio.
If i plug external speakers on an external monitor connected via HDMI, I don't hear sound at all and the device is not showing in audio settings.

EDIT: Internal audio (laptop speakers) works fine.

How did you manage to make it work?

Thanks
 
Joined
Aug 17, 2016
Messages
92
Motherboard
Asus GL502vy
CPU
i7 6700hq
Graphics
Nvidia GTX980M 8gb
Mobile Phone
Android
Hello, thanks for this guide.
I have a very very similar laptop to yours (GL 502VM, it's the same except for GTX 1060)
I have followed the original guide from safar46 but on High Sierra (it was before you did this), I have managed to make everything work except for HDMI Audio and any audio source from the 3.5mm combo audio jack. If i plug headphones or external speakers on the 3.5mm, I hear distorted audio.
If i plug external speakers on an external monitor connected via HDMI, I don't hear sound at all and the device is not showing in audio settings.

EDIT: Internal audio (laptop speakers) works fine.

How did you manage to make it work?

Thanks
I would suggest you to use the attached AppleALC.Kext in EFI/Clover/Kext/Other along with latest version of codeccommander.kext in S/L/E. i got the audio working along with HDMI Audio using the same method. I had the problem which you have mentioned earliar, at that point i was using voodooHDA because i prefer to have loudspeaker and HDMI audio only.
 

Attachments

Joined
Aug 11, 2019
Messages
1
Can this be modified to work with MSI GT72S Dominator 6QE (980m, i7 6820hk skylake) ?
I want to give this a go but the DSDT/SSDT patches is for this Asus laptop only im guessing. What changes would i need to make?
 
Last edited:
Top