Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Enable trim support on Apple and third party SSD’s Other Hardware
The folks at hardmac.com have found a way to modify a system extension that came with the 10.6.7 update, to enable trim support on pretty much all SSD drives that support trim.

I tested their modified extension on an OCZ Vertex 2 SSD in a mid 2009 MBP running 10.6.7 and 10.7 and both system info report trim support: Yes.

Here's the link to the article.

As noted by them, the fact that system info reports that trim support is on, doesn't mean it's actually working until another way of checking it is found in OS X.

[crarko adds: This procedure involves editing a kernel extension by hand with a hex editor. I'll put it out here as a possibility if you really think you need it, but if you mess up (especially on a MacBook Air) you may be looking at a wipe/reinstall, so make sure you have a complete backup of the system before attempting this. Proceed at your own risk.]
    •    
  • Currently 3.50 / 5
  You rated: 4 / 5 (6 votes cast)
 
[17,029 views]  

Enable trim support on Apple and third party SSD’s | 21 comments | Create New Account
Click here to return to the 'Enable trim support on Apple and third party SSD’s' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Enable trim support on Apple and third party SSD’s
Authored by: jdpanoptic on Mar 29, '11 07:52:21AM

Or you could just use this little patch: http://www.groths.org/?p=308



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: Welles Goodrich on Mar 29, '11 08:27:31AM

There is also a Trim Enabler app available on MacUpdate...

http://www.macupdate.com/app/mac/37852/trim-enabler

The next version of that app is going to have an uninstall feature as well. The current version doesn't.

Yesterday I checked with using the Trim Enabler or the hack with my OWC Mercury Extreme SSD-E.
I was told that their drives didn't need the Trim Enabler installed as the functionality it provides is already build into their drives. I was sent to this link for info...

http://macperformanceguide.com/SSD-RealWorld-SevereDuty.html



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: chucky23 on Mar 29, '11 08:36:47AM

How can there not be a way of verifying TRIM is on, beyond what the system reports?

I've got a MBP with an Apple (Toshiba) SSD in it, and I'd love to turn on TRIM, just as long as someone can verify this is doing something beyond merely tricking System Profiler, (especially since I'll wait a bit to upgrade to Lion because of Rosetta being gone, and because Lion will probably break other 3rd party stuff as well.)



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: Andrew J Freyer on Mar 29, '11 08:53:31AM

I have the same complaint regarding independent verification that TRIM is enabled, but here's what made me confident:

I have two SSDs in my MBP and only one is showing TRIM support in system profiler after the ktext update - a Kensington SSD that supports TRIM. The other drive is older and does not.

Anecdotally, clearing my trash on my TRIM SSD of nearly 3GB was shockingly fast. Much faster than before I enabled TRIM. This is expected behavior on a TRIM-enabled drive.

---



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: chucky23 on Mar 29, '11 09:22:43AM

"I have two SSDs in my MBP and only one is showing TRIM support in system profiler after the ktext update - a Kensington SSD that supports TRIM. The other drive is older and does not."

That does seem to add weight to the case that this actually does enable TRIM.

But it could also just be an artifact created by the drives indicating to System Profiler whether they support TRIM or not.

I'm still confused that there would be no way of actually testing that TRIM is enabled by running some software tool that wrote something to the drive, deleted it, and then looked at the drive...



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: Andrew J Freyer on Mar 29, '11 09:25:11AM

Before modifying, both drives indicated that TRIM was not enabled.

I do not think that this is merely an SSD reporting patch. Perhaps anecdotal evidence is all we're going to have in this particular circumstance.

---



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: chucky23 on Mar 29, '11 10:12:48AM

"Perhaps anecdotal evidence is all we're going to have in this particular circumstance."

That's what confuses me. I'm unclear on why there would be no way of testing TRIM at the disk level.



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: chucky23 on Mar 29, '11 12:24:58PM

"Perhaps anecdotal evidence is all we're going to have in this particular circumstance."

One guy claims to have checked via using a Ubuntu CD and multiple boots:

http://forum.hardmac.com/index.php?showtopic=10020&st=0&p=18069&#entry18069

But I'd love it if someone who knew how to directly check the sectors while booted into OS X would test the thing. It's got to be possible to check the disk sectors under OS X, and I don't fully trust the guy's experiment. (At a minimum, he should have tried the same test with the regular kernel extension to see if he got the opposite result.)

I've been keeping my SSD with 50% free space specifically because I knew TRIM was coming sometime in the future, and I'd love to fill that SSD up if someone could definitely verify that this was really working.



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: Andrew J Freyer on Mar 29, '11 08:55:49AM

If you don't want to mess with hex editing, try this program "trim enabler for mac":

http://www.groths.org/?p=308

This worked for me on a Kensington SSDNow 64

---

Edited on Mar 29, '11 09:00:25AM by Andrew J Freyer



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: Auricchio on Mar 29, '11 09:39:07AM
And how are we to determine if TRIM support actually works properly? The big danger in enabling functions, whether by editing plists or using "defaults write ..." is that you have no way of knowing if the function is buggy. In many cases, Apple could have disabled a function---and removed the control panel for it---because it's incomplete or buggy. When you enable any of these hidden settings, you take your chances.--- EMOJO: mojo no longer workin'
---
EMOJO: mojo no longer workin'
Edited on Mar 29, '11 09:39:35AM by Auricchio


[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: lkravovicz on Mar 29, '11 09:43:44AM

anyone have any thoughts on what do with TRIM on good ol' 10.5 Leopard?



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: tempel on Apr 07, '11 06:30:13AM

I suspect that 10.5's drives aren't issuing the TRIM cmd to drives. Someone would have to write a new disk driver for this. In the old days before OSX, there were plenty of drives for this around, but nowadays, with all open source, no one's making the effort any more. Weird, innit?



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: GianPaJ on Mar 29, '11 12:19:09PM

It worked for me on a MacBook Pro 3.1 Late 2007 with an G.SKILL Phoenix Pro Series FM-25S2S-120GBP2 120GB.

Not sure if it's only on the System Profiler but there were comments that they tried to see if the empty area in the disk where made to zeros and apparently it should work.

But let me know if you know it there is a simple test i can do to verify



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: markbailey747 on Mar 29, '11 01:48:19PM

Enabled trim based on republished info posted on hardmac.com this past weekend. As for evidence that the TRIM command is working and aside from the sense that the disk is as fast as it has ever been, I downloaded a freeware program called Disk Drill to try and recover files I know that I deleted over the last few days. Disk Drill reported that there were "no deleted files found" that were available for recovery. This is pretty solid evidence that trashed files have been wiped from the SSD by the TRIM command. Of course there are a number of programs that are designed to help one recover accidentally deleted files. That said one might consider that backup should be made to a traditional rotary type hard disk if there is a potential need to recover such files, whereas if one wishes to ensure that deleted files are not to be recoverable then backup to another SSD (also with TRIM enabled, of course).



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: usovalx on Mar 30, '11 04:26:53AM

I don't have SSD drive myself to test it, but following recipie might work (adoption from the above-mentioned ubuntu link):

- create large test file filling it in with some pattern
- use hfsdebug (http://osxbook.com/software/hfsdebug/) to find address of the pysical sectors of the file
- use dd to verify you have got the correct address
- remove file & clean your trash
- use dd once more to make sure sectors are empty now



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: chucky23 on Mar 30, '11 05:42:35AM

Thanks, usovalx.

That's exactly what I was looking for upthread. I figured there had to be SOME way of testing TRIM from within OS X.

If I can figure out how hfsdebug works, (or if you want to provide a more detailed step-by-step), I'll try with the stock kernel extension, and then install the new kernel and try the same test.



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: chucky23 on Apr 02, '11 01:52:19PM

FWIW, it seems hfsdebug is no longer available for download anywhere on the internet...



[ Reply to This | # ]
Enable trim support on Apple and third party SSD’s
Authored by: GianPaJ on Mar 31, '11 02:44:47AM

Do u guys have the original file IOAHCIFamily.kext version 2.04 ??
My Macbook pro is behaving very strange now.
it takes ages to start, and some times seems like crashing, but the mouse moves and after 3/4 mins everything works again

Can somebody upload the file somewhere please? i forgot to back it up :/ thanks



[ Reply to This | # ]
TRIM may not be Required
Authored by: stottm on Mar 31, '11 03:29:45AM

Any drive that uses the Sandforce SSD internal controller does not need TRIM support. It handles the same functionality inside the controller itself. The operating system does not need to support TRIM. So this means that OCZ and SSDs branded as OWC Mercury Extreme Pro do not require TRIM at all!

It so happens that the Sandforce based drives are many times faster than all the others.

Frankly, it's pretty dumb to release a drive technology that relies on an OS driver / feature to keep the device running properly long term. Just go with a Sandforce based SSD and you won't have problems. I still limit my writes and keep data either frequently backed up or on a traditional disk. If an SSD were to fail, there would be zero warning and it will likely be unrecoverable. I use my SSD's as boot drives, holding the OS and apps and data that needs to be fast such as virtual machine disk images. The VDI's are going to be placed on a highspeed external raid box because the shear size and number of them is growing exponentially. Waiting patiently for Ten's Compliment to release ZFS for Mac OS X. Then I can buy a cheap 4-5 bay disk bay and use ZFS RAID-Z and it's zpools to manage my disks. Think of it as a much more reliable Drobo.



[ Reply to This | # ]
TRIM may not be Required
Authored by: ~Coxy on Apr 06, '11 07:47:22PM

While it's true that the Sandforce controller has built in "garbage collection", it would require the controller to understand the filesystem that is being used on the drive. I have seen no evidence nor claims that the controller understands HFS+ (as opposed to NTFS/FAT.)



[ Reply to This | # ]
TRIM may not be Required
Authored by: tempel on Apr 07, '11 06:27:32AM

Correct. Being quite experienced with file systems, disk drivers and drives in general, I can confirm that a disk can't optimize for this fully without knowing which sectors / blocks on the disk are still in use and which not. And the OS tells the disk which blocks are free by using said trim command.



[ Reply to This | # ]