在 Mac OSX 10.10 Yosemite 下打开第三方 SSD 的 TRIM 支持

之前写过在 Mavericks 下自己安装 SSD 组建 Fusion Drive,里面最后一步是打开第三方 SSD 硬盘的 Trim 支持。Yosemite 系统做了一些安全性升级,当时的方法已经不再适用。在 Yosemite 下打开 Trim 需要注意:

Yosemite 多了一个功能叫做 Kext Signing,简单的说就是系统为了安全性考虑不再加载被修改过了的硬件驱动程序,这就使而之前的开启 Trim 方法不能再用。如果系统启动时检测到 Trim 选项被手动开启就不会加载硬盘驱动程序,显示一个灰色的禁止符号卡死,导致系统无法启动。如果你已经遇到了这个问题解决方法见本文最后。

因为这个问题的存在,Yosemite 下想手动打开 Trim 就比原来复杂了许多。对于普通用户,我建议还是下载一个第三方软件,比如 Chmeleon SSD Optimizer,傻瓜化操作,一键打开 Trim 支持,还额外提供其他方便的功能,强烈推荐。

Chameleon SSD

使用时注意要先点击上面的锁头图标解锁。然后点击 Trim 开关,出现对话框提示关闭系统的驱动验证功能,选择是,然后系统会自动重启。重启后再次选择 Trim 开关,系统会在几秒钟之后再次重启,操作完成,可以在“系统报告”里确认。

屏幕快照 2014-10-19 13.14.43

如果你是个喜欢万事 DIY 的高级用户,那么可以选择下面三种方法手动打开 Trim。引用自 Insanelymac,我没测试过,风险自负。

第一种方法:

这里下载一个别人已经修改好的 SSD 驱动 Kext. 拷贝到 /System/Library/Extensions/(备份原文件),之后删除 /System/Library/Caches/com.apple.kext.cache/Startup/ 下的缓存,最后打开终端,运行下面的命令之后重启。

sudo touch /System/Library/Extensions && sudo kextcache -prelinked-kernel /System/Library/Caches/com.apple.kext.cache/Startup/kernelcache -K /System/Library/Kernels/kernel /System/Library/Extensions

第二种方法:

在终端里面运行下面四条命令。
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.bak

sudo perl -pi -e 's|\x00\x41\x50\x50\x4c\x45\x20\x53\x53\x44\x00|\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00|' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

sudo touch /System/Library/Extensions

sudo kextcache -prelinked-kernel /System/Library/Caches/com.apple.kext.cache/Startup/kernelcache -K /System/Library/Kernels/kernel /System/Library/Extensions

第三种方法:

只能在你已经安装过 Clover bootloader 的前提下使用。

在 config.plist 里面添加下面段落然后重启:

<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Name</key>
				<string>IOAHCIBlockStorage</string>
				<key>Find</key>
				<data>
				AEFQUExFIFNTRAA=
				</data>
				<key>Replace</key>
				<data>
				AAAAAAAAAAAAAAA=
				</data>
				<key>Comment</key>
				<string>TRIM Enabler</string>
			</dict>
		</array>

解决因打开 Trim 导致 Yosemite 显示灰色禁止符号无法启动的方法:

  1. 长按电源强行关机。按住 Cmd + R 键重新开机进入恢复模式。
  2. 从菜单里选择终端(Terminal)。
  3. 运行 nvram boot-args。如果屏幕显示 “kext-dev-mode=1″,那么跳到第6步。如果显示 “error getting variable“,继续以下步骤。
  4. 运行 nvram boot-args=kext-dev-mode=1
  5. 再次重启按住 Cmd + R 键进入恢复模式。
  6. 运行下面命令。
    ls /Volumes (记下你的硬盘名字)
    cd "/Volumes/你的硬盘名字"
    touch System/Library/Extensions kextcache -prelinked-kernel System/Library/Caches/com.apple.kext.caches/Startup/kernelcache -K System/Library/Kernels/kernel System/Library/Extensions
  7. 等待命令运行完成,可能需要好几分钟,不要强行退出。最后重启。
  8. 检查系统报告里的 Trim 支持,应该显示“是”。

最后需要注意:

  • 关闭系统验证 Kext 驱动程序的设置是存储在 Mac 的 NVRAM/PRAM 里面的。如果你手动清除了它们 (启动时按住 Cmd+Option+P+R),那么非常可能会导致系统重新验证驱动程序从而无法开机。运行 Apple 的硬件维护程序也可能导致同样的状况。所以进行类似操作前一定要手动关闭 Trim 支持。如果你不幸中招了,覆盖方式重新安装系统是最快的解决办法(不会丢失个人文档)。
  • 关闭验证 Kext 有潜在的安全风险,建议关闭这个功能之后避免下载来历不明的程序。

15 Responses

  1. Helensweanna says:

    Hallo.

    Wo kann Ich XEvil kostenlos auf Ihrer website herunterladen?
    Ich habe Informationen von Ihrer Unterstützung. XEvil ist wirklich das beste Programm zum captcha-lösen, aber ich brauche die neueste version davon.

    Dank.

  2. hermes says:

    Needed to create you the little bit of note just to give many thanks the moment again on the marvelous thoughts you have contributed in this article. It was so extremely generous with people like you to allow extensively what many individuals could possibly have distributed for an e book to help with making some dough for their own end, primarily since you could have tried it if you wanted. Those techniques also worked like the easy way to understand that someone else have the identical desire the same as mine to figure out very much more in respect of this condition. I am sure there are a lot more enjoyable situations in the future for those who read carefully your blog.

  3. off-white says:

    I together with my buddies were taking note of the nice information on your web site while the sudden I got a horrible feeling I never expressed respect to the blog owner for those strategies. My people were definitely consequently very interested to read through them and have pretty much been enjoying these things. Appreciation for really being so considerate and also for finding certain brilliant topics millions of individuals are really eager to know about. Our honest apologies for not expressing gratitude to earlier.

  4. Thank you so much for giving everyone an extremely spectacular possiblity to read in detail from this website. It is often very brilliant and also jam-packed with amusement for me and my office co-workers to search the blog a minimum of three times a week to find out the new guides you will have. And of course, I am also always satisfied with the breathtaking techniques served by you. Some 3 ideas in this post are particularly the very best I’ve had.

  5. I needed to compose you one tiny word so as to say thank you once again with the marvelous secrets you have provided in this article. This is open-handed of you to allow unhampered all a few people would have advertised for an e-book to get some profit on their own, specifically given that you might well have tried it in case you desired. The thoughts also served to become a good way to recognize that someone else have similar interest similar to my very own to see a little more related to this condition. I think there are lots of more pleasurable times in the future for those who take a look at your blog.

  6. jordan shoes says:

    Thanks so much for giving everyone remarkably pleasant possiblity to read from here. It is often very kind and as well , packed with a great time for me personally and my office friends to search your blog minimum 3 times in one week to learn the latest secrets you have got. And of course, I’m also usually pleased considering the sensational pointers you give. Certain 3 areas in this posting are basically the most efficient we’ve had.

  7. balenciaga says:

    I must express my gratitude for your generosity for individuals that need help on this particular content. Your special dedication to getting the solution all around appears to be astonishingly practical and has consistently enabled guys much like me to get to their goals. Your own valuable tutorial denotes so much to me and still more to my fellow workers. Regards; from everyone of us.

  8. I simply needed to appreciate you once more. I do not know what I could possibly have achieved in the absence of these advice revealed by you regarding such area. Certainly was an absolute alarming problem in my circumstances, however , being able to see your specialized strategy you managed that made me to leap for delight. I’m just thankful for the guidance as well as believe you recognize what a powerful job you are undertaking instructing others thru a site. Most likely you haven’t encountered any of us.

  9. Needed to create you one tiny note in order to say thanks over again for your extraordinary solutions you have provided above. This has been wonderfully open-handed of people like you to give openly exactly what a number of us might have offered for an ebook to help make some profit for their own end, precisely given that you could have done it in the event you wanted. Those concepts in addition worked as the fantastic way to fully grasp that someone else have the same dreams much like mine to figure out very much more around this issue. I think there are lots of more pleasant moments up front for those who find out your blog.

  10. I truly wanted to type a small comment to express gratitude to you for some of the marvelous guides you are sharing at this site. My long internet look up has at the end been honored with reputable strategies to exchange with my pals. I ‘d assert that we visitors actually are quite lucky to exist in a fine community with very many brilliant people with great principles. I feel very lucky to have discovered the webpages and look forward to really more exciting minutes reading here. Thank you once again for a lot of things.

  11. Thank you a lot for giving everyone an extraordinarily superb chance to check tips from here. It’s usually very enjoyable plus jam-packed with amusement for me personally and my office colleagues to visit your website a minimum of three times every week to study the fresh guidance you will have. And indeed, I am just always happy for the good tactics you serve. Certain 1 areas in this posting are undoubtedly the most effective I’ve had.

  12. I definitely wanted to compose a quick remark in order to appreciate you for those nice tactics you are placing at this site. My particularly long internet lookup has now been recognized with reliable facts and techniques to go over with my guests. I ‘d believe that we visitors are unequivocally fortunate to be in a perfect community with very many perfect professionals with useful solutions. I feel somewhat blessed to have seen your website page and look forward to so many more awesome moments reading here. Thanks once again for all the details.

  13. I wish to express thanks to this writer for rescuing me from this scenario. After surfing around throughout the search engines and meeting tricks which were not powerful, I believed my life was well over. Existing without the answers to the issues you’ve sorted out by means of your main write-up is a serious case, as well as the ones that would have badly damaged my entire career if I hadn’t noticed your web page. Your personal understanding and kindness in controlling all the stuff was very useful. I’m not sure what I would have done if I had not come across such a solution like this. It’s possible to now look ahead to my future. Thanks for your time so much for this professional and results-oriented guide. I won’t hesitate to recommend the sites to any person who should have recommendations about this subject matter.

  14. kyrie 3 says:

    I intended to compose you that little observation to finally say thanks over again about the splendid ideas you have provided on this website. It was so incredibly open-handed of you to supply unreservedly all that numerous people would have sold for an e book in making some profit on their own, especially seeing that you might well have done it if you ever decided. Those tactics as well served as the fantastic way to recognize that some people have a similar dream like my personal own to figure out more in terms of this issue. I believe there are many more fun instances in the future for individuals who take a look at your blog post.

  15. coach outlet says:

    I enjoy you because of your whole hard work on this web site. My aunt enjoys managing investigation and it’s really obvious why. Almost all notice all relating to the dynamic medium you convey worthwhile steps by means of this web site and therefore encourage response from visitors on this area of interest plus my daughter is undoubtedly understanding a lot. Take advantage of the remaining portion of the new year. Your conducting a really great job.

Leave a Reply


*