iMac fan control: quick, dirty, effective

One of the Intel iMacs we use here at the shop needed a new hard drive this week. Turns out the old drive was one of those that contains a built-in temperature sensor, and the new drive wasn’t (see this for the complete lowdown). End result? The SMC no longer knew what the drive’s temp was, panicked, and ran the hard drive fan on full speed – continuously. The noise was bothersome at best, and deafening at worst.

If this had been a customer’s machine, we would’ve cracked it back open and installed one of the many sensors we’ve saved from junk iMac G5s and other such machines. But since ripping the Mac apart again just wasn’t high on our list, we opted to solve the problem in software instead.

First, we took the smc utility (included with various fan-monitoring apps) and crafted a set of arguments for it that would limit the fan to running at a much more tolerable 2000 RPM. Then we wrote an XML file for LaunchServices that would run our command four times a minute (since the fan speed is re-set every time the machine powers off or goes to sleep, we need to ensure it never runs at full-speed for long). Hey, we said it was quick and dirty!

All in all, our hack did the job. It’s by no means elegant, but at least we can stop shouting over the fan noise.

There’s a ZIP file, which contains smc and our launchd script, athttp://www.kanabec.net/blog/FanSpeed.zip. Feel free to use it at your own risk. Our settings are plenty safe for the machine in question, but could have unintended consequences if used with other models or configurations. You have been warned!