Jump to content

Enable TRIM on non-Apple SSD

trim enable trim ssd non-apple sad ioahcifamily ioahciblockstorage

  • Please log in to reply
136 replies to this topic

#1
Marchrius

Marchrius

    Lo scippatore di emozioni

  • Pandora Team
  • 356 posts
  • Gender:Male
  • Location:Ferrara, Italia
  • Interests:Studente di Informatica.
    Passione/Hobby: Informatica in generale, hackintosh, musica Rock...

*
POPULAR

Update x3: Reported that works also in Final Release.

 

Update x2: Reported that works also in DP8.

 

Update x1: Reported that works also in DP2.

Hi guys!
 
This is the IOAHCIFamily from Yosemite 10.10 patched to work with all SSD.
 
Attached File  Schermata 2014-06-05 alle 19.36.16.png   404.42KB   158 downloads
 
Download section http://www.insanelym...im-on-1010-dp1/
 
Some user have trouble after copying the kext.
 
In toto there are 4 methods to enable TRIM (use only one):
 

Important: Add "kext-dev-mode=1" as Kernel Arguments or the computer won't boot.

 

1st Method (Obsolete. Use 2nd or 4th instead)

Copy the kext, delete kernel cache in /System/Library/Caches/com.apple.kext.cache/Startup/ and launch the following command in terminal:

sudo touch /System/Library/Extensions && sudo kextcache -prelinked-kernel /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache -K /System/Library/Kernels/kernel /System/Library/Extensions

Then reboot normally.

 

2nd Method (For real Mac or Chameleon users)


Launch this in terminal (are 4 commands):

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

sudo perl -pi -e 's|\x00\x41\x50\x50\x4c\x45\x20\x53\x53\x44\x00|\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00|' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

sudo touch /System/Library/Extensions

sudo kextcache -prelinked-kernel /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache -K /System/Library/Kernels/kernel /System/Library/Extensions

3rd Method (Clover only)
 

This is valid only if you use Clover bootloader. Add manually the KextPatch in config.plist:

<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Name</key>
				<string>IOAHCIBlockStorage</string>
				<key>Find</key>
				<data>
				AEFQUExFIFNTRAA=
				</data>
				<key>Replace</key>
				<data>
				AAAAAAAAAAAAAAA=
				</data>
				<key>Comment</key>
				<string>TRIM Enabler</string>
			</dict>
		</array>

And reboot. No kernelcache to rebuild!

 

If you use Clover Configurator you can follow this steps:

  • go to Kernel and Kext Patches add a new row
  • in name put IOAHCIBlockStorage
  • in find hex put 004150504C452053534400
  • in replace hex put 0000000000000000000000
  • in comment you can write what you want (a description for example)
  • in InfoPlistPatch leave it as is (unchecked)
  • Save and reboot.

Or you can follow this video:

 

4th Method (Mac and Hack)
 

Download this app http://www.insanelym...9-trim-enabler/ and run it.


Edited by Marchrius, 05 May 2015 - 03:23 PM.


#2
.::Fabio::.

.::Fabio::.

    InsanelyMac Legend

  • Moderators
  • 10,889 posts
  • Gender:Male
  • Location:Italy

Great job  :)

 

Fabio



#3
AutismFighter

AutismFighter

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:usa

does not work causes fatal error that can't be repaired sadly but hey i gave it a shot 



#4
JahStories

JahStories

    InsanelyMac Legend

  • Local Moderators
  • 1,406 posts
  • Gender:Male
  • Location:Sicily, Italy.
  • Interests:Everything that got a screen on it, skateboarding, reggae music, PowerPcs, Amigas and retrogamin...

working perfectly here with the 3rd method ;)

Attached Files



#5
Marchrius

Marchrius

    Lo scippatore di emozioni

  • Pandora Team
  • 356 posts
  • Gender:Male
  • Location:Ferrara, Italia
  • Interests:Studente di Informatica.
    Passione/Hobby: Informatica in generale, hackintosh, musica Rock...

does not work causes fatal error that can't be repaired sadly but hey i gave it a shot 

Can you post the description of the error? Use the 3rd method if you have Clover.



#6
JahStories

JahStories

    InsanelyMac Legend

  • Local Moderators
  • 1,406 posts
  • Gender:Male
  • Location:Sicily, Italy.
  • Interests:Everything that got a screen on it, skateboarding, reggae music, PowerPcs, Amigas and retrogamin...

working on dp2! :)



#7
xKrNMBoYx

xKrNMBoYx

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts

So impatiently I tried doing this without fully understanding the commands and steps.  My Macbook ended up not being able to boot.  That "Do Not Enter" or whatever its called sign came up.  I ended up having to go into Recovery mode and inputting more commands to get the macbook bootable.  I can now use my computer but at every boot up I have a gray loading bar.  It's not that slow so it's not an issue with waiting but from what I've read it's not normal for that to appear from a cold boot or restart.  What do you guys think the issue is?



#8
rokurou

rokurou

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 posts

Used method 2. Works perfectly on my MacMini mid 2011.

 

Thank you very much!



#9
Marchrius

Marchrius

    Lo scippatore di emozioni

  • Pandora Team
  • 356 posts
  • Gender:Male
  • Location:Ferrara, Italia
  • Interests:Studente di Informatica.
    Passione/Hobby: Informatica in generale, hackintosh, musica Rock...

