How to activate TRIM in Mac OS X?

Daniel Urstöger
30-04-2012 15:18

Owners of Macbooks who upgraded to an SSD might want to use this feature and here are two ways to achieve that:

  • There is a tool called TRIM Enabler, that does this for you the easy way. Click here.
  • For people who want to do it the manual way, here are the shell commands:
    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.original
    sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
    sudo kextcache -system-prelinked-kernel
    sudo kextcache -system-caches
     These 4 command should do the trick as well.
Average rating: 0 (0 Votes)

You cannot comment on this entry