Ubuntu and That Clicking Noise Coming from Your Hard Drive

Be sure to also check out the follow-up to this article, My Hard Drive Is Clicking Again So I’m Stopping It Cold When Ubuntu Boots.

So you've switched to Ubuntu (or one of the derivative projects like Kubuntu or Xubuntu) and now you keep hearing a strange clicking noise coming from your computer every five or ten seconds. Maybe you've even figured out that it's coming from your hard drive. It's possible you're even savvy enough to recognize that the sound is the heads parking.

What's the problem? Well, that has been discussed ad nauseam around the Internet and won't be discussed here, but it's an issue where hard drive manufacturers set the default power management settings too aggressively and the Ubuntu folks had the audacity (hint: sarcasm at work) to assume the drive manufacturers knew what they were doing.

So on to fixing the problem. If you're running 7.10 then make sure you're up to date. The folks at Ubuntu have simply taken the step to disable sending the hard drive into these heightened states of power management, thus preventing the issue.

If you're running an earlier version then you need to use the hdparm command to turn off the power management on the drive as follows:

hdparm -B 255 /dev/sda

Be aware that some computer BIOSes won't handle 255, the maximum value they handle is 254, which doesn't truly disable APM but will effectively disable it. Reducing or disabling APM on the drive will negatively affect your battery life on a laptop, but can extend the life of your hard disk by months or possibly years.

Unfortunately the above solution will need to be reapplied on every reboot, resume, and any other time the computer BIOS resets the parameters. Since it appears that different laptops will do this at different times I'm going to leave it to you to figure out how best to implement your permanent solution.

  • Share/Bookmark