Keeping TRIM on Snow Leopard 10.6.8 Update

The recent Snow Leopard 10.6.8 update on both original and hackintosh machines does include the TRIM functionality, but only for Apple SSD drives. So all of you that have replaced the original hard-disks with SSD drives, must again patch the binary of the IOAHCIBlockStorage.kext plugin of the IOAHCIFamily kernel extension.

However, for experienced users, instead of running the TRIM Support Enabler 1.1 (even the update for 10.6.8 by the developer) you can simply run the following command in Terminal to (a) first backup the original binary and then (b) replace all instances of “APPLE SSD” to zeros inside the binary:

cd /System/Library/Extensions/IOAHCIFamily.kext\
/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/

sudo cp -pX IOAHCIBlockStorage ~IOAHCIBlockStorage

sudo perl -pi -e \
's|\x41\x50\x50\x4c\x45\x20\x53\x53\x44|\x00\x00\x00\x00\x00\x00\x00\x00\x00|g' \
IOAHCIBlockStorage

sudo rm /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext

sudo touch /System/Library/Extensions/

(please note that due to WordPress text output, I had to break both the cd and perl commands in two lines; please respect the back-slash “\” character and its position, as these commands have been tested)

I performed this operation on my MacBook Pro (2007 model) using an Intel X25-M 80GB solid state drive and TRIM was finally restored, following a kernel extension refresh/rebuild and a reboot, of course:

I am pretty sure we will need to do the same thing when MacOS X Lion 10.7 is out, as Apple won’t natively support all SSD drives, so keep these commands handy. The binary of IOAHCIBlockStorage.kext will still be in the same location, as a plugin of IOAHCIFamily extension; I just don’t know yet how we will be able to refresh/rebuild the kernel extensions inside the Extensions.mkext file, which at the moment is present in /System/Library/Caches/com.apple.kext.caches/Startup/ directory…

One thought on “Keeping TRIM on Snow Leopard 10.6.8 Update

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s