Tuesday, June 30, 2009

"How Do I Stop the Clicking Noise from the Hard Drive of My MacBook or Mac Mini?"


Updated 1/20/2010

Energy-efficient hard drives that are optimized for Windows can cause incessant clicking as annoying as a water drip when used with Unix-based systems like Mac OS X or Linux on a computer that's idling. That's because this kind of drive will park its head after only seconds of inactivity -- and then the computer immediately calls it back into action. Even when this isn't loud enough to annoy the user, it causes excessive wear and premature aging of the drive.

On Macs, this is often found in replacement drives for the MacBook and the Mac Mini. Apple modifies the firmware of drives it supplies to avoid this problem, but no one does that for the speedier, larger replacements. Upgraders get more -- or less -- than they bargained for.

How can you tell for sure if your drive is affected? Download a shareware program like smartctl or Volitans Software's Smart Utility and look for the load cycle count. Hard drives are rated for only a few hundred thousand of those. If your drive has gone through thousands or hundreds of thousands in a short time, you're in trouble.

This kind of hard drive is still relatively new, and hopefully Apple will tackle the problem in Snow Leopard. But meanwhile, you can turn off the head parking yourself. On the Mac, the key is Bryce McKinlay's tiny shareware program hdapm. You can get it at

http://mckinlay.net.nz/hdapm/

The included instructions are geared toward Unix geeks, and they don't all work with the latest version of Leopard. But luckily, you don't need to follow them exactly. I'll tell you what to do instead. But first you'll need to download Peter Borg's shareware program Lingon 2.1.1 (the last version before development was halted). Ignore the big green "Download" button on the Lingon page -- it's for an older version -- and get the program instead from


Ready?

1. Move the file hdapm into /Applications/Utilities/ and authenticate.

2. With Lingon, create a new launchd configuration file with these settings:

-- "Where" is "Users Daemons."

-- "Name" is something like

com.yourusername.launchd.hdapm

Replace "yourusername" with your OS X account name. (That's the name next to the house in your Finder sidebar, and it's case sensitive.)

-- "What" is

/Applications/Utilities/hdapm disk0 max

(That's a zero following "disk", not the letter O. And don't leave out the initial slash!)

-- "When" is "Run it when it is loaded by the system (at startup or login)."

3. Save and authenticate. This places the file com.yourusername.launchd.hdapm.plist in /Library/LaunchDaemons, from where it will run the specified Terminal command with root privileges at startup or login.

4. Restart, then open Console. Search on "hdapm." You should see lines like this:

6/30/2009 9:15:41 PM com.AaronShep.launchd.hdapm[42] disk0: WDC WD3200BJKT-00F4T0
6/30/2009 9:15:41 PM com.AaronShep.launchd.hdapm[42] Setting APM level to 0xfe:
6/30/2009 9:15:41 PM com.AaronShep.launchd.hdapm[42] Success

That confirms it! Your clicks will be gone and your drive will wear normally. Enjoy your quiet computer!

Update -- This fix has had mixed results for my visitors. Though I can only report what has worked for me, the comments below might include suggestions better suited to your own Mac.