We will boot from recovery partition with cmd + r at startup, then manually in terminal:
than
and
and
NB*
an encrypted volume (FileVault) must before be unlocked and mounted with the Disk Utility, available in the recovery volume, otherwise it will not appear in /Volumes/
NB**
If your disk name is spelled in two words like <Your Disk>, then the bash syntax would be: Your\ Disk or 'Your Disk'
If it is <YourDisk> in a single word then it is simply YourDisk.
If you encounter a block sign on boot after appling patch for trim try this way to force disable kext sign:
boot from recovery with cmd + r at startup, then manually in terminal:
than
Apple finally opened to allows users to enable TRIM functionality on third-party, the trimforce command must be entered into Terminal
"sudo trimforce enable"
Copy and paste the code snippets through the terminal window (Applications->Utilities->terminal).
Backup the file we're patching
Patch the file to enable TRIM support for any SSDs (from 10.9.4 to 10.9.5)
sudo perl -pi -e 's|(^\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
Patch the file to enable TRIM support for any SSDs (from 10.8.3 to 10.9.3)
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
or patch the file for 10.7.5 to 10.8.2
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
Finalize the patch:
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches
sudo touch /System/Library/Extensions/
Now reboot your system and verify that TRIM is enabled through the System Information.
Copy and paste the code snippets through the terminal window (Applications->Utilities->terminal).
Backup the file we're patching
Patch the file to enable TRIM support for any SSDs
"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"
flush the kext caches
"sudo kextcache -system-prelinked-kernel"
"sudo kextcache -system-caches"
Now reboot your system and verify that TRIM is enabled through the System Information.
If you want to disable TRIM support
"sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage"
"sudo kextcache -system-prelinked-kernel"
"sudo kextcache -system-caches"
If you want restore the backup
"sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.backup /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage"
In the terminal window
to check status:
"sudo pmset -g"
if return 1 is enabled, if return 0 is disabled
to disable:
"sudo pmset -a sms 0"
to re-enable:
"sudo pmset -a sms 1"
In the terminal window
"cd Library"
"cd LaunchDaemons"
"sudo pico com.ssd.noatime.plist"
then paste this:
now save and reboot
to check
mount | grep " / "
you should see something like "/dev/disk0s2 on / (hfs, local, journaled, noatime)"
to restore with no-noatime delete the file created at /Library/LaunchDaemons
Chameleon SSD optimizer is free,
please support us
Get it now!
Warning!
Patching trim means modify the kext (driver) responsible for managing disks. The change is reversible and you can always manually reset it. Enabling patch is your responsibility and at your own risk.
OSX Compatibility List:
Snow Leopard
10.6.7 10.6.8
Lion
10.7.0 10.7.1 10.7.2 10.7.3
10.7.4 10.7.5
Mountain Lion
10.8.0 10.8.1 10.8.2 10.8.3
10.8.4 10.8.5
Mavericks
10.9.0 10.9.1 10.9.2 10.9.3
10.9.4 10.9.5
Yosemite
10.10 10.10.1 10.10.2 10.10.3