![]() ![]() |
Mar 25 2011, 10:28 AM
Post
#1
|
|
![]() Belgian Foundry ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,622 Joined: 31-March 10 From: Belgium, France, USA, Netherlands Member No.: 12,632 |
It is now done! we were able to activate the TRIM command on an OCZ-Vertex SSD! First, thanks to armdn, a member of our forum for telling us about the solution found by German and/or Russian Mac users. He was able to activate TRIM on his Intel SSD:
Two things to start with: — You will need an hex editor, you can find some easily for free. We used 0XED that we recommend, but there is also HexEdit and many others. — Then you need to read the news about the activation of TRIM on an APPLE SSD, because the procedure is the same, the addition here is the modification of the extension. You will need to modify the extension identifying the disk and thus allowing TRIM or not: IOAHCIFamily.kext version 2.05. If you don't have a 2011 MacBook Pro, you will have to download that version of the extension following the link in the news about the APPLE SSD. If you have a 2011 MacBook Pro, you can use the one you find in the extension folder, after checking that it is indeed version 2.05. The owner of the extension folder is the root user, so you cannot edit the extension if you leave it in that folder. The easiest is to copy it in two different folders on the desktop one "original" to keep one extension as a backup in case you have a problem, and one "modified". A simple click and drop will copy the extension. Extensions are usually drivers allowing the system to work with the components connected or integrated to the computer. They can be quite complex. Right click on IOAHCIFamily.kext and choose "Show package contents" you will find a plug-in folder in which there are two files, also extensions: IOAHCIBlockStorage.kext and IOAHCISerialATAPI.kext. You can now access the file you have to modify: IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage. To do so, do a right click again, on IOAHCIBlockStorage.kext and choose again "Show package contents" and follow the path until you reach "MacOS". Keep that window open. Launch your hex editor, click on File/Open and drop in the window that opens then the binary file IOAHCIBlockStorage. The main window of the software will open. Search for the following characters: "APPLE SSD", be careful to include the upper case in the search. You will find two results. ![]() You have to replace "APPLE SSD" by the name of your disk. You need the same number of characters (9), including spaces if there are some. The easiest way is to copy the first 9 character as they are displayed in System Profiler and to paste it in the right column in the hex editor. For example, you can see on the pictures that "OCZ-VERTE", the name of our SSD, has replaced "APPLE SSD". Do the same for the second result. Quit the editor and don't forget to save of course. ![]() From that point on, you just need to follow the directions explained in the other news about APPLE SSD. To make it short, you will have to replace the original extension by the modified one in the extension folder, but you have to do it right, follow the indications precisely. If you have a problem during your first reboot with a stop sign (circle crossed), force the computer off, restart it while pressing shift, and it will boot without the extensions. Reboot again, it should solve the problem. Here is the result we got: ![]() Just a few more things to conclude: Before trying to activate TRIM, make sure that your SSD supports it. The first models, even the ones that Apple shipped in 2008 do not support it. TRIM is a command that was implemented very recently in Mac OS X, so it is still hard to tell whether is really makes a difference. Theoretically, this command prevents the disk from decreasing in performances while it is filling-up. Also, we can only see that TRIM is marked as active in System Profiler, but we don't have any proof that would allow us to say for sure that it is really active. In the next few weeks, we will keep looking into and we will keep you updated on what we find. By Machmeter, original by Guy |
|
|
|
Mar 25 2011, 11:28 AM
Post
#2
|
|
|
Green Apple Group: Members Posts: 9 Joined: 24-March 11 From: St. Petersburg, Russian Federation Member No.: 14,242 |
I think we can now say that it works, not just "yes" in Profiler. The System Profiler get this Yes after the verification and command "BuildATATrimCommand" passed through without ignoring by SSD. If the command ignored, then system will understand that this SSD doesn't support TRIM (even if this SSD added to IOAHCIBlockStorage) and will report that TRIM Support: No to the Profiler.
This post has been edited by armdn: Mar 25 2011, 11:30 AM |
|
|
|
Mar 25 2011, 12:30 PM
Post
#3
|
|
|
Green Apple Group: Members Posts: 6 Joined: 23-March 11 Member No.: 14,237 |
I think we can now say that it works, not just "yes" in Profiler. The System Profiler get this Yes after the verification and command "BuildATATrimCommand" passed through without ignoring by SSD. If the command ignored, then system will understand that this SSD doesn't support TRIM (even if this SSD added to IOAHCIBlockStorage) and will report that TRIM Support: No to the Profiler. How does trim work exactly? If a drive haven't been doing trim actions for a year and you activate it. Will it start cleaning the whole drive? Or only the parts where is writing en moving files? |
|
|
|
Mar 25 2011, 12:43 PM
Post
#4
|
|
|
Green Apple Group: Members Posts: 9 Joined: 24-March 11 From: St. Petersburg, Russian Federation Member No.: 14,242 |
There is no matter when it is activated, right out of the box, or year later. It will clean sections that needs to move.
|
|
|
|
Mar 25 2011, 01:43 PM
Post
#5
|
|
|
Green Apple Group: Members Posts: 2 Joined: 24-March 11 Member No.: 14,243 |
Hi.
It seems that my July 2009 MBP (APPLE SSD TS256A) does not support TRIM. Is there software that one could run once in a while to perform similar cleanup to what TRIM does? Thank you. |
|
|
|
Mar 25 2011, 11:40 PM
Post
#6
|
|
|
Green Apple Group: Members Posts: 2 Joined: 25-March 11 Member No.: 14,248 |
Did as said. Now won't reboot - I get the X mark
Tried rebooting with shift held down. Same thing. I couldn't change owner to system as not an option. Any ideas? Please help! |
|
|
|
Mar 26 2011, 04:46 AM
Post
#7
|
|
|
Green Apple Group: Members Posts: 2 Joined: 25-March 11 Member No.: 14,248 |
Did as said. Now won't reboot - I get the X mark Tried rebooting with shift held down. Same thing. I couldn't change owner to system as not an option. Any ideas? Please help! Thankfully I had made a backup and was able to put MBP into Firewire target disk mode connected to the iMac (I had a FW800 cable too luckily). Moved old extension back and then shut down MBP and disconnected FW cable. Rebooted and voila - working again. Thanks Apple for making such ingenious this as FW disk mode. |
|
|
|
Mar 26 2011, 04:54 AM
Post
#8
|
|
|
Green Apple Group: Members Posts: 9 Joined: 24-March 11 From: St. Petersburg, Russian Federation Member No.: 14,242 |
Did as said. Now won't reboot - I get the X mark Tried rebooting with shift held down. Same thing. I couldn't change owner to system as not an option. Any ideas? Please help! Thankfully I had made a backup and was able to put MBP into Firewire target disk mode connected to the iMac (I had a FW800 cable too luckily). Moved old extension back and then shut down MBP and disconnected FW cable. Rebooted and voila - working again. Thanks Apple for making such ingenious this as FW disk mode. Install kext with kexthelper, and also DON'T FORGET TO REBUILD EXTENSIONS CACHE! |
|
|
|
Mar 26 2011, 05:36 AM
Post
#9
|
|
|
Green Apple Group: Members Posts: 3 Joined: 20-April 09 Member No.: 11,846 |
|
|
|
|
Mar 26 2011, 09:12 AM
Post
#10
|
|
|
Green Apple Group: Members Posts: 9 Joined: 24-March 11 From: St. Petersburg, Russian Federation Member No.: 14,242 |
again, I say "Don't forget to rebuild extensions cache!" with proper command from terminal: "sudo touch /System/Library/Extensions/" |
|
|
|
Mar 26 2011, 11:30 AM
Post
#11
|
|
|
Green Apple Group: Members Posts: 6 Joined: 12-May 09 Member No.: 11,869 |
Confirmed working with my Vertex 2. Thank you so much!
|
|
|
|
Mar 26 2011, 12:34 PM
Post
#12
|
|
|
Green Apple Group: Members Posts: 2 Joined: 26-March 11 Member No.: 14,250 |
not-working on a Mac Pro 2006 with Intel X-25M G2 (postville-with TRIM support): Trim Support shows: NO
This post has been edited by ledt: Mar 26 2011, 12:52 PM |
|
|
|
Mar 26 2011, 04:44 PM
Post
#13
|
|
|
Green Apple Group: Members Posts: 9 Joined: 24-March 11 From: St. Petersburg, Russian Federation Member No.: 14,242 |
|
|
|
|
Mar 26 2011, 05:16 PM
Post
#14
|
|
|
Green Apple Group: Members Posts: 2 Joined: 26-March 11 Member No.: 14,250 |
works now with the patched extension ( Mac Pro 2006 with Intel X-25M G2 Firmware 2CV102H)
|
|
|
|
Mar 27 2011, 11:15 PM
Post
#15
|
|
|
Green Apple Group: Members Posts: 8 Joined: 27-March 11 Member No.: 14,256 |
I can also confirm this works with my Corsair F120 on MacBook Pro 13" (early 2011)
I also validated the HDD sectors were zeroed after trashed a file. Here's good instructions for Ubuntu to check trim is working, I think same is valid for Mac OS X. http://askubuntu.com/questions/18903/how-to-enable-trim I don't know how to check the sectors in Mac OS X so I used Ubuntu live cd and hdparm to check them. 1. Boot to OS X and create a tempfile to home dir sudo dd if=/dev/urandom of=tempfile count=100 bs=128k 2. Load Ubuntu live cd, when in install screen press ctrl-f2 to go to console 3. Mount OS X disk sudo mkdir /tmp/macosx sudo mount /dev/sda2 /tmp/macosx 4. check the start sector of the tempfile sudo hdparm --fibmap /tmp/macosx/Users/username/tempfile copy the number under "begin_LBA" and use it in the next command 5. read the sector sudo hdparm --read-sector 72276768 /dev/sda it lists a page of hex code 6. Reboot to OS X and use finder to trash the tempfile and empty trash 7. boot back to Ubuntu live cd, when in install screen press ctrl-f2 8. read the sector again sudo hdparm --read-sector 72276768 /dev/sda now it displays zeros This post has been edited by bogey: Mar 27 2011, 11:24 PM |
|
|
|
Mar 28 2011, 05:47 PM
Post
#16
|
|
|
Green Apple Group: Members Posts: 9 Joined: 24-March 11 From: St. Petersburg, Russian Federation Member No.: 14,242 |
Good, that someone else confirmed it too. I also confirm that via hdparm method on XLR8 two days ago.
|
|
|
|
Mar 28 2011, 09:20 PM
Post
#17
|
|
|
Apple Addict ![]() Group: Members Posts: 16 Joined: 11-March 11 Member No.: 14,214 |
activated it via the app. it works! results not known. 2011 MBP, i7/2.3. C300.
|
|
|
|
Mar 30 2011, 10:40 PM
Post
#18
|
|
|
Green Apple Group: Members Posts: 4 Joined: 30-March 11 Member No.: 14,268 |
I don't have the experience with hfsdebug to immediately carry this out, but via Mac OS X, here's the suggested recipe for verifying that TRIM is actually activated by this mod:
- 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 Do the test with the old and new kernel extensions, and you'll know if it works. If someone knows how to work with hfsdebug, give it a try. Otherwise, I'll get around to looking at hfsdebug after a bit. |
|
|
|
Apr 4 2011, 04:20 AM
Post
#19
|
|
|
Green Apple Group: Members Posts: 3 Joined: 4-April 11 Member No.: 14,281 |
I have a Samsung SSD in a Hackintosh. Can not get it to turn TRIM on. TRIM is supported on this drive.
|
|
|
|
Apr 8 2011, 04:41 PM
Post
#20
|
|
|
Green Apple Group: Members Posts: 1 Joined: 8-April 11 Member No.: 14,295 |
Im new to this forum, stumbled upon this thread through a few web searches. And all I can say is THANK YOU!! I bought a Vertex 3 based drive today, and thanks to the info here, I now have TRIM support in 10.6.7. I cant thank you enough
This post has been edited by avian: Apr 8 2011, 05:56 PM |
|
|
|
May 13 2011, 02:54 PM
Post
#21
|
|
|
Green Apple Group: Members Posts: 1 Joined: 13-May 11 Member No.: 14,375 |
|
|
|
|
Jun 24 2011, 02:57 PM
Post
#22
|
|
|
Green Apple Group: Members Posts: 1 Joined: 24-June 11 Member No.: 14,463 |
Hi
After updating the system to 10.6.8 TRIM stopped working. The update changes IOAHCIFamily.kext to version 2.0.6. I applied the same method changing APPLE SSD to OCZ-VERTE with an hex editor in this new version of the kext, and it works again (at least it show as activated en system profile). Cheers - Klaus |
|
|
|
Jun 24 2011, 10:55 PM
Post
#23
|
|
![]() Belgian Foundry ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,622 Joined: 31-March 10 From: Belgium, France, USA, Netherlands Member No.: 12,632 |
|
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 21st May 2013 - 02:36 PM |