Jump to content

Patch for using NVMe under macOS Sierra is ready.


1,382 posts in this topic

Recommended Posts

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.

 

Thanks a lot! It's working for my Plextor M8PeG.

Link to comment
Share on other sites

because i cound not identity Biosname or Location Path so i will stay using the method that install Hackrnvme and remove IOnvmefamily.

 

in future, when i see mac os update, can i do as below?

 

1. delete Hackrnvme

2. install IOnvmefamily.

3. restart and update

4. delete IOnvmefamily

5. make hackrnvme again with correct mac version and install

 

do you think it is ok ?

The update will re-create IONVMeFamily.kext. Your system will panic.

Suggest you do the class-code spoof.

Racer, so if I understand correctly, our samsung has no size of 4K, while if there are SSD NVME with dimensions of 4 K, we no longer need kext hack?

If the SSD can be set in 4k mode, no need for patches for 512 byte block size.

  • Like 2
Link to comment
Share on other sites

I confirm that on my XPS 13 9360 with 256GB Toshiba NVME THNSN5256GPUK SSD I can change the LBA to 4K and then run 100% vanilla IOBlockStorageDriver.

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         2
 1 -    4096       0         1

The XPS 13 line is plagued with data corruption when using NVME drives and - supposedly - enabling HWP.

I'll report whether using vanilla storage drivers will fix this serious issue.

 

post-594729-0-65823200-1488925395_thumb.png post-594729-0-77349700-1488925400_thumb.png

  • Like 1
Link to comment
Share on other sites

Dear RehabMan,

 

please help me to fix.

 

im using 10.12.3 and IONVMeFamiy.kext as #8

 

 

Dieps-iMac:patch-nvme-master diepnguyen$ ./patch_nvme.sh --spoof 10_12_3

Creating patched HackrNVMeFamily-10_12_3.kext

WARNING: Vanilla MD5 (8530735876c32819ff9662dd1b5e6731) does not match expected MD5 (b54230d2816150a4d57b000d23bf1fc1)

WARNING: Patched MD5 (a7726bf299c36bbec5325593fa52f313) does not match expected MD5 (2ea6658fbc1b161b4e1131ba5c2c5196)

Dieps-iMac:patch-nvme-master diepnguyen$

Link to comment
Share on other sites

Dear RehabMan,

 

please help me to fix.

 

im using 10.12.3 and IONVMeFamiy.kext as #8

MD5 8530735876c32819ff9662dd1b5e6731 is from 10.12 DP1.

You can only generate a patched 10.12.3 kext if you're running 10.12.3.

Read the README carefully.

  • Like 1
Link to comment
Share on other sites

For other noobs like me: 
1 - it's not enough to just use the kext, you also need an SSDT thingy. see the instruction at https://github.com/RehabMan/patch-nvme

2 - 10.11 & Plextor might not work at all, the only thing i found that worked is the 11.6 kext by jsl. see post #1004. This has no "spoofing" so you need to remove IONVMeFamily then use the kext.

3 - you can boot from the drive too. installer also works.

4 - all this is a pretty annoying hack, your ACPI tables will fail when you move the SSD around etc, i still think the proper solution is to make an open source kext using BSD code and add sleep support

Link to comment
Share on other sites

MD5 8530735876c32819ff9662dd1b5e6731 is from 10.12 DP1.

You can only generate a patched 10.12.3 kext if you're running 10.12.3.

Read the README carefully.

 

Thanks.

 

sorry for asking some stupid questions but you know im newbie so somethings are strange with me.

 

10.12 DP1 -  could you tell me what does it mean ?

 

 

 

You can only generate a patched 10.12.3 kext if you're running 10.12.3.

 

im using 10.13.3 but why got this problem ?

 

3Awc9Ia.png

Link to comment
Share on other sites

Thanks.

 

sorry for asking some stupid questions but you know im newbie so somethings are strange with me.

 

10.12 DP1 -  could you tell me what does it mean ?

 

 

im using 10.13.3 but why got this problem ?

 

3Awc9Ia.png

click on the 10.12.3 version text, you will see the build number. it has to match whatever you're trying to use

  • Like 1
Link to comment
Share on other sites

it shows: 10.12.3 (16D32)

 

what should i will do ?

Assuming you didn't install a replacement IONVMeFamily.kext, you should be able to generate HackrNVMeFamily-10_12_3.kext from that system.

Your previous patch_nvme.sh script output shows DP1 (developer preview 1 IONVMeFamily).

  • Like 1
Link to comment
Share on other sites

Assuming you didn't install a replacement IONVMeFamily.kext, you should be able to generate HackrNVMeFamily-10_12_3.kext from that system.

Your previous patch_nvme.sh script output shows DP1 (developer preview 1 IONVMeFamily).

 

here is my step that i built my hackintosh

 

1. install osx using patchtokexts and IONVMeFamily.kext

2. created  HackrNVMeFamily-10_12_3.kext and remove IONVMeFamily.kext and it works well

