TRIM support for aftermarket SSD's?

Discussion in 'OS X Mountain Lion (10.8)' started by ThomasJL, Jul 25, 2012.

  1. ThomasJL macrumors 6502a

    Joined:
    Oct 16, 2008
    #1
    Under Snow Leopard and Lion, TRIM support is only enabled for SSD's that are provided by Apple. Third party SSD's cannot have TRIM enabled under Snow Leopard and Lion. Do any of you know if that has changed in Mountain Lion?
     
  2. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #2
    It has not changed.

    However, you can indeed enable TRIM for 3rd party SSDs under SL, Lion and Mountain Lion.
     
  3. ThomasJL thread starter macrumors 6502a

    Joined:
    Oct 16, 2008
    #3
    Thanks for your reply, calderone. However, I am not interested in a hack solution. The TRIM enabler hack solution that you speak of gets disabled every time Apple releases an OS software update. Also, that hack solution could potentially cause data corruption and other problems.

    I should have clarified in the OP that I am specifically asking about official (i.e., Apple-enabled) TRIM support for aftermarket SSD's.
     
  4. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #4
    Indeed it may.

    The answer is no, there is no official solution.
     
  5. kissmo macrumors 6502a

    Joined:
    Jun 29, 2011
    Location:
    Budapest, Hungary
    #5
    1. Backup the file we’re patching
    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
    2. Patch the file to enable TRIM support
    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
    3. Clear the system kernel extension cache
    sudo kextcache -system-prelinked-kernel

    sudo kextcache -system-caches
     
  6. Orlandoech macrumors 68040

    Orlandoech

    Joined:
    Jun 2, 2011
    Location:
    Salt Lake City, UT
    #6
    I have TRIM enabled on my Corsair SSD, I just did this;

    BACKUP ORIGINAL FILE:
    sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /IOAHCIBlockStorage.original

    ENABLE TRIM SUPPORT:
    sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\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

    CLEAR KEXT CACHES:
    sudo kextcache -system-prelinked-kernel
    sudo kextcache -system-caches

    REBOOT!

    ----------

    Ive NEVER had data corruption lol.
     
  7. arashb macrumors 6502

    Joined:
    May 3, 2009
    #7
    Pretty sure those are the hacks he's talking about, doesn't the trim enabler do the exact same thing but leaves terminal out?
     
  8. bushido Suspended

    bushido

    Joined:
    Mar 26, 2008
    Location:
    Germany
    #8
    just use "trim enabler" its an app and u can enable and disable it with a toggle. works perfectly fine
     
  9. djc6 macrumors 6502

    Joined:
    Aug 11, 2007
    Location:
    Cleveland, OH
    #9
    I too am leary of these unsupported hacks and am disappointed there isn't a supported method of enabling TRIM for 3rd party SSDs.

    Aren't there drives out there that have good enough garbage collection in the firmware that TRIM isn't required? That seems to be the stance from OWC about their SSDs. I'm thinking this is the route I should take.
     
  10. 50548 Guest

    Joined:
    Apr 17, 2005
    Location:
    Currently in Switzerland
    #10
    It has been explained many times already that newer drives with SandForce garbage collection do NOT need TRIM. OWC stated this publicly on their website, and similar analyses have been made for other SSDs.

    http://blog.macsales.com/11051-to-trim-or-not-to-trim-owc-has-the-answer

    Having said the above, you may try the hacks above - Apple will NEVER enable native TRIM support for aftermarket SSDs, just like it won't support PowerNap on them.
     
  11. Krazy Bill macrumors 68030

    Krazy Bill

    Joined:
    Dec 21, 2011
    #11
    Doesn't exist. And why do you feel it should? Especially in light of Apple's imminent venture into totally sealed devices (including all MBP's - current and future).

    :confused:
     
  12. daneoni macrumors G4

    daneoni

    Joined:
    Mar 24, 2006
    #12
    I've been using the Trim Enabler option since Snow Leopard and my SSD hasn't even blinked since.

    Just because it is a 'hack' doesn't mean the sky will come falling down. In this case it just means its unofficial nothing more. its using the TRIM command built into each release version of the OS, which is the best you can hope for since Apple will never support 3rd party SSDs.
     
  13. Orlandoech macrumors 68040

    Orlandoech

    Joined:
    Jun 2, 2011
    Location:
    Salt Lake City, UT
    #13

    Some people just are sooooooooooo Leary because Apple said NO.
     
  14. superk macrumors member

    Joined:
    Mar 24, 2011
    #14
    So I understand apple use Samsung SSDs in their BTO models, what if I were to install a Samsung SSD myself? Will TRIM support still be unavailable?

    Thanks
     
  15. prisstratton, Oct 28, 2012
    Last edited: Oct 28, 2012

    prisstratton macrumors 6502

    prisstratton

    Joined:
    Dec 20, 2011
    Location:
    Winnipeg
    #15
    Trim would still be unavailable as your drive would be read by the system as being a Samsung drive. SSD's provided by Apple would be read as APPLE SSD as this is part of the firmware on the drive.

    Edit:

    People have already quoted (above) and shown the fix from Grant Pannell, but here is another good thread to read on the subject. This person has expanded on Grant's work:

    http://forums.macrumors.com/showthread.php?t=1409151
     
  16. Crunch macrumors 6502

    Crunch

    Joined:
    Jun 26, 2008
    Location:
    L.A. (although currently overseas)
    #16
    Still working on OS X 10.8.2/3???

    Hey guys, has anyone done this successfully on OS X 10.8.2? 10.8.3 just came out, though, but am I correct in assuming that this will pretty much work on any version of OS X 10.8?

    I look at it as a kind of jailbreak. New OS update, gotta re-do it, except no new exploit has to be found. lol...

    This is for an Intel 520 Series 240GB that I just put in my Mac mini 6,2.

    Thanks! :)
     
  17. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #17
    There are some posts in the 10.8.3 thread today reporting it works.
     
  18. GP-SE macrumors 6502

    Joined:
    Feb 27, 2013
    #18
    anyone know the terminal command to enable trim with 10.8.3?
    With 10.8.2 I used a terminal command to enable trim without issue, however after installing 10.8.3 trim is no longer enabled.
     
  19. ibarnett macrumors regular

    ibarnett

    Joined:
    Aug 20, 2010
    Location:
    Gold Coast, Australia
    #19
    I'm using Chameleon.
    After I updated I found Trim was Off in the Chameleon App.
    After selecting On & rebooting Trim is showing Yes again.
     
  20. Crunch macrumors 6502

    Crunch

    Joined:
    Jun 26, 2008
    Location:
    L.A. (although currently overseas)
    #20
    TRIM on 10.8.3 and RAID working!

    The following commands work on both OS X 10.8.2 as well as 10.8.3:

    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 (backup original driver)

    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 (modify driver)

    sudo kextcache -system-prelinked-kernel
    sudo kextcache -system-caches (clear caches, so OS X can pick up new driver)

    After that, reboot and if all goes well, you'll see TRIM turned on in System Information. ;)

    Beyond that, I am happy to report that after I put in a 2nd 240GB Intel 520 Series into my Mac mini, I was even able to turn on TRIM after RAID'ing those babies together using the same commands listed above. That is some sick performance! :D

    Intel, a while back, implemented full TRIM support for its 520 Series SSD's in RAID mode, which is great. Probably not just the 520 Series, but that's what I can personally attest to.

    Enjoy! (and let me know if you have any questions and how it worked for you)
     
  21. Fishrrman macrumors G4

    Joined:
    Feb 20, 2009
    #21
    "After that, reboot and if all goes well, you'll see TRIM turned on in System Information"

    Where does one look in System Information to ascertain this?

    I'm using an IBM 520 series SSD, but have it mounted in an external USB3/SATA docking station. I can bring up its information in System Profiler, and there's no mention of TRIM at all (enabled or disabled).

    Perhaps it's impossible to use the TRIM command when booted via USB?

    Or….?
     
  22. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #22
    I have not seen anybody that was able to get TRIM working on a USB external. I think that's your problem right there.
     
  23. Crunch macrumors 6502

    Crunch

    Joined:
    Jun 26, 2008
    Location:
    L.A. (although currently overseas)
    #23
    I'm not certain. What do you see in System Profiler (System Information) under Serial-ATA?
     
  24. jomobco macrumors newbie

    Joined:
    Mar 21, 2013
    Location:
    Denver
    #24
    It will look like this in about this mac>more info>system report>hardware>serial-ATA
    this will show:
    Medium Type: Solid State
    TRIM Support: No

    I just asked OWC tech support about trim support and they say not to use it on their drives for what that's worth.
     
  25. MacLorenz macrumors newbie

    Joined:
    Apr 2, 2013
    #25
    i've an OCZ vertex 3 and trim enabled by trim enabler.
    but i was wondering if it is so important since some SSD (including mine) have garbage collector that should be better than trim.
    its inside the controller, as i understoot its the next gen trim. isnt it?
    still need to enable trim?
    tx
     

Share This Page