Contribute
Register

[Guide] HackrNVMeFamily co-existence with IONVMeFamily using class-code spoof

Joined
Oct 8, 2015
Messages
57
Motherboard
Gigabyte Z97x-UDH5
CPU
i5 4690K
Graphics
Gigabyte GTX 980Ti Windforce
Mac
MacBook Pro
Mobile Phone
iOS
Updated from 10.12.5 to 10.12.6 this morning.
Updated Nvidia drivers, and followed Post #1 to update the HackrNVMeFamily*.kext (Installed at S/L/E). I have done the same successfully ever since 10.12.2.

Now I am stuck at boot. I checked the support Thread for Nvidia drivers to see if that is causing the trouble, but found now solution.
As I am not able to reach MacOS on the NVME, I have access to it only from a 10.12.2 installation I use as backup.

I am unfortunately, not able to go forward by self. :( Have I overlooked something?

Attached Clover / screenshot of IOReg showing the position, and the kext I have installed at S/L/E.
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,075
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
The only thing I noticed that isn't working since my apparent update to 10.12.6 is my audio. Could you direct me to a thread that could show me how to fix it? Is it as simple as running multibeast again and reinstalling drivers?
Audio is off-topic here. This thread is for NVMe only.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,075
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Updated from 10.12.5 to 10.12.6 this morning.
Updated Nvidia drivers, and followed Post #1 to update the HackrNVMeFamily*.kext (Installed at S/L/E). I have done the same successfully ever since 10.12.2.

Now I am stuck at boot. I checked the support Thread for Nvidia drivers to see if that is causing the trouble, but found now solution.
As I am not able to reach MacOS on the NVME, I have access to it only from a 10.12.2 installation I use as backup.

I am unfortunately, not able to go forward by self. :( Have I overlooked something?

Attached Clover / screenshot of IOReg showing the position, and the kext I have installed at S/L/E.
The HackrNVMeFamily you attached was not generated with --spoof. Read post #1.
 

Stork

Admin
Staff member
Joined
Sep 21, 2010
Messages
13,084
Motherboard
ASUS ROG MAXIMUS X HERO Z370
CPU
i7-8700K
Graphics
RX 580
Mac
MacBook Pro, Mac mini, Mac Pro
Classic Mac
Power Mac, PowerBook
Mobile Phone
iOS
...

The only thing I noticed that isn't working since my apparent update to 10.12.6 is my audio. Could you direct me to a thread that could show me how to fix it? Is it as simple as running multibeast again and reinstalling drivers?
Off Topic, but yes. See MacMan's explanation > https://www.tonymacx86.com/threads/multibeast-audio-failure-solved.220942/

Please create a thread the Audio forum section for future audio problems and/or questions.
https://www.tonymacx86.com/forums/audio.14/
 
Joined
Nov 23, 2013
Messages
9
Motherboard
GIGABYTE Z97X-UD3H
CPU
i5 4690
Graphics
GeForce GTX 960
Mac
MacBook Pro
Mobile Phone
iOS
Since you can obviously boot from another device (and are not doing this from scratch with a new install), attach all typical "Problem Reporting" files.

Read FAQ, "Problem Reporting"
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Hi, RehabMan.

In order to provide details as much as possible, I did it once again from scratch. Here was what I did this time.

Machine: Gigabyte GA-Z97X-UD3H + i5 4690 + NVMe Samsung Pro 960 SSD
USB Bootable Drive:
Clover Version: v2.4k r4045 EFI bootloader

- Determining the ACPI path of your NVMe device(s)
\_SB.PCI0.RP01.PXSX
Please see the attachment.

- Creating SSDT_NVMe-Pcc.aml
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
External(_SB.PCI0.RP01.PXSX, DeviceObj)
Method(_SB.PCI0.RP01.PXSX._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Return(Package()
{
"class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
"built-in", Buffer() { 0 },
})
}
}
//EOF

Compiled with MaciASL (downloaded from your link at https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/) and saved as SSDT_NVMe-Pcc.aml with ACPI Machine Language Binary. Please see the attachment.

Copied SSDT_NVMe-Pcc.aml to EFI/Clover/ACPI/patched/SSDT_NVMe-Pcc.aml on my USB Bootable Drive.

I am not using config.plist/ACPI/SortedOrder.

- Examples with incomplete ACPI identities
Skipped since Samsung Pro 960 has complete ACPI identities.

- Special injections required for 10.11.x and Samsung 960 EVO (or other 144d:a804 NVMe device)
Skipped since either the SSD or the OS applies.

- Existing _DSM methods
Did it anyway even though I started from scratch with a clean drive.
I don't have a statically patched DSDT.aml in ACPI/patched.

- Creating HackrNVMeFamily*.kext with the spoofed class-code
./patch_nvme.sh --spoof
Determined patch automatically from vanilla IONVMeFamily: 10_12_6
Creating patched HackrNVMeFamily-10_12_6.kext from /System/Library/Extensions/IONVMeFamily.kext
Vanilla MD5 matches expected MD5 entry (c506f1fc40026c0262a736f0be318223)
Patched MD5 matches expected MD5 entry (ff9c55bf11e522dd86e3dc5b2df7ff24)

Copied to EFI/Clover/kexts/Other.

Please see the attachments as well. Thank you for your time.
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,075
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi, RehabMan.

In order to provide details as much as possible, I did it once again from scratch. Here was what I did this time.

Machine: Gigabyte GA-Z97X-UD3H + i5 4690 + NVMe Samsung Pro 960 SSD
USB Bootable Drive:
Clover Version: v2.4k r4045 EFI bootloader

- Determining the ACPI path of your NVMe device(s)
\_SB.PCI0.RP01.PXSX
Please see the attachment.

- Creating SSDT_NVMe-Pcc.aml
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
External(_SB.PCI0.RP01.PXSX, DeviceObj)
Method(_SB.PCI0.RP01.PXSX._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Return(Package()
{
"class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
"built-in", Buffer() { 0 },
})
}
}
//EOF

Compiled with MaciASL (downloaded from your link at https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/) and saved as SSDT_NVMe-Pcc.aml with ACPI Machine Language Binary. Please see the attachment.

Copied SSDT_NVMe-Pcc.aml to EFI/Clover/ACPI/patched/SSDT_NVMe-Pcc.aml on my USB Bootable Drive.

I am not using config.plist/ACPI/SortedOrder.

- Examples with incomplete ACPI identities
Skipped since Samsung Pro 960 has complete ACPI identities.

- Special injections required for 10.11.x and Samsung 960 EVO (or other 144d:a804 NVMe device)
Skipped since either the SSD or the OS applies.

- Existing _DSM methods
Did it anyway even though I started from scratch with a clean drive.
I don't have a statically patched DSDT.aml in ACPI/patched.

- Creating HackrNVMeFamily*.kext with the spoofed class-code
./patch_nvme.sh --spoof
Determined patch automatically from vanilla IONVMeFamily: 10_12_6
Creating patched HackrNVMeFamily-10_12_6.kext from /System/Library/Extensions/IONVMeFamily.kext
Vanilla MD5 matches expected MD5 entry (c506f1fc40026c0262a736f0be318223)
Patched MD5 matches expected MD5 entry (ff9c55bf11e522dd86e3dc5b2df7ff24)

Copied to EFI/Clover/kexts/Other.

Please see the attachments as well. Thank you for your time.
The md5 of your HackrNVMeFamily (in CLOVER.zip) is 5093d2f6b472e6660f5242324ba958a6.
It does not match your output above, but rather matches vanilla 10.12.5 kext.
In fact, looking at the rest of the kext content, it *is* vanilla 10.12.5 IONVMeFamily.kext, just renamed to HackrNVMeFamily-10_12_6.kext.

Without correct HackrNVMeFamily, not expected to work.

The separate HackrNVMeFamily-10_12_6.kext.zip does contain a correctly patched kext. But that doesn't help you if you are not using it in EFI/Clover/kexts/Other.
 
Joined
Nov 23, 2013
Messages
9
Motherboard
GIGABYTE Z97X-UD3H
CPU
i5 4690
Graphics
GeForce GTX 960
Mac
MacBook Pro
Mobile Phone
iOS
The md5 of your HackrNVMeFamily (in CLOVER.zip) is 5093d2f6b472e6660f5242324ba958a6.
It does not match your output above, but rather matches vanilla 10.12.5 kext.
In fact, looking at the rest of the kext content, it *is* vanilla 10.12.5 IONVMeFamily.kext, just renamed to HackrNVMeFamily-10_12_6.kext.

Without correct HackrNVMeFamily, not expected to work.

The separate HackrNVMeFamily-10_12_6.kext.zip does contain a correctly patched kext. But that doesn't help you if you are not using it in EFI/Clover/kexts/Other.
Thanks for looking into this, RehabMan. How come that ./patch_nvme.sh --spoof created HackrNVMeFamily for 10.12.5 instead of 10.12.6? Does the version of the OS that I ran this script matter? I believe I did run it on a 10.12.6 mbp. Also how did you calculate MD5 for a directory?
 
Joined
Nov 23, 2013
Messages
9
Motherboard
GIGABYTE Z97X-UD3H
CPU
i5 4690
Graphics
GeForce GTX 960
Mac
MacBook Pro
Mobile Phone
iOS
Thanks for looking into this, RehabMan. How come that ./patch_nvme.sh --spoof created HackrNVMeFamily for 10.12.5 instead of 10.12.6? Does the version of the OS that I ran this script matter? I believe I did run it on a 10.12.6 mbp. Also how did you calculate MD5 for a directory?
I re-copied HackrNVMeFamily kext after removing the old incorrect version. Now it can detect the SSD! Thanks for the hint, RehabMan. However, it is still good to know how you calculate the MD5 so that I can check it myself in the future. Millions of thanks!

Another question, does ACPI value change if I use the same motherboard and same SSD (not multiple of course)?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,075
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Thanks for looking into this, RehabMan. How come that ./patch_nvme.sh --spoof created HackrNVMeFamily for 10.12.5 instead of 10.12.6? Does the version of the OS that I ran this script matter?
Yes.
As the script patches the vanilla IONVMeFamily in order to create HackrNVMeFamily, you can only create HackrNVMeFamily-10_12_6.kext from a system actually running 10.12.6.
If you run it on 10.12.5, you get HackrNVMeFamily-10_12_5.kext.

I believe I did run it on a 10.12.6 mbp.
Evidently not.

Also how did you calculate MD5 for a directory?
I didn't.
The md5 is the md5 sum for the binary at HackrNVMeFamily*.kext/Contents/MacOS/HackrNVMeFamily*

Another question, does ACPI value change if I use the same motherboard and same SSD (not multiple of course)?
Same board, same BIOS version, same BIOS settings, same slot, should be same ACPI path.
 
Top