3. found the way that code spoof so i do as below

 a. delete HackrNVMeFamily-10_12_3.kext and re-install IONVMeFamily.kext

b. create ssdt and modify _DSM ...

c. create HackrNVMeFamily-10_12_3.kext with  --spoof but has problem about MD5 as i posted.

 

what's wrong with my steps ?

Link to comment
Share on other sites

here is my step that i built my hackintosh

 

1. install osx using patchtokexts and IONVMeFamily.kext

2. created  HackrNVMeFamily-10_12_3.kext and remove IONVMeFamily.kext and it works well

3. found the way that code spoof so i do as below

 a. delete HackrNVMeFamily-10_12_3.kext and re-install IONVMeFamily.kext

b. create ssdt and modify _DSM ...

c. create HackrNVMeFamily-10_12_3.kext with  --spoof but has problem about MD5 as i posted.[/size]

 

what's wrong with my steps ?[/size]

I think in step 3a, you're installing an IONVMeFamily.kext that is from 10.12 DP1, instead of 10.12.3.

I recommend you do the class-code spoof and HackrNVMeFamily-10-12_3.kext (with spoof option) from the very beginning (never using KextsToPatch).

  • Like 1
Link to comment
Share on other sites

I think in step 3a, you're installing an IONVMeFamily.kext that is from 10.12 DP1, instead of 10.12.3.

I recommend you do the class-code spoof and HackrNVMeFamily-10-12_3.kext (with spoof option) from the very beginning (never using KextsToPatch).

 

I think in step 3a, you're installing an IONVMeFamily.kext that is from 10.12 DP1, instead of 10.12.3.

I recommend you do the class-code spoof and HackrNVMeFamily-10-12_3.kext (with spoof option) from the very beginning (never using KextsToPatch).

 

HI RehabMan,

 

Thanks so much for your support and guide. without you i could not use my nvme.

 

Now i understood my problem. but could you help again to check my steps below for re-install os to use class-code spoof

 

1. install osx with IONVMeFamily.kext and KextsToPatch as #8 guided

2. Create ssdt and edit _DSM

3. create HackrNVMeFamily-10-12_3.kext (with spoof option)

4. delete IONVMeFamily.kext and also KextsToPatch in config.plist as i added on step 1

5. install HackrNVMeFamily-10-12_3.kext

 

one more thing, about editing _DSM. on the topic of tonymac. you show :

 

An entry for _DSM->XDSM would be:

Comment: Change all _DSM to XDSM

Find: <5f44534d>

Replace: <5844534d

 

 

but on github you show:

 

 

<key>Comment</key>   <string>change _DSM to XDSM</string>   <key>Find</key>   <data>X0RTTQ==</data>   <key>Replace</key>   <data>WERTTQ==</data>

 

 

 

the value(Find and replace) are different. which i should to do ?

 

Thanks again.

Link to comment
Share on other sites

One is written in Base64, one is written in Hex value. Use any text to hex conversion tool and you will see it is correct

 

thanks for your guide

you mean i need to use Hex value when editing _DSM ?

Link to comment
Share on other sites

HI RehabMan,

 

Thanks so much for your support and guide. without you i could not use my nvme.

 

Now i understood my problem. but could you help again to check my steps below for re-install os to use class-code spoof

 

1. install osx with IONVMeFamily.kext and KextsToPatch as #8 guided

2. Create ssdt and edit _DSM

3. create HackrNVMeFamily-10-12_3.kext (with spoof option)

4. delete IONVMeFamily.kext and also KextsToPatch in config.plist as i added on step 1

5. install HackrNVMeFamily-10-12_3.kext

 

one more thing, about editing _DSM. on the topic of tonymac. you show :

 

 

but on github you show:

 

 

 

the value(Find and replace) are different. which i should to do ?

 

Thanks again.

No need to delete IONVMeFamily.kext when using spoofed class-code.

<data> fields in a plist are encoded in base64.

Note:

 

ProBook-4540s:~ Admin$ echo -n X0RTTQ==|base64 --decode|xxd
00000000: 5f44 534d                                _DSM
ProBook-4540s:~ Admin$ echo -n WERTTQ==|base64 --decode|xxd
00000000: 5844 534d                                XDSM
  • Like 1
Link to comment
Share on other sites

No need to delete IONVMeFamily.kext when using spoofed class-code.

<data> fields in a plist are encoded in base64.

Note:

 

ProBook-4540s:~ Admin$ echo -n X0RTTQ==|base64 --decode|xxd
00000000: 5f44 534d                                _DSM
ProBook-4540s:~ Admin$ echo -n WERTTQ==|base64 --decode|xxd
00000000: 5844 534d                                XDSM

 

thanks so much. i understood clearly

Link to comment
Share on other sites

dear RehaMan,

 

after re-installing osx and using class-code spoof, my hackintosh work well.

 

but a question, i need to keep KexsToPatch of  Pike R. Alpha Patch or delete them  on config.plist for future appstore update smoothly?

Link to comment
Share on other sites

 Share

×
×
  • Create New...