Enable TRIM support on OS X 10.9.5 for 3rd-party SSDs

To enable the TRIM support on OS X 10.9.5 for a 3rd-party SSD drive, enter the following commands into your Terminal session:

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

sudo touch /System/Library/Extensions/

Restart to enable the changes.

Samsung 840 Pro performance in Mac Mini i7 Late 2012

Samsung 840 Pro BlackMagic Disk Speed Test result
I’ve just installed the 256Gb version of Samsung 840 Pro into my Mac Mini 2.3Ghz i7 (Macmini6,2) running OS X 10.8.4 Mountain Lion and am drooling all over its performance: 520MB/s read and 499MB/s write, and that’s with 150Gb of data already on it!

To my knowledge, this is the fastest SSD you can buy for your Mac Mini, and Amazon has it currently listed at $230.48 with free shipping. You will also need some kind of upgrade kit that includes the UPPER bay SATA cable (at least for the late 2012 model that I have) if you plan to keep the original hard drive. The OWC Data Doubler SSD/2.5″ Hard Drive Installation Kit for Mac mini 2011-2012 Models worked great in my case and it’s only $32.51 on Amazon at the moment.

As a bonus to this article, here is the icon file for the Samsung 840 Pro SSD. Just unzip it, open the icns file in the Preview app, Select All, Copy, open the Get Info window for the drive, click the default hard disk icon and Paste the custom icon into it.

Enable dual screen support on AMD Radeon 6870 under OS X 10.8

To enable the dual screen support on a multi-monitor Hackintosh equipped with an AMD Radeon HD 6870 under OS X Mountain Lion (this works with the current 10.8.4 too), enter the following shell code into your Terminal session:

sudo perl -pi -e 's|\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x12\x04\x05\x01\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x22\x05\x04\x02\x00\x08\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x06\x04\x00\x02\x00\x00\x14\x02\x00\x00\x00\x01\x00\x00\x00\x00\x03\x05\x04\x00\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x01\x03|\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x12\x04\x04\x01\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x22\x05\x05\x02\x00\x08\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x06\x04\x00\x02\x00\x00\x14\x02\x00\x00\x00\x01\x00\x00\x00\x00\x03\x05\x04\x00\x00\x00\x04\x02\x00\x00\x00\x01\x00\x00\x11\x02\x01\x06|g' /System/Library/Extensions/ATI6000Controller.kext/Contents/MacOS/AMD6000Controller

This is a single line of a code, mind you. After the patch completes, rebuild the system cache using the following commands or any other method you prefer:

sudo touch /System/Library/Extensions
kextcache -system-caches

Reboot, and you’ll have dual screen support.

Updated fix for “Still waiting for root device” on OS X 10.8.3 Mountain Lion

Apple’s OS X Mountain Lion update to 10.8.3 has yet again modified the IOAHCIFamily.kext, resulting in a failed boot with the “Still waiting for root device” for only a small fraction of users compared to almost everyone with the 10.8.2 version. Most probably Apple techs have increased the enumeration delay, allowing for more devices to register properly. If you are one of these that are unable to boot properly after updating to OS X 10.8.3, check first if you still have /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext (it was missing on one of our machines after updating to the 10.8.3). There is also a known firmware incompatibility for Intel X25-M SSD owners, so if you own one and your system boots from it, you’ll need to update your SSD firmware. Otherwise, apply the patch listed below.

WARNING: Don’t copy-paste everything into the Terminal at once, do it one line at a time. Pasting the whole code at once will result in the second half of the commands being used as your password at the first sudo command.

The following commands place a backup of the unmodified binary before patching it.

cd /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS
sudo mv IOAHCIBlockStorage IOAHCIBlockStorage.orig
sudo cp IOAHCIBlockStorage.orig IOAHCIBlockStorage
sudo /usr/bin/perl -pi -e 's|\xcb\x57\x00\x00\xee\x03|\xcb\x57\x00\x00\xea\x01|g' IOAHCIBlockStorage
sudo /usr/bin/perl -pi -e 's|\x74\x0e\x48\x8d\x3d\x72\x94\x00\x00|\xbf\xc8\x00\x00\x00\x90\x90\x90\x90|g' IOAHCIBlockStorage
sudo touch /System/Library/Extensions

This fix has been made possible due to countless hours spent by bcc9 from InsanelyMac forums reverse-engineering Apple’s work and his original script.