Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

CooperBox

macrumors 68000
Original poster
Having enabled trim on recent OS's after installing an SSD using the Terminal command 'sudo trimforce enable', I assumed it would be an easy fix on OS Lion 10.7. But I was wrong......:(
That 'sudo trimforce enable' command is not recognised. So after some Googling I found that Trim Enabler3 is required. I found the latest version 4 which is a free download, but earlier versions are not.......!
Could anyone please indicate a safe site from where to obtain TE3, or advise if this can be performed with a Terminal command.

Fwiw, the addition of an SSD has transformed this 07 Mac Mini, especially in use with the InterWeb browser - simply amazing:DBravo Wicknix!👍
 
Last edited:

chrfr

macrumors G5
Jul 11, 2009
13,702
7,264
So after some Googling I found that Trim Enabler3 is required. I found the latest version 4 which is a free download, but earlier versions are not.......!
Could anyone please indicate a safe site from where to obtain TE3, or advise if this can be performed with a Terminal command.
Have you tried contacting the developer?
 

CooperBox

macrumors 68000
Original poster
I had a very rapid reply back from the developer. That's the good news......
I was provided a link to Trim Enabler 3, but apparently it only gives access to features like disk health, trim status, and benchmarking. Enabling Trim is not provided in the trial version.
Looks like I'm stuck with an SSD which will be working somewhat harder than others which have trim enabled. Pity, as I was preparing this Mac Mini for an aquaintance, and I wanted all possible features active.

If anyone reading this at a later date has knowledge of how to enable trim on OS X 10.7 'Lion' by use of Terminal commands, I've love to hear about it.
 

chrfr

macrumors G5
Jul 11, 2009
13,702
7,264
If anyone reading this at a later date has knowledge of how to enable trim on OS X 10.7 'Lion' by use of Terminal commands, I've love to hear about it.
There are no terminal commands available to enable trim in Lion. The feature was added some time after Yosemite was released.
 

desagradable

macrumors newbie
Jul 31, 2020
12
2
Activar TRIM con Terminal en Mac OS Lion 10.7.5

1° Backup the original driver:
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-backup


2° Modify the driver (choose only one of the following lines, based on the version) for 10.7.5, 10.8.1, 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


3° Run these commands in succession to clear the system caches to enable OS X to pick up the modified driver:

sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches
sudo touch /System/Library/Extensions/

4° Restart the Mac.

In some entries, terminal indicated error, but when restarting and checking I was left with TRIM activated.



Alternative option:


Bye
 
  • Like
Reactions: CooperBox

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,745
2,087
There are no terminal commands available to enable trim in Lion. The feature was added some time after Yosemite was released.

Well, that depends on your definition, I guess. There is a Terminal command, it just isn't a nice Apple utility. Back in the day (and now, if you're using an old OS), the way to enable TRIM was to manually edit the kext binaries with some Perl code. (Isn't it nice to be on an OS without signed kexts or System Integrity Protection to get in your way?)

The attached shell script should work on every version of Mac OS that supports TRIM (10.6.8 and newer).
 

Attachments

  • Enable TRIM on all SSDs.command.zip
    1.5 KB · Views: 310
Last edited:
  • Like
Reactions: CooperBox

CooperBox

macrumors 68000
Original poster
Thanks for the previous two posts and advice. Unfortunately the Mini was given back to it's owner yesterday before I had the chance to investigate/tweek further. Had it running beautifully for a 2007 machine!
You both provided interesting info which I've bookmarked for future reference. Cheers!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.