- Joined
- Mar 31, 2012
- Messages
- 29
- Motherboard
- Gigabyte Z390 Designare
- CPU
- i9-9900k 3.6 Mhz
- Graphics
- Radeon RX Vega 56
- Mac
- Classic Mac
- Mobile Phone
For all that forgot, like me, to multi beast the TRIM option for the SSD, or simply add a SSD, there is a simple terminal way to fix it without programs or tools like trim enabler. It is all shell/terminal made. This tip si good ONLY FOR MAVERICKS or MOUNTAIN LION.
It works with SSD of last generation that support TRIM. If you aren't friendly with shell and terminal don't try it.
Enter in Terminal.
Become super user as usual:
type your super user password
First backup system files (every time backup all that you change), copy & paste there
the patch is there, copy & paste
now refresh system kernel cache
exit from sudo
exit from terminal
reboot
All works fine!
Verify in "About this Mac" --> "More info..." --> choose SATA and read in line of the SSD Trim=yes
To disable the trim:
to restore the original:
It works with SSD of last generation that support TRIM. If you aren't friendly with shell and terminal don't try it.
Enter in Terminal.
Become super user as usual:
Code:
sudo su
type your super user password
First backup system files (every time backup all that you change), copy & paste there
Code:
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.org
the patch is there, copy & paste
Code:
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
now refresh system kernel cache
Code:
touch /System/Library/Extensions/
exit from sudo
exit from terminal
reboot
All works fine!
Verify in "About this Mac" --> "More info..." --> choose SATA and read in line of the SSD Trim=yes
To disable the trim:
Code:
perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x54)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
touch /System/Library/Extensions/
to restore the original:
Code:
cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.org /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage