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.
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. Patching the kernel extension (kext) responsible is unique to your version of OS X (or macOS). Third party enabling software does exist.
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:
Begin by backing up the original kext driver to your home directory
Then find and replace the segment of code responsible for limiting TRIM support to Apple OEM devices only.
The following code is specific to 10.6.8 only!
After patching, purge all kext caches in OS X with the following commands
The last step is restarting your mac. You can do so manually or, if you still have the terminal window open, enter the following
In case you no longer wish to have this enabled, simply restore the original kext file you saved in the first step
It took some trial and error to assemble this guide as most resources I’ve found were either incorrect or were for other macOS/OS X versions.
For other OS X or macOS versions, simply replace the search and replace function in step 2 with the following
10.7.5, 10.8.1, 10.8.2
10.8.3 to 10.9.3
10.9.4 & 10.9.5
Resources and references used include a gist by clarencesong on GitHub, a MacTrast post on the 2011 Trim Support Enabler 1.1 third party tool by Oskar Groth and a functional 10.6.8 patch code by MacKonsti.