Trim Befehl

Methode 1

Methode 2

Aktivieren

1. Backup the file we’re patching

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.original


2. Patch the file to enable TRIM support

(sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\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)


Für ML 10.8.1 und Lion 10.7.5 oder neuer

sudo perl -pi -e ‘s|(x52x6Fx74x61x74x69x6Fx6Ex61x6Cx00{1,20})[^x00]{9}(x00{1,20}x4D)|$1x00x00x00x00x00x00x00x00x00$2|sg’ /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage


Für ML 10.8.0 und Lion 10.7.4 oder älter

sudo perl -pi -e ‘s|(x52x6Fx74x61x74x69x6Fx6Ex61x6Cx00{1,20})[^x00]{9}(x00{1,20}x51)|$1x00x00x00x00x00x00x00x00x00$2|sg’ /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage


3. Clear the system kernel extension cache

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


4. Now Reboot!

Disable / Restore


Methode 1: If in the future you want to disable TRIM support (only old)

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
 
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches


Methode 2: If something goes horribly wrong, restore the backup

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
 
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches


Motion Sensor deaktivieren

Testen ob aktiv

sudo pmset -g


Aktivieren

sudo pmset -a sms 1


Deaktivieren

sudo pmset -a sms 0


Weiterführender Link


mac/trim.txt · Zuletzt geändert: 2015/07/06 22:32 (Externe Bearbeitung)