Non-Apple SSD TRIM support in Lion

Discussion in 'Mac OS X Lion (10.7)' started by netmask254, Sep 20, 2011.

  1. netmask254 macrumors newbie

    Joined:
    Sep 20, 2011
    #1
    In my incoming PC refresh, I'm going to get a 15-inch Macbook Pro which has a 500GB 7200rpm disk by default. And I'm going to upgrade the disk to Intel 320 series or Micron's product (Crucial M4).

    However, I heard Lion only supports TRIM on Samsung/Toshiba's mediocre products, is this true?

    Has somebody used non-Apple SSD in Lion and whether TRIM can be enabled for it?
     
  2. wikus macrumors 68000

    wikus

    Joined:
    Jun 1, 2011
    Location:
    Planet earth.
    #2
    It can only be enabled with a 3rd party application hack/command prompt.

    By default, OS X does not support any SSD drive other than the apple branded toshiba drives. One would expect that in the year 2011, where windows has had TRIM support for two years now, Lion would have gotten the update for it.

    I too was expecting TRIM support for my Intel 320. Apple doesnt care about standards that are not theirs (case in point, SLI or Crossfire on a four thousand dollar mac pro....)
     
  3. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #3
    This is what I used to enable trim on my Mac. They're terminal commands that basically change the iostrings from the apple SSD to what you have installed.

    If you google it, you'll probably run across the page I grabbed these from


    Code:
    sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /IOAHCIBlockStorage.original
    
    Patch the file to enable TRIM support
    Code:
    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 the kext caches
    Code:
    sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches
    
    Reboot
     
  4. hekokimushi macrumors regular

    hekokimushi

    Joined:
    Oct 27, 2008
    #4
    there is a TrimEnabler app that works pretty well for me for my OCZ. have a search
     
  5. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #5
    But does that work with Lion, from reading the long thread at least when I loaded Lion it installed only 10.6 kexts. I was a bit worried about stability because of this.
     
  6. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #6
    The TRIM patch app is still using an old kext and as you said, raises questions about stability.

    I would use the technique described at this page that modifies your existing next while making a backup copy of the unmodified original.
     
  7. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #7
    That's where I got my scripts and posted here ;) I just didn't have the webpage bookmarked
     

Share This Page