Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Last active August 25, 2023 02:59
Show Gist options
  • Save return1/4058659 to your computer and use it in GitHub Desktop.
Save return1/4058659 to your computer and use it in GitHub Desktop.
TRIM Enabler for OS X Yosemite 10.10.3
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
# Original version by Grant Parnell is offline (
# Update July 2014: no longer offline, see
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
# Alternative to
# Method behind this madness described:
# See discussion in comments here:
# And here:
# And here:
# Yosemite: for recovering from stop sign on boot screen, please see
# backup patched file
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
# Important: Add "kext-dev-mode=1" as Kernel Arguments or the computer won't boot.
sudo nvram boot-args="kext-dev-mode=1"
sudo shutdown -r now
# looks for "Apple" string in HD kext, changes it to a wildcard match for anything
sudo perl -pi -e 's|\x00\x41\x50\x50\x4c\x45\x20\x53\x53\x44\x00|\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00|' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
# rebuild kext cache manually (could take a while)
sudo touch /System/Library/Extensions
sudo kextcache -m /System/Library/Caches/ /System/Library/Extensions
# now reboot!
sudo shutdown -r now
Copy link

pvl7 commented Jul 2, 2015

"sudo trimforce enable" didn't work for me on 10.10.4. Still had to use the script to change the driver signature and disable security checks :(

Copy link

nychan commented Jul 12, 2015

I got some issue when disabling the changes done by this script and booted to the STOP sign screen after using sudo trim force enable, one of the crucial thing I missed when disabling the patched driver is I did not remove the patched driver file in "/Volumes/Your Disk Name", seems the guide in the link is good enough for me to fix, though I did mistyped chown/chmod lucky no permanent damage is done anyway, after all the mess I did at least it is working for the TRIM without a patched driver under 10.10.4!

Copy link

Used this script, even for 10.10.4, always perfect, thanks

Copy link

ctismer commented Aug 21, 2015

but it no longer works with 10.10.5 :-(

Copy link

Anyone tried with El Capitan 10.11 yet? I'm getting an Operation not permitted error when trying to make the backup of the driver in the first step.

Copy link

return1 commented Oct 16, 2015

for 10.10.4 and higher it is just: sudo trimforce enable

Copy link

defycgn commented Nov 14, 2015

New Solution worked for me on OS X El Capitan 10.11.2 Beta (15X40a)

Copy link

wviana commented May 30, 2016

Confirmed, in my case a 240G (KINGSTON SV300S37A240G)
by: sudo trimforce enable
Mac OS X: 10.11.5

Copy link

confirmed works with 10.9.5 on Early 2008 imac8,1

Copy link

'trimforce enable' worked like a charm on HighSierra. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment