ok I have tried every known command to enable trim and it is not working. can anyone explain why when i use the terminal it is not working? Again i don't want to use a third party app. i want to be able to enable trim via terminal every time i have a software update.
I got this from another thread, forgot where and who contributed it so I cannot give credit where it is due... or take any responsibility for it. Use at your own risk.
1. Backup the file we’re patching
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
2. Patch the file to enable TRIM support
FOR ML 10.8.1 AND LION 10.7.5 OR NEWER
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x4D)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
3. Force a refresh of the system’s kernel extension cache
sudo touch /System/Library/Extensions/
4.flush the kext caches:
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches
5 Reboot
a) If in the future you want to disable TRIM support
FOR ML 10.8.1 AND LION 10.7.5 OR NEWER
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x4D)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
b) If something goes horribly wrong, restore the backup
sudo cp /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
You might have to run repair permissions too.
Did that work?
😱 or
😎 ?