Elliot Theis

  • Random
  • Archive
  • RSS
  • Ask me anything

How to Enable TRIM Support For All SSDs in OS X Lion

Ever since the release of OS X 10.6.8, Apple has been selectively enabling the TRIM command for SSD’s in OS X. This support continues on on Mac OS X Lion, but as many have noted, it only seems to work for Apple SSDs. Here’s how to enable TRIM across the board:

The TRIM command is an important disk command for SSDs that keeps your flash memory appropriately cycled so that you can achieve faster read and write speeds, as well as a longer lifespan for your SSD. As such, TRIM support is not the trivial matter that some make it out to be (although certain manufacturers, such as Other World Computing, include firmware that eliminates the need for OS-level TRIM support).

In you have an SSD that supports TRIM, and you’re running OS X 10.6.8 or Lion, follow the below instructions to enable TRIM. Note: This involves the use of terminal commands, so proceed at your own risk.

Backup the file that you’re about to patch:

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /IOAHCIBlockStorage.original

Patch the file to 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 the kext caches:

sudo kextcache -system-prelinked-kernel sudo kextcache -system-caches

Important: reboot your Mac!

To disable TRIM support in the future:

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

Finally, if this does not work as expected, or if something goes wrong, simply restore the backup:

sudo cp /IOAHCIBlockStorage.original /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

This patch simply edits a file called IOAHCIBlockStoage, removing a string that makes TRIM work for only Apple SSDs.

    • #SSD
    • #Lion
    • #OS X
    • #Apple
    • #TRIM
    • #performance
  • 3 weeks ago
  • 1
  • Permalink
  • Share
    Tweet
Tribute to Steve Jobs at the Apple Store in Newcastle
Pop-upView Separately

Tribute to Steve Jobs at the Apple Store in Newcastle

    • #steve jobs
    • #apple
  • 4 months ago
  • Permalink
  • Share
    Tweet

RIP Steve Jobs (1955 - 2011); the world has lost a visionary.

    • #apple
    • #steve jobs
  • 4 months ago
  • 5
  • Permalink
  • Share
    Tweet

Marc Benioff and Eric Schmidt discuss the future of cloud computing and what companies need to focus on to succeed in a fast moving and quickly changing technology environment at Dreamforce 2011.

    • #google
    • #salesforce
    • #apple
    • #steve jobs
    • #cloud
  • 5 months ago
  • Permalink
  • Share
    Tweet

Steve Jobs steps down as Apple’s CEO due to health issues. Great leader, innovator, and visionary.

    • #apple
    • #steve jobs
  • 5 months ago
  • 1
  • Permalink
  • Share
    Tweet
Microsoft pitching their advertisement banners outside the Apple Store in NYC. That’s pretty cheap if you ask me
Pop-upView Separately

Microsoft pitching their advertisement banners outside the Apple Store in NYC. That’s pretty cheap if you ask me

    • #microsoft
    • #apple
  • 8 months ago
  • Permalink
  • Share
    Tweet
Prediction: Apple iPhone will launch with NFC on the 22nd May, and Square will be the Apple Store’s payment mechanism (announce 23rd May)
Elliot Theis
    • #apple
  • 8 months ago
  • Permalink
  • Share
    Tweet
Today’s Apple purchases
Pop-upView Separately

Today’s Apple purchases

    • #apple
    • #iphone
    • #iPhone 4
  • 9 months ago
  • 3
  • Permalink
  • Share
    Tweet

Nice to see Steve Jobs get a standing ovation at the iPad 2 announcement

    • #apple
    • #steve jobs
  • 11 months ago
  • Permalink
  • Share
    Tweet

Steve Jobs at D8

Apple CEO Steve Jobs’ appearance at D: All Things Digital last night is the talk of everywhere today. 

The first videos captured during last nights discussions are available now, and here are some of the highlights for your delectation and delight. (Sorry the clips are in Flash, blame All Things Digital).

1. On Gizmodo and the iPhone theft
Jobs is quite upset about the whole thing and unwilling to “let it slide”, he feels the website tried to “extort” Apple.

2. Jobs on Flash and other obsolete tech

Notice he comes out to the sound of ‘Got to Get you into my Life’ by The Beatles…

3. Jobs on Google and the origins of the iPad

Guess what — Apple was working on the iPad when it invented a touch interface Jobs immediately thought should be used in a phone, so the iPhone was born.

4. Jobs on AT&T
They had faith in us, Jobs says, as AT&T raise rates. Nice onE AT&T.

5. Jobs on TV
Way it is the industry needs to change for technological solutions to really make a difference, Jobs explains. ((Next step, changes the industry, no doubt).

6. Jobs on Google and Android
So he woke up one morning and his friendly fellow board member, Eric Schmidt of Google, had become his competitor. Fortunately it hasn’t affected Steve’s sex life. We wonder what he’s planning…

7. Jobs explains the iAds restrictions
Jobs did make a point of saying that he will allow other ad networks besides Apple’s own iAds platform on his iPads and iPhones. And he said that he would allow outside advertisers to track their ads’ performance.

Jobs also notes Flurry’s big mistake — to gather and then publish data which showed the company was testing iPad prototypes…

    • #D8
    • #Steve Jobs
    • #Apple
  • 1 year ago
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 2

Portrait/Logo

About

I'm an entrepreneur, consultant, and rails developer who is keen to make his mark in the world.

Pages

  • About Me
  • CrunchBase
  • LinkedIn

Me, Elsewhere

  • @elliottheis on Twitter
  • elliottheis on Foursquare
  • My Skype Info
  • Linkedin Profile

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr