Contribute
Register

The Perfect Customac-Pro: X99-A II, i7-6950X, 128GB G.Skill TridentZ, Aorus GTX 1080 TI Xtreme

Status
Not open for further replies.
Hi beep, can you explain to the unexperienced users step by step how to derive from your/Rehabman's SSDT code for nvme quoted above a fully working SSDT-NVMe-Pcc.aml? Also Rehabman's Guide is not very explicit regarding the individual steps.

Many thanks in advance and cheers!

0. You need to have an OS X running on another drive.

1. Make sure you have the original untouched IONVMeFamily.kext file in S/L/E on system's partition.

2. Download the script from Rehabman's github – https://github.com/RehabMan/patch-nvme
Code:
mkdir ~/Projects && cd Projects
git clone https://github.com/RehabMan/patch-nvme.git patch-nvme.git
cd patch-nvme.git

3. Run it with --spoof parameter eg.
Code:
./patch_nvme.sh --spoof 10_12_3
... with the proper OS X version set as a parameter.

4. Copy the created "HackrNVMeFamily-10_11_5.kext" into the system's S/L/E or L/E or Clover's kexts folder.

5. Copy and compile the code below using maciASL – You have to set ACPI 6.1 in MaciASL->Preferences->iASL.
The address for nvme device on Asus X99-a II is "_SB.PCI0.BR1B.H000"
Code:
DefinitionBlock ("", "SSDT", 2, "hack", "NVMe-Pcc", 0x00000000)
{
    External (_SB.PCI0.BR1B.H000, DeviceObj)    // (from opcode)
    Method (_SB.PCI0.BR1B.H000._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
    {
        If (LNot (Arg2))
        {
            Return (Buffer (One)
            {
                 0x03                                      
            })
        }

        Return (Package (0x04)
        {
            "class-code",
            Buffer (0x04)
            {
                 0xFF, 0x08, 0x01, 0x00                    
            },

            "built-in",
            Buffer (One)
            {
                 0x00                                      
            }
        })
    }
}
The device address on other systems needs to be found using windows or linux as described in Rhabman's guide.
If you have two nvme disks duplicate the code with the different address of the next device:
Code:
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.BR1B.H000, DeviceObj)
    Method(_SB.PCI0.BR1B.H000._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
        })
    }
    External(_SB.PCI0.BR2A.H000, DeviceObj)
    Method(_SB.PCI0.BR2A.H000._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
        })
    }
}

6. "Save As" compiled code with "ACPI Machine Language Binary" format. Copy the SSDT file into "/EFI/CLOVER/ACPI/patched" folder in your system's EFI partition. You can name it anyhow since the newest versions of Clover can load SSDT files with different naming like "SSDT-NVMe-Pcc.aml"

7. Reboot... after it the nvme m.2 device/s should be visible/available in Disk Utility. Running this method you should be able to update the system without issue. After update just repeat the step 3 and 4.

8. Now you can clone the System to Nvme drive and boot with it or use it for another purpose.

Everything in detail is described here:
https://github.com/RehabMan/patch-nvme
https://www.tonymacx86.com/threads/guide-hackrnvmefamily-co-existence-with-ionvmefamily-using-class-code-spoof.210316/

maciASL – https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads

This was tested with two Samsung 960 Pro 512 M.2 drives. Write speed is around 2000MB/s. Read is around 3000 MB/s
---------------------------------

Beep, there must be some error in your ssdt code for nvme. MaciASL complains: Line 1, code 6126, syntax error, unexpected '{', expecting PARSEOP_DEFINITIONBLOCK and premature End-of-file

Can you check and comment on that?

Many thanks in advance

You should use Rehabman's version of MaciASL, which is linked above.
Don't forget to select ACPI 6.1 in MaciASL->Preferences->iASL.
 
0. You need to have an OS X running on another drive.

1. Make sure you have the original untouched IONVMeFamily.kext file in S/L/E on system's partition.

2. Download the script from Rehabman's github – https://github.com/RehabMan/patch-nvme
Code:
mkdir ~/Projects && cd Projects
git clone https://github.com/RehabMan/patch-nvme.git patch-nvme.git
cd patch-nvme.git

3. Run it with --spoof parameter eg.
Code:
./patch_nvme.sh --spoof 10_12_3
... with the proper OS X version set as a parameter.

4. Copy the created "HackrNVMeFamily-10_11_5.kext" into the system's S/L/E or L/E or Clover's kexts folder.

5. Copy and compile the code below using maciASL – You have to set ACPI 6.1 in MaciASL->Preferences->iASL.
The address for nvme device on Asus X99-a II is "_SB.PCI0.BR1B.H000"
Code:
DefinitionBlock ("", "SSDT", 2, "hack", "NVMe-Pcc", 0x00000000)
{
    External (_SB.PCI0.BR1B.H000, DeviceObj)    // (from opcode)
    Method (_SB.PCI0.BR1B.H000._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
    {
        If (LNot (Arg2))
        {
            Return (Buffer (One)
            {
                 0x03                                     
            })
        }

        Return (Package (0x04)
        {
            "class-code",
            Buffer (0x04)
            {
                 0xFF, 0x08, 0x01, 0x00                   
            },

            "built-in",
            Buffer (One)
            {
                 0x00                                     
            }
        })
    }
}
The device address on other systems needs to be found using windows or linux as described in Rhabman's guide.
If you have two nvme disks duplicate the code with the different address of the next device:
Code:
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.BR1B.H000, DeviceObj)
    Method(_SB.PCI0.BR1B.H000._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
        })
    }
    External(_SB.PCI0.BR2A.H000, DeviceObj)
    Method(_SB.PCI0.BR2A.H000._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
            "built-in", Buffer() { 0 },
        })
    }
}

