enabling trim after update

Discussion in 'MacBook Pro' started by Silverado83, Nov 13, 2012.

  1. Silverado83 macrumors newbie

    Joined:
    Apr 14, 2012
    #1
    I have a 2012 cMBP with samsung 830 ssd. I enabled trim through the terminal and all was working fine. Then earlier i installed a software update from apple to 10.8.2. Now i am not able to enable trim through the terminal. I followed all of the steps listed here: http://digitaldj.net/2011/07/21/trim-enabler-for-lion/

    This is the method I used the first time I enabled trim and it worked fine but now it seems to not be working. Is anyone else having this issue? Any help with this situation would be greatly appreciated.
     
  2. T5BRICK macrumors 604

    T5BRICK

    Joined:
    Aug 3, 2006
    Location:
    Oregon
    #2
    Trim enabler worked fine on with my Crucial M4 after the 10.8.2 update.
     
  3. Silverado83 thread starter macrumors newbie

    Joined:
    Apr 14, 2012
    #3
    is trim enabler an app? i would really like to stick with using the terminal.
     
  4. davidlv macrumors 65816

    Joined:
    Apr 5, 2009
    Location:
    Kyoto, Japan
    #4
    Check out the ChameleonSSDOptimizer at
    http://chameleon.alessandroboschini.it/index.php
    This app does all the terminal commands for you and more.
    I tried the Trimenabler app too, but had to repair permissions after a reboot.
    The ChameleonSSDOptimizer app didn't, so I suspect it is written well.
     
  5. Silverado83 thread starter macrumors newbie

    Joined:
    Apr 14, 2012
    #5
    Thanks for the help but im not wanting to use an app. i want to stick to manually entering it in the terminal.

    Has anyone entered the code in the terminal and had success after the software update from apple?
     
  6. snoylekim macrumors member

    Joined:
    Aug 7, 2011
    #6
    Don't have it handy , but the terminal update for 10.8.2 changed slightly ..it's out there someplace .. Apple modified the kext slightly , so the commands have been modified slightly .. There's an earlier thread in here someplace as well describing ..the new commands work as well as the old ones ..I used them on my previous MacBook Pro ..
     
  7. Silverado83 thread starter macrumors newbie

    Joined:
    Apr 14, 2012
    #7
    ok I have tried every known command to enable trim and it is not working. can anyone explain why when i use the terminal it is not working? Again i don't want to use a third party app. i want to be able to enable trim via terminal every time i have a software update.
     
  8. davidlv macrumors 65816

    Joined:
    Apr 5, 2009
    Location:
    Kyoto, Japan
    #8
    I got this from another thread, forgot where and who contributed it so I cannot give credit where it is due... or take any responsibility for it. Use at your own risk.
    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
    FOR ML 10.8.1 AND LION 10.7.5 OR NEWER

    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. Force a refresh of the system’s kernel extension cache
    sudo touch /System/Library/Extensions/

    4.flush the kext caches:
    sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches
    5 Reboot
    a) If in the future you want to disable TRIM support
    FOR ML 10.8.1 AND LION 10.7.5 OR NEWER

    sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x4D)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

    b) If something goes horribly wrong, restore the backup
    sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

    You might have to run repair permissions too.
    Did that work? :eek: or :cool: ?
     
  9. Silverado83 thread starter macrumors newbie

    Joined:
    Apr 14, 2012
    #9
    I did all of the above and still nothing...The only thing i hadn't tried was repair permissions but it still did not work
     
  10. davidlv macrumors 65816

    Joined:
    Apr 5, 2009
    Location:
    Kyoto, Japan
    #10
    Just a thought, but why not try running the OSX 10.8.2 combo updater and then the supplemental update to make sure the target kext files are correctly installed, then run the terminal commands again.
    As a diagnostic measure, you could run the ChameleonSSDOptimizer app to see if that will work. This utility has several good options available too, like enabling noatime, and, without those extras, it really just runs the terminal commands, so it is not doing anything strange.
    It seems as if there may be something that is not right with your install of ML.
    Have you run disk warrior on the target disk, or Disk Utility Repair Disk if you don't have DW?
    I have had no trouble at all using ChameleonSSDOptimizer app on my newly installed Intel 335 240GB SSD. Your experience/case is a little confusing, makes you wonder what could be going wrong....:confused:
     
  11. beedoola macrumors member

    Joined:
    Jun 18, 2012
  12. Silverado83 thread starter macrumors newbie

    Joined:
    Apr 14, 2012
    #12
    when i installed the ML updated i believe i installed the combo updater and then the supplemental update. when i check for more updates there are not any available.
     
  13. davidlv macrumors 65816

    Joined:
    Apr 5, 2009
    Location:
    Kyoto, Japan
    #13
    Software Update will of course say no updates are available, but you can download that at
    http://support.apple.com/kb/DL1581 , and then run Software Update to get the supplemental update, in order to make sure the target file is OK.
    However, I suspect the problem is not the target file. :confused:
    Just run the app suggested above and see if trim gets enabled, I don't think it will mess up your system.
     
  14. nottooshabby macrumors 6502

    Joined:
    Jul 12, 2008
    #14
    Should the trim be enabled after formatting but before running a cloning utility like superduper that would be cloning my old mechanical hd to the ssd?
     
  15. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #15
    You can't enable TRIM until the OS is installed, so that would be after the clone.
     

Share This Page