Jump to content

Patch for using NVMe under macOS Sierra is ready.


1,382 posts in this topic

Recommended Posts

At least for jeanchrijaz-EFI.zip, HackrNVMeFamily was generated without --spoof.

 

This is one of those cases where you really have to pay attention to detail. If you get just one thing wrong, it doesn't work.

Didn't check if the HackrNvmeFamily was generated without spoof! My bad.

thanks for your help...

I'm unlucky nothing works

with EFI & EFI v2 my system won't start

 

I don't know how to do it :(

 

ok.... all work on my configuration

USB3, messages, airdrop, power nap, handoff apple store etc....

congratulation for your great work

but never mind for NVme speed transfers... I will stay like this

Thank you very much for trying to help me

now it gets too complicated for me and I don't have skills to solve the problem

 

Generate a SPOOFED HackrNVMeFamily.kext then place it inside EFI->CLOVER->kexts->other in either of the EFI or EFIv2 I've provided!

 

The one you provided me doesn't have spoof! You need spoof! More spoof! 

Link to comment
Share on other sites

Didn't check if the HackrNvmeFamily was generated without spoof! My bad.

Generate a SPOOFED HackrNVMeFamily.kext then place it inside EFI->CLOVER->kexts->other in either of the EFI or EFIv2 I've provided!

 

The one you provided me doesn't have spoof! You need spoof! More spoof! 

i use EFI v2 now with a spoofed HackrNVMeFamily.kext my system boot fine !!!!

but.... always in 5Gb/s transfert.... grrrrr !!!!!

 

I don't understand ... under windows it was perfectly recognized

And speeds were right

 

my case is hopeless.... forsake

post-1204234-0-28850100-1484873857_thumb.png

Link to comment
Share on other sites

Tomorrow I try to do a clean install....

Not a problem with the installation, but how the OS is working with your current hardware. 

 

If it were me, I'd test it in Sierra 10.12.2 and see if I get the same slow result (just set up a "test bench" harddrive and not something for daily-use). Since you've already tested it in Windows 10 and get full read/write speeds, Mac OS might need to be upgraded, or your BIOS might need an update....

 

...or come to the conclusion that, unfortunately, your motherboard/hardware doesn't configure a NVMe drive well in a Unix environment.

 

After reading through this thread, there are multiple people who have the same slow read/write issues as you do.

Link to comment
Share on other sites

Not a problem with the installation, but how the OS is working with your current hardware. 

 

If it were me, I'd test it in Sierra 10.12.2 and see if I get the same slow result (just set up a "test bench" harddrive and not something for daily-use). Since you've already tested it in Windows 10 and get full read/write speeds, Mac OS might need to be upgraded, or your BIOS might need an update....

 

...or come to the conclusion that, unfortunately, your motherboard/hardware doesn't configure a NVMe drive well in a Unix environment.

 

After reading through this thread, there are multiple people who have the same slow read/write issues as you do.

I just tried a clean install and you are right, nothing changes...

I have a test disk and tomorrow I will try to install Sierra on it

If there is no change I will buy a PCIe card

and I'll probably need a purchase advice for not making a mistake

 

there is a new secutity update for El Capitan (Also called 10.11.6) https://support.apple.com/kb/DL1908?locale=fr_FR

Do you think I can do it? spoof may change with it

 

Again thank you very much for the time you spent with my issues

Your EFI file with patched DSDT is perfect

I don't have enough knowledge to do it myself

And congratulations to RehabMan for his work but he looks less patient than you lol (just kidding)

 

 

 

Link to comment
Share on other sites

I just tried a clean install and you are right, nothing changes...

I have a test disk and tomorrow I will try to install Sierra on it

If there is no change I will buy a PCIe card

and I'll probably need a purchase advice for not making a mistake

 

there is a new secutity update for El Capitan (Also called 10.11.6) https://support.apple.com/kb/DL1908?locale=fr_FR

Do you think I can do it? spoof may change with it

 

Again thank you very much for the time you spent with my issues

Your EFI file with patched DSDT is perfect

I don't have enough knowledge to do it myself

And congratulations to RehabMan for his work but he looks less patient than you lol (just kidding)

 

 

 

Any sort of updates, I always do to a test SSD. For example, I clone my primary to a test SSD, then update the test SSD. If it breaks the test SSD, then I know I can't update. It's a simple way to see changes without messing with my day-to-day tasks (for example, working on a web app where I can't afford the downtime of having to reformat, install, and reconfigure my environment from scratch). So, I reiterate, if you're going to update, do so with a TEST ssd. Not your primary.

 

Unfortunately, I can't help you out with the buying a correct PCIe card, as I don't use one. My NVMe is in the m.2 port on my motherboard. Only advice, would be to be careful about throwing in more money to make something work!

 

As for the EFI with the modified DSDT.aml, if it works 100% (meaning, you still get CPU PM and correct CPU frequency, USBs still work... everything is working and functional), then I'd recommend you use that file over EFIv2 (DSDT patches).

 

Since I changed your config.plist, you should check and see if you're getting CPU PM/Frequencies by running this command:

sysctl machdep.xcpm 

You'll want to focus on these results:

machdep.xcpm.vectors_loaded_count: 1 // injected frequency vectors 0=>none, 1=>loaded
machdep.xcpm.bootpst: 37 // max turbo boost according to chip specs and/or overclock specs
machdep.xcpm.mode: 1 // xcpm stepping/pm, 0=>not loaded, 1=>loaded 

You can also see more info about CPU PM (in particular Min Freq/Max Freq, CStates/PStates, etc) by running AppleIntelInfo.kext via terminal (follow my guide here on how build/compile and run).

 

 

Other than that, best of luck. If you need more help, I'll try to help with I can, but no guarantees.

Link to comment
Share on other sites

I am trying to use Plextor m8pe but without success. I tried changing pci vendor ids with rehabman's hackr kext with no luck. Tried also NVMeP both in 10.12.0 and 10.12.1 again nothing. Will try with -a but I don't think it will work. Any ideas. Can someone help?

Thanks

 

Couldn't make it work on Sierra, but running El Capitan on it, using NVMeGeneric.kext

Link to comment
Share on other sites

For those who have issue on Disk Utility identified issue on some LiteOn, Plextor, Hynix NVMe.

 

Here's the code we need to change

test    cl, 0x10
jne     0x41d1

search for 

0xF6 0xC1 0x10
0x0F 0x85 0x1C 0x01 0x00 0x00

change the value 0x10 into 0x01 or 0x02, 0x04 and 0x08 to see which one works for your drive.

 

For example, here's the patch I found for LiteOn CX2-1024

Comment: IONVMeFamily Preferred Block Size 0x10 -> 0x01 (c) Pike R. Alpha 
Name:    IONVMeFamily
find:    <f6c1100f 851c0100 00>
replace: <f6c1010f 851c0100 00>

Then enjoy your NVMe ;)

post-950366-0-63225600-1485276482_thumb.png

 

Good luck,

syscl


One of my friend has lent her new MacBook9,1 for me, and I soon found some properties rooted in Device (SSD0):

 

"deep-idle", here's the patch I applied for my XPS 13 9350:

#Created by syscl for Dell XPS 13 9350 patches
#Note: SSD0 must present under RP09
#NVMe _DSM stripped down credit Pike R. Alpha
#NVMe "deep-idle" property stripped down credit syscl
#NVMe Eliminate "sata-express-power-off" and "ssd-off-in-S4" credit syscl

into device label SSD0 parent_adr 0x001D0000 remove_entry;
into device name_adr 0x001D0000 insert
begin
Device (SSD0)\n
{\n
	Name (_ADR, Zero)\n
	Name (NVME, One)\n
	Method (_DSM, 4, NotSerialized)\n
	{\n
		If (LEqual (Arg2, Zero))\n
               {
			Return (Buffer (One)\n
			{\n
				0x03\n                                        
			})\n
		}\n

		If (LEqual (NVME, One))\n
		{\n
			Return (Package (0x06)\n
			{\n
				// "deep-idle" property stripped down credit syscl\n
				"deep-idle", \n
				One,\n
				"use-msi", \n
				One, \n
				"nvme-LPSR-during-S3-S4", \n
				One\n
			})\n
		}\n
		Else\n
		{\n
			Return (Package (0x02)\n
			{\n
				// refined else-if case credit syscl\n
				// eliminate "sata-express-power-off" and "ssd-off-in-S4" credit syscl\n
				"use-msi", \n
				One, \n
			})\n
		}\n
	}\n
}\n
end;

#PRT0 information property credit Pike R. Alpha
into device label PRT0 remove_entry;
into device label SAT0 insert begin
Device (PRT0)\n
{\n
	Name (_ADR, 0xFFFF)\n
	Method (_DSM, 4, NotSerialized)\n
	{\n
		If (LEqual (Arg2, Zero))\n
		{\n
			Return (Buffer (One)\n
			{\n
				0x03\n                                           
			})\n
		}\n

		Return (Package (0x02)\n
		{\n
			"io-device-location", \n
			Buffer (0x04)\n
			{\n
				"SSD"\n
			}\n
		})\n
	}\n
}\n
end;