So impatiently I tried doing this without fully understanding the commands and steps.  My Macbook ended up not being able to boot.  That "Do Not Enter" or whatever its called sign came up.  I ended up having to go into Recovery mode and inputting more commands to get the macbook bootable.  I can now use my computer but at every boot up I have a gray loading bar.  It's not that slow so it's not an issue with waiting but from what I've read it's not normal for that to appear from a cold boot or restart.  What do you guys think the issue is?


In the first method you can restore the backupped kext and rebuild kernelcache. With second method you can restore the backupped binary file. With third, you can't sue third in original mac, you simply delete the string in config.plist.

I think you have followed the second one. Il not restore all files and follow the second method.

#10
MilesTEG1

MilesTEG1

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 123 posts
  • Gender:Male
I put the third method in the config.plist for Clover on my USB drive witch is going to install Yosemite Beta on my SSD.
I can see that TRIM is enabled via the System Information.

I'll tell you later if it still the case after the installation.

Thanks for your methods.

#11
Marchrius

Marchrius

    Lo scippatore di emozioni

  • Pandora Team
  • 356 posts
  • Gender:Male
  • Location:Ferrara, Italia
  • Interests:Studente di Informatica.
    Passione/Hobby: Informatica in generale, hackintosh, musica Rock...

I put the third method in the config.plist for Clover on my USB drive witch is going to install Yosemite Beta on my SSD.
I can see that TRIM is enabled via the System Information.

I'll tell you later if it still the case after the installation.

Thanks for your methods.

It should work with the next betas and the final release. If not let me know

#12
MilesTEG1

MilesTEG1

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 123 posts
  • Gender:Male

It should work with the next betas and the final release. If not let me know

With pleasure :D

It works great under the public beta since install boot :D



#13
allenwkk

allenwkk

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 114 posts
  • Gender:Male
  • Location:Hong Kong

I used Trim Enabler 3.2.5 for Yosemite public Beta.. the first time I turn on Trim.. the app will modify com.apple.boot.plist to add kext-dev-mode=1

The Trim then works. However on every boot, there is a 5 second delay (this computer encountered errors in boot and will wait five seconds). 

 

To fix it, 

- should add the Kext-dev-mode=1 using Clover config or com.chameleon.boot.plist on Extra (do this immed after install Trim Enabler and before restart... or your system will not boot).

- delete the com.apple.boot.plist in /Library/Preferences/SystemConfiguration/com.apple.Boot.plist

- rename the com.apple.boot.plist-org back to com.apple.boot.plist

 

the error is due to Trim Enabler was not expecting an Hackintosh. and it modified apple.boot.plist wrongly.



#14
MilesTEG1

MilesTEG1

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 123 posts
  • Gender:Male

I used Trim Enabler 3.2.5 for Yosemite public Beta.. the first time I turn on Trim.. the app will modify com.apple.boot.plist to add kext-dev-mode=1

The Trim then works. However on every boot, there is a 5 second delay (this computer encountered errors in boot and will wait five seconds). 

 

To fix it, 

- should add the Kext-dev-mode=1 using Clover config or com.chameleon.boot.plist on Extra (do this immed after install Trim Enabler and before restart... or your system will not boot).

- delete the com.apple.boot.plist in /Library/Preferences/SystemConfiguration/com.apple.Boot.plist

- rename the com.apple.boot.plist-org back to com.apple.boot.plist

 

the error is due to Trim Enabler was not expecting an Hackintosh. and it modified apple.boot.plist wrongly.

Thank you for the intel !

I've no use of Trim Enabler on Yosemite since I use Clover to modify via the KextToPatch a string for enabling Trim.



#15
HBP112358

HBP112358

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 237 posts
  • Location:USA

for those who had it fatal screen on them. if you kept the installer (on a different drive) you can go back into the base system.dmg and pull the altered file from the extensions folder to repair the install.

 

I always backup the installer on a thumb drive before installing a beta OS, it has saved my Bacon more then once... mmm Bacon, time for breakfast. ;)

 

HBP



#16
Benevides Lecontes

Benevides Lecontes

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
  • Gender:Male

The 3rd method works great on Public beta!



#17
CooSee

CooSee

    InsanelyMac Legend

  • Donators
  • 598 posts
  • Gender:Male

tried current Trim Enabler on current Yosemite.

 

now can't boot :-(

 

how to switch back ? ( no Backup )

 

thx

Attached Files



#18
MilesTEG1

MilesTEG1

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 123 posts
  • Gender:Male

tried current Trim Enabler on current Yosemite.

 

now can't boot :-(

 

how to switch back ? ( no Backup )

 

thx

Witch method did you use ?



#19
CooSee

CooSee

    InsanelyMac Legend

  • Donators
  • 598 posts
  • Gender:Male

Witch method did you use ?

 

none of the methods here.

 

 

***

replaced with this kext and Trim works, thx to Marchrius  :w00t:  :thumbsup_anim:


Edited by CooSee, 22 August 2014 - 09:48 PM.


#20
MilesTEG1

MilesTEG1

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 123 posts
  • Gender:Male

none of the methods here.

 

 

***

replaced with this kext and Trim works, thx to Marchrius  :w00t:  :thumbsup_anim:

I was tired yesterday ;) I don't read well :)

You used the software TrimEnabler  :angel:







Also tagged with one or more of these keywords: trim, enable trim, ssd, non-apple sad, ioahcifamily, ioahciblockstorage


2 user(s) are reading this topic

1 members, 1 guests, 0 anonymous users


© 2015 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy