Then search for and replace the segment of code responsible for limiting TRIM support to Apple OEM devices only.
To patch the kext for TRIM support in Mac OS X Snow Leopard 10.6.8, fire up a terminal window and enter the following:īegin by backing up the original kext driver to your home directory sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext /Contents/MacOS/IOAHCIBlockStorage /IOAHCIBlockStorage.original
Third party enabling software does exist. The patching process involves the blanking out of the harddrive whitelist allowing the OS to utilise the TRIM feature on all supporting drives. Patching the kernel extension (kext) responsible is unique to your version of OS X (or macOS). To manually override and enable this feature on a new SSD supporting a proper implementation of TRIM, the following shell commands will do the trick. You should now be back in OS X with Trim disabled.With the introduction of solid state drives (SSDs), Apple began enabling TRIM support only on its OEM supplied drives to ensure a predictable compatibility with the TRIM protocol as some 3rd party drives weren’t fully supported. Rm -rf System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorageĬp -r /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorageĬhown -R root:wheel System/Library/Extensions
Wait until it finishes (can take as long as 5-10 minutes, don’t abort it) and reboot.Kextcache -prelinked-kernel System/Library/Caches//Startup/kernelcache -K System/Library/Kernels/kernel System/Library/Extensions Note the quotes around the disk path and that there should be no / before System. You can type ls /Volumes to get a list of volumes. Run these commands, replacing Your Disk Name with the name of your Mac disk (partition).Run the command: nvram boot-args=kext-dev-mode=1.If it says “error getting variable”, continue with Step 4. If it shows “kext-dev-mode=1″, you can skip to Step 5. Open the Terminal and run the command: nvram boot-args.If your volume was encrypted with FileVault, open Disk Utility and unlock/mount your drive.
If you stuck on the grey boot screen with a stop sign, here’s how you get back into OS X:
It will display the message like below: kext-dev-mode allowing invalid signature -67061 0xFFFFFFFFFFFEFA0B for kext IOAHCIBlockStorage.kext It is fine. Sudo kextcache -m /System/Library/Caches//Startup/Extensions.mkext /System/Library/Extensions Sudo perl -pi -e 's|(^\x00\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 Disable driver signature check by setting boot-args:.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