Notice, you need to change RP09 to your NVMe location(e.g. RP01, RP02 ...).

 

We no more need "sats-express-power-off" and "ssd-off-in-S4". And, yes, after injecting deep-idle, we can see this property in ioreg

post-950366-0-82162400-1485276861_thumb.png

 

syscl

 

 

  • Like 4
Link to comment
Share on other sites

Couldn't make it work on Sierra, but running El Capitan on it, using NVMeGeneric.kext

and @sasta try this one

Comment: IONVMeFamily Preferred Block Size 0x10 -> 0x01 (c) Pike R. Alpha 
Name:    IONVMeFamily
find:    <f6c1100f 851c0100 00>
replace: <f6c1010f 851c0100 00>

Works on my LiteOn who produce Plextor NVMe SSD..

 

syscl

  • Like 1
Link to comment
Share on other sites

and @sasta try this one

Comment: IONVMeFamily Preferred Block Size 0x10 -> 0x01 (c) Pike R. Alpha 
Name:    IONVMeFamily
find:    <f6c1100f 851c0100 00>
replace: <f6c1010f 851c0100 00>

Works on my LiteOn who produce Plextor NVMe SSD..

 

syscl

I have Plextor. Can you send your "kext to patch" section from config? 

Link to comment
Share on other sites

I have Plextor. Can you send your "kext to patch" section from config? 

Here's the raw material

<dict>
				<key>Comment</key>
				<string>IONVMeFamily change 0x10 -> 0x01 for LiteOn CX2 (c) Pike R. Alpha implemented by syscl</string>
				<key>Disabled</key>
				<false/>
				<key>Find</key>
				<data>
				9sEQD4UcAQAA
				</data>
				<key>Name</key>
				<string>IONVMeFamily</string>
				<key>Replace</key>
				<data>
				9sEBD4UcAQAA
				</data>
			</dict>

Tell me if it works for your case,

syscl

 

Link to comment
Share on other sites

Here's the raw material

<dict>
				<key>Comment</key>
				<string>IONVMeFamily change 0x10 -> 0x01 for LiteOn CX2 (c) Pike R. Alpha implemented by syscl</string>
				<key>Disabled</key>
				<false/>
				<key>Find</key>
				<data>
				9sEQD4UcAQAA
				</data>
				<key>Name</key>
				<string>IONVMeFamily</string>
				<key>Replace</key>
				<data>
				9sEBD4UcAQAA
				</data>
			</dict>

Tell me if it works for your case,

syscl

 

No working. But I'm new in this topic...I have to insert only patch that you send me or I need to do something more?

Link to comment
Share on other sites

No working. But I'm new in this topic...I have to insert only patch that you send me or I need to do something more?

change the value 0x10 into 0x01 or 0x02, 0x04 and 0x08 to see which one works for your drive.

 

 

For example, here's the patch I found for LiteOn CX2-1024(0x10 -> 0x01)

Comment: IONVMeFamily Preferred Block Size 0x10 -> 0x01 (c) Pike R. Alpha 
Name:    IONVMeFamily
find:    <f6c1100f 851c0100 00>
replace: <f6c1010f 851c0100 00>

Notice, I just use 10.12.3 with Piker's patch directly. I do not use any other NVMe script patches from any other.

 

syscl

  • Like 1
Link to comment
Share on other sites

Notice, I just use 10.12.3 with Piker's patch directly. I do not use any other NVMe script patches from any other.

Which means these devices use a 4k block size instead of the 512 byte block size used by the Samsung drives...

Link to comment
Share on other sites

 

What do you think of corsair MP500 ? (256 go)

I read the specifications it looks more powerful than samsung 950 pro (same price)

 

samsung vs corsair

read : 2200 vs 3000 mo/s

write : 900 vs 2200 mo/s

 

But do you think it's compatible?

Someone tried it?

 

 

I have this drive (Corsair MP500 480GB) and its PCI ID info. How do I patch it to work? Already have `HackrNVMeFamily.kext` ready (System Information already detects NVMe activated, but no drives ATM).

 

Thanks.

 

EDIT: Attached screenshots of IORegistryExplorer. Drive shows up there perfectly…

post-173190-0-05482900-1485379056_thumb.png

post-173190-0-96876400-1485379066_thumb.png

Link to comment
Share on other sites

I have this drive (Corsair MP500 480GB) and its PCI ID info. How do I patch it to work? Already have `HackrNVMeFamily.kext` ready (System Information already detects NVMe activated, but no drives ATM).

 

Thanks.

 

EDIT: Attached screenshots of IORegistryExplorer. Drive shows up there perfectly…

It could be you don't need the patches enabled by HackrNVMeFamily (4k -> 512byte block size patches) and only need one of the patches mentioned in post #839.

Link to comment
Share on other sites

It could be you don't need the patches enabled by HackrNVMeFamily (4k -> 512byte block size patches) and only need one of the patches mentioned in post #839.

 

So, delete HackrNVMeFamily kext and just use that single patch via config.plist?

 

Thank you! :)

 

UPDATE: Tried the Lite-On patch, no workie. Still detecting the "Apple SSD Controller" (in System Information), but still not populating it with the drive. I did notice an NVMe error during verbose boot:

"virtual bool IONVMeBlockStorageDevice::start(IOService *)::324:failed with status = 0xe00002c7)

AppleNVMe Assert failed: result StartFailureExit ....etc etc....."

 

Also, is there a way to get the verbose boot output in a file? I can't find that log anywhere… I have to video with my phone to get the above log!  :rolleyes:  Thanks!

 

UPDATE 2: removing the config.plist patch AND the kext gives me the same result: "Apple SSD Controller" is detected in System Information/NVMExpress but no drives… :(

Link to comment
Share on other sites

So, delete HackrNVMeFamily kext and just use that single patch via config.plist?

 

Thank you! :)

 

UPDATE: Tried the Lite-On patch, no workie. Still detecting the "Apple SSD Controller" (in System Information), but still not populating it with the drive. I did notice an NVMe error during verbose boot:

"virtual bool IONVMeBlockStorageDevice::start(IOService *)::324:failed with status = 0xe00002c7)

AppleNVMe Assert failed: result StartFailureExit ....etc etc....."

 

Also, is there a way to get the verbose boot output in a file? I can't find that log anywhere… I have to video with my phone to get the above log!  :rolleyes:  Thanks!

 

UPDATE 2: removing the config.plist patch AND the kext gives me the same result: "Apple SSD Controller" is detected in System Information/NVMExpress but no drives… :(

 

From what I can gather, this should work with the patch-nvme script because the ID of this drive is already there ("pci1987,5007", same as "Zotac Sonix PCIe 480gb)… I'm confused why it's not working… :(

 

UPDATE:

 

Rebooted again back with a freshly patched HackrNVMeFamily kext. Seems like I get some additional error info:

ppleNVMe Assert failed: ( LBAFormat->LBA_DATA_SIZE == 12  ) CompleteBuffer file: /BuildRoot/.../IONVMeBlockStorageDevice.cpp line: 182 

 

and then, similar as before:

AppleNVMe Assert failed: 0 == (status) QueueDelete file: /BuildRoot/.../IONVMeBlockStorageDevice.cpp line: 269

virtual bool IONVMeBlockStorageDevice::start(IOService *)::324:failed with status = 0xe00002c7

AookeNVMe Asser failed: result StartFailureExit file: /BuildRoot/.../IONVMeController line: 3277

 

 

Seems like a block size error, doesn't?

 

Hope this helps! :)

Link to comment
Share on other sites

From what I can gather, this should work with the patch-nvme script because the ID of this drive is already there ("pci1987,5007", same as "Zotac Sonix PCIe 480gb)… I'm confused why it's not working… :(

 

UPDATE:

 

Rebooted again back with a freshly patched HackrNVMeFamily kext. Seems like I get some additional error info:

 

and then, similar as before:

 

Seems like a block size error, doesn't?

 

Hope this helps! :)

If you're on 10.12, and not using the class-code spoof, then keep in mind to use HackrNVMeFamily, you must delete IONVMeFamily.kext.

Link to comment
Share on other sites

If you're on 10.12, and not using the class-code spoof, then keep in mind to use HackrNVMeFamily, you must delete IONVMeFamily.kext.

 

From reading your other posts, I realize the "class-code spoof" includes both the  "--spoof" when generating the HackrNVMeFamily but also some DSDT editing? Is that right? What changes should I make to my DSDT?

 

Thank you for all your work and help RehabMan! <3

Link to comment
Share on other sites

From reading your other posts, I realize the "class-code spoof" includes both the  "--spoof" when generating the HackrNVMeFamily but also some DSDT editing? Is that right? What changes should I make to my DSDT?

 

Thank you for all your work and help RehabMan! <3

The class-code spoof details are linked from the patch-nvme github README.

There is no need for me to repeat what is already written.

Link to comment
Share on other sites

 Share

×
×
  • Create New...