6. "Save As" compiled code with "ACPI Machine Language Binary" format. Copy the SSDT file into "/EFI/CLOVER/ACPI/patched" folder in your system's EFI partition. You can name it anyhow since the newest versions of Clover can load SSDT files with different naming like "SSDT-NVMe-Pcc.aml"

7. Reboot... after it the nvme m.2 device/s should be visible/available in Disk Utility. Running this method you should be able to update the system without issue. After update just repeat the step 3 and 4.

8. Now you can clone the System to Nvme drive and boot with it or use it for another purpose.

Everything in detail is described here:
https://github.com/RehabMan/patch-nvme
https://www.tonymacx86.com/threads/guide-hackrnvmefamily-co-existence-with-ionvmefamily-using-class-code-spoof.210316/

maciASL – https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads

This was tested with two Samsung 960 Pro 512 M.2 drives. Write speed is around 2000MB/s. Read is around 3000 MB/s
---------------------------------



You should use Rehabman's version of MaciASL, which is linked above.
Don't forget to select ACPI 6.1 in MaciASL->Preferences->iASL.

Beep, I downloaded RehabMan-MaciASL-2017-0117.zip, selected ACPI 6.1 in MaciASL and I exactly get as before also now the error message: "Line 1, code 6126, syntax error, unexpected '{', expecting PARSEOP_DEFINITIONBLOCK and premature End-of-file" with your ssdt code for nvme. MaciASL does not compile your ssdt code properly.
 
Thireus, one more question. One of ptzulu's files seems to patch the IOPCIFamily.kext for the 5960X. See the pic below.

View attachment 243013

Does this interfere with the SSDT for the 6950X generated with ssdtPRGen? Can the 5960X patch be removed? If so, how to remove it?

This patch is left enabled for my clover. I'm not entirely sure what it fixes btw. I've seen others with 6950x using it so I left it there. Do you know what it fixes exactly and what are the expected behaviours if removed?

I'm playing with manual XMP OC atm, my latest geekbench score: https://browser.geekbench.com/v4/cpu/2135216

Also I noticed that the auto OC of AI Tweaker messes up with NVMe perfs, I think I know the culprit: CPU Strap that was boosted to 102Mhz instead of 100Mhz (I still have to run some tests but I'm quite sure that's this option that messes up with NVMe perfs, mine went down to 1600Gps from 2000Gps writing, about the same loss for reading speed, now with 100Mhz everything is back to normal Samsung 960 pro speeds).
 
Last edited:
This patch is left enabled for my clover. I'm not entirely sure what it fixes btw. I've seen others with 6950x using it so I left it there. Do you know what it fixes exactly and what are the expected behaviours if removed?

I'm playing with manual XMP OC atm, my latest geekbench score: https://browser.geekbench.com/v4/cpu/2135216

Also I noticed that the auto OC of AI Tweaker messes up with NVMe perfs, I think I know the culprit: CPU Strap that was boosted to 102Mhz instead of 100Mhz (I still have to run some tests but I'm quite sure that's this option that messes up with NVMe perfs, mine went down to 1600Gps from 2000Gps writing, about the same loss for reading speed, now with 100Mhz everything is back to normal Samsung 960 pro speeds).

No idea at present what it fixes exactly nor where it comes from. :crazy: I only noticed that there is some active cpu power management even without the SSDT created with ssdtPRGen.sh. And I am somewhat afraid that there might be some crosstalk in between them.

Your last geekbench results are amazing! :clap: In any case, we are certainly eager to receive your detailed power management instructions as soon as possible, hopefully including the optimized OC BIOS settings, hahaha! :wave:
 
Last edited:
Beep, I downloaded RehabMan-MaciASL-2017-0117.zip, selected ACPI 6.1 in MaciASL and I exactly get as before also now the error message: "Line 1, code 6126, syntax error, unexpected '{', expecting PARSEOP_DEFINITIONBLOCK and premature End-of-file" with your ssdt code for nvme. MaciASL does not compile your ssdt code properly.

This is strange. I'm compiling it without issue:
compile ok.jpg


Here is compiled file:
 

Attachments

  • nvme_patch.aml
    109 bytes · Views: 98
This patch is left enabled for my clover. I'm not entirely sure what it fixes btw. I've seen others with 6950x using it so I left it there. Do you know what it fixes exactly and what are the expected behaviours if removed?

I'm playing with manual XMP OC atm, my latest geekbench score: https://browser.geekbench.com/v4/cpu/2135216

What about sleep. Is it working?
 
This is strange. I'm compiling it without issue:
View attachment 243132

Here is compiled file:

With your attached nvme_patch.aml everything works fine. :thumbup::clap: In the meanwhile I am also able to successfully compile your SSDT code by my own.:thumbup:

Perfect work! Many thanks for your help!
 
Thireus, one more question. One of ptzulu's files seems to patch the IOPCIFamily.kext for the 5960X
Does this interfere with the SSDT for the 6950X generated with ssdtPRGen? Can the 5960X patch be removed? If so, how to remove it?
That's a patch based on Brumbaer's work and modified for Sierra by okrasit. As far as I know, the system won't boot without it. To test, simply remove it from config.plist (or put the flag Disable from Clover Configurator). Make sure you have some alternative way to get back on desktop, like a bootable usb ped drive or something

Did anybody with X99-A II and nVidia GTX 980 TI try a multi-monitor configuration on Sierra?
 
With your attached nvme_patch.aml everything works fine. :thumbup::clap: In the meanwhile I am also able to successfully compile your SSDT code by my own.:thumbup:

Perfect work! Many thanks for your help!

No problem. Now we have to make the sleep working. :)
 
Status
Not open for further replies.
Back
Top