Contribute
Register

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

Status
Not open for further replies.
Hi Rehabman
View attachment 433462
I looked at your name patching guide but my paths are different aim attaching IOReg photo. Please guide its for Catalina
You don't need RehabMan's NVMe patches for Catalina. These patches are only needed for Sierra and early macOS's (IIRC).
 
You don't need RehabMan's NVMe patches for Catalina. These patches are only needed for Sierra and early macOS's (IIRC).
Thanks what should I do so that NVMe shows as internal ssd not external device
 
Thanks what should I do so that NVMe shows as internal ssd not external device
Nothing. I live with it. However, you can change the icon. Search the forum for changing disk icons.
 
Nothing. I live with it. However, you can change the icon. Search the forum for changing disk icons.
icon I have already changed it when I installed Catalina but I read somewhere that I have to create ssdt and add built in into it
 
icon I have already changed it when I installed Catalina but I read somewhere that I have to create ssdt and add built in into it
Hmmm. I haven't heard you need a SSDT. I just change the disk icon by
Right clicking on the drive icon choosing Get Information;​
dragging the new icon on top of the disk icon in the Get Information window; and​
closing the Get Information window.​

I've used this procedure on my Mac Pros and MacBook Pros for years.
 
Hmmm. I haven't heard you need a SSDT. I just change the disk icon by
Right clicking on the drive icon choosing Get Information;​
dragging the new icon on top of the disk icon in the Get Information window; and​
closing the Get Information window.​

I've used this procedure on my Mac Pros and MacBook Pros for years.
With respect, it not simple as changing the disk icon. That is, it's not cosmetic. MacOS truly believes that the NVMe drive is external and EJECTABLE (like a USB drive). In Finder, the Volume actually has an EJECT button in the sidebar.
In @tsrattan's IOREG picture, it shows "Physical Interconnect Location" property is set to External - which makes it ejectable. It's something that should not happen if the drive is bootable.

@tsrattan, there are a couple of solutions:
1. SSDT similar to @RehabMan's SSDT example (minus the spoofing as it's not needed anymore).
2. There's a Lilu Plugin kext called Innie that injects the appropriate properties in any NMVe device (google it).

I just installed (literally arrived this afternoon) a Sabrent Rocket 1TB NVMe and found this issue (external drive for NVME). This is on my ageing Z77X-UP5 system. I bought a NVMe-to-PCIe adapter and installed it in the right-most PCIe x16 slot (as seen from the rear).

I did not want yet another kext (whose sources I cannot find) so I wrote an SSDT based on @RehabMan's guide here and it now shows the NVMe as Internal and it no longer appears on the desktop as an ejectable drive.

Here's is the SSDT:
C-like:
DefinitionBlock ("", "SSDT", 2, "hack", "nvme", 0x00000000)
{
    External (_SB_.PCI0, DeviceObj)

    Scope (\_SB.PCI0)
    {
        Device (PEG2)
        {
            Name (_ADR, 0x00010002)  // _ADR: Address (of PCI Bridge - 3rd PEG slot)
            
            Device (NVMe)
            {
                Name (_ADR, Zero)  // _ADR: Address (first device on this bus)

                Method (\_SB.PCI0.PEG2.NVMe._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                {
                    If (!Arg2) { Return (Buffer () { 0x03 }) }
                    Return (Package ()
                    {
                        "built-in", Buffer () { 0 }
                    })
                }
            }
        }
    }
}

My IOREG now looks like this:
Screenshot 2019-12-10 at 23.26.10.png


Your IOREG looks similar to mine (same PCI addresses and names).
Use the above SSDT (attached as source so you'll need to compile it) and try it.
In my case, the PEG2 device does not exist so I defined it in the SSDT at address 0x00010002 but in your case, it is already defined but should be fine.
If not, then your SSDT would be:
C-like:
DefinitionBlock ("", "SSDT", 2, "hack", "nvme", 0x00000000)
{
    External (_SB_.PCI0.PEG2, DeviceObj)

    Scope (\_SB.PCI0.PEG2)
    {
        Device (NVMe)
        {
            Name (_ADR, Zero)  // _ADR: Address (first device on this bus)
            Method (\_SB.PCI0.PEG2.NVMe._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                If (!Arg2) { Return (Buffer () { 0x03 }) }
                Return (Package ()
                {
                    "built-in", Buffer () { 0 }
                })
            }
        }
    }
}

Try both.
 

Attachments

  • MacNB-SSDT-NVMe.dsl
    747 bytes · Views: 178
Is there an idiot proof guide for installing, from 10.11.6 install, a 970 EVO NVMe M.2 into a H97-D3H + i7-4790K build? I'm getting lost in the updates that have been posted since this thread was born.
 
Hello all,

Here is my configuration: Asus Hyper Mini M.2 // M.2 -> U.2 cable // Samsung PM1733 // OS X 10.11.6

I ran the patch by typing this from the terminal:

./patch_nvme.sh 10_11_6_sec2017-005-15G18013

This is the exact OSX version I have. It made the .kext and gave the MD5 results. No error. Then, I imported it to S/L/E with KextBeast. You can read it in attachment. From then, I'm getting troubles: OSX runs very slowly with big freezes. I just can reach the session login. Those freezes disappear immediatly as soon as I remove the drive (while the PCI-Express Hyper Mini card keeps being plugged). I'm using a dock for hotswap... but cold plug give also the same results.

I removed IONVMeFamily.kext in case it would make a conflict but it doesn't change anything.

This SSD U.2 works fine with Windows and Ubuntu on the same computer so it's not a hardware issue.

Any help appreciated.

Thank you.

EDIT1: Clover and kext attached.
EDIT2: I destroyed the partition of the SSD and reinitialized just as GPT, no change.
EDIT3: Very similar bug here with a Samsung PM1725a using also U.2 interface
EDIT4: I installed IOREG application, HackrNVMeFamily doesn't appear anywhere (when the U.2 is unplugged)

EDIT5: I followed this method to change the sector to 4096 bytes with Smartmontools on Ubuntu. Successfully. So then I restored IONVMeFamily.kext and loaded it using terminal. But I can't still see the drive in the MAC drive utility. Same with smartctl tool from OS X Terminal.
@RehabMan : You said it would launch without your patch if the drive is set to 4096 bytes sector. Do you think it's not the case for OS X 10.11.6?
 

Attachments

  • CLOVER.zip
    6.7 MB · Views: 194
  • HackrNVMeFamily-10_11_6_sec2017-005-15G18013.kext.zip
    61.9 KB · Views: 218
Last edited:
Dear sir,
My PC is dell optiplex 9030 aio, i5 4590s, hd 4600, liteon m.2 2242 nvme 256gb.
I installed successfully catalina on nvme ssd using OC 0.5.8. However, I cannot boot directly from nvme ssd (not supported by my motherboard). Before I used nvmepressdxe.efi I worked. After that my PC had problems, I re-installed macos again, also used the same efi, and config.plist, but cannot boot from nvme, have to boot from usb. I found your guide and followed. When I complied SSDT_NVMe-Pcc.aml in maciasl the errors happened as shown in the photo. COuld you please help me to fix this problem? Thank you!
 

Attachments

  • 97092406_3348780955204216_811731982672199680_o.jpg
    97092406_3348780955204216_811731982672199680_o.jpg
    159.8 KB · Views: 92
  • 97417369_3348763718539273_2314965111728504832_n.jpg
    97417369_3348763718539273_2314965111728504832_n.jpg
    47.8 KB · Views: 85
Status
Not open for further replies.
Back
Top