News Archive for Friday March 25, 2011:

Macs | CPU Upgrades | Video | Storage | Audio | Apps/OS/Network | Recent Articles
Reader Notes/Tricks for Enabling 3rd party SSD OS X TRIM Support
(From a reader mail yesterday.)

"Subject: Third-Party TRIM SSD Support in Mac OS X
I have good news for those people still waiting for support of TRIM command for third-party Solid State Drives (in OS X). Now we have a support!

It was tested with Intel SSD 2nd generation and OCZ Vertex and it is fully working. But for launch to work we need an IOAHCIFamily.kext (Kernel Extension) with Plugin inside called IOAHCIBlockStorage.kext where in the directory you can find a binary with the same name. This can be downloaded now from internet. This kernel extension was taken from Mac OS X 10.6.6 (10J3210) that came with MacBook Pro 2011. (not the std OS X build)

Open it with HEX editor and search for "APPLE SSD". This is verification on "if this Solid State Drive is an Apple or not?" implemented by Apple. Simply change this 9 symbols with first 9 symbols from name of your SSD.
(FYI - per Viktor's later mail (see below), replacing Apple SSD with all Hex zeroes is another/better option)
Install this modified kext with kexthelper (don't forget to rebuild cache with button in kexthelper) and reboot.
Voila!
This is works on latest Mac OS X 10.6.7 and 10.7 Developer Preview.
-Viktor D.

I asked about any proof that trim is really working in OS X, not just the OS reporting it as supported. (Many SSDs have GC support in firmware, which has been a plus for OS X users w/o Trim support.)
Here's his reply regarding proof of trim working.

Ok, there are three things:

1) Apple can do it (just show "yes") through detecting media type of Disk in System Profiler (which is more simple) instead of using for this AHCI driver. And another thing - this is all SSDs, just with different names, which all supports unified commands.

2) IOAHCIBlockStorage.kext is not something simple. This driver (Input Output Advanced Host Controller Interface Block Storage) manages all IO for SATA Storage Devices, ie. NCQ, R/W operations, TRIM, etc.. How OS checks that TRIM is supported and works in drive? As you can see in my last message - we tested a group of disks, the ones which support TRIM natively and those which produced early that lacked TRIM support. Those disk that supported it, OS recognized. Those which lacked it OS shows "TRIM Support: No" without exception. To check - IOAHCI after detecting that this is not "rotational" disk (reports no spinning speed), it sends the TRIM commands "BuildATATrimCommand" (found inside IOAHCIBlockStoorage) to the SSD. If SSD executes this, on specific address of clusters after trimming will be zeroes like if we had a secure format with zeroes, then IOAHCI reports that command executed, and SSD supports TRIMming. If the command was ignored and not executed, OS reports that this SSD doesn't support TRIM. This command is not a process which can be monitored by Activity Monitor. It is just a command to SSD's controller which will do this work fully automatically without OS intrusion. This is the algorithm to understand "how os checks that TRIM is supported and executed".

3) Another proof. First what we noted is reverting performance via synthetic test back to original. Another - is using "hdparm" method. Booted in linux, mount SSD with HFS, creates small file in specific place and saves the info about address of sectors that contains that file. In linux TRIM is turned off for HFS. Boot to OS X and delete this file. Back to linux - check the address - and we see only zeros. TRIM is working.
(In theory any SSD that supports TRIM should work but he later wrote with results of more testing)
Some more information about activated TRIM tests with other SSDs. These models tested and TRIM verified working:

  • Kingston V+ SSDNow Series
  • Intel X25-S/M 2nd Gen Series
  • Western Digital Silicon Edge Blue Series
  • OCZ Agility 2 Series
  • OCZ Vertex Series

-Viktor D."

Thanks to Viktor for taking the time to send this. (Another reader replied he also used this tip successfully. He used file from a new 2011 MacBook Pro's 10.6.7 (10J3250). Does not work with the standard build of 10.6.7 (10J869) nor std 10.6.6 builds, as Viktor noted above he used 2011 MacBook Pro 10.6.6 file.)

A follow-up from Viktor on a better edit (not limited to one ssd series):

" Hi again! Important update to mod info about enabling trim.
Instead of writing the name of desired SSD in IOAHCIBlockStorage binary, we can rewrite in hexadecimal table string APPLE SSD with (Hex) zeroes. In right (Hex) table where letters will be displayed as dots. What benefit of this? (vs SSD name) - This will work with any SSD Drive that supports TRIM. And not only for one model, even with different models/different mfrs/brands. Universal solution (for TRIM supporting SSDs) to this problem in other words.
-Viktor D."

I suspect someone will post an already edited file for download. (BTW - IME, anytime you edit a system file it's a good idea to run Repair Permissions from Disk Utility and reboot.)
(Update - on Saturday (3/26/11) a MR forum member created a utility to do the patching - not tried it personally but link sent was http://groths.org/zeus/TRIMEnabler.zip)
(Update 2: In fall 2012, another utility was released to enable TRIM, disable sleep image file and more that reportedly works with OS X 10.8/Mountain Lion also - see our page of Chameleon SSD Optimizer user feedback.)
  

(2006-2008) Mac Mini CPU Upgrade Reports page updated
Added another (short) reader report on a T7600/2.3GHz Core2Duo upgrade to the original page on Mac Mini Core 2 Duo CPU Upgrades (Chip Swaps).

  
Apple/Products related Reviews/Articles/News


  
Apple Support/How-To/Troubleshooting Doc Updates


  
Recent Articles and Reviews - Listing/links to articles and reviews you may have missed.
  

OWC XYM SPECIALS!
(Ad/Sale Items)

= UPGRADES by Model =
Upgrades for YOUR Mac!

= Refurb Mac Pros =
(Click for Current List)

= SSDs up to 4TB =
SSDs for Most Macs!

= ThunderBolt =
Drives, Docks & More

= HARD DRIVES =
Up to 12 TB HDD
HGST, WD, Seagate, Toshiba

= 2.5" HDs & DIY Kits =
Notebook Hard Drives and DIY drive/case kit bundles

= MEMORY =
Lifetime warranty RAM Upgrades!

= OPTICAL DRIVES =
Internal and External Superdrives/Blu-Ray drives

= VIDEO / DISPLAY =
Graphics cards, Displays, Adapters, Cables & more

= AUDIO ITEMS =
Interfaces, Cables, Software, Speakers, Headphones & more

= SOFTWARE =
Apps, Utilities, OS, VM, Games and more

= WIRELESS =
WiFi and Bluetooth Devices/Adapters/More

= Repair Service =
for iPhone, iPad, Macs

= iPad/iPhone/iPod =
Accessories, Cases, Docks & More

= back to www.XLR8YOURMAC.com =
Copyright 1997-2018. All Rights Reserved
All brand or product names mentioned here are properties of their respective companies.
Legal: Site Privacy and terms of use.