Laptop hard drive clicking in Hardy
Since I installed Hardy a week or so ago, I noticed the hard drive in my laptop was making a strange clicking noise every 5 seconds or so. At first I thought it must be slowly dying, and I was starting to get a bit worried, but then realised it seemed a bit suspicious that it coincided with Hardy so closely, so I searched around.
Turns out I wasn’t the only one with the problem, and I found a solution here. (Thanks to wieman01 on the Ubuntu forums for this.)
What was happening was Ubuntu’s power management was a bit over zealous and was making the hard drive spin up and down far too often. By changing the power settings this can be fixed, using the command:
hdparm -B 254 /dev/xxx
replacing xxx with your drive name, in my case for my SATA drive it was /dev/sda.
254 here is the lowest level of power management, and 255 is off completely. You can try playing with higher values if you like some kind of power management.
To make this run every time the computer starts, add it to a startup script. For example, save a plain text file containing the above line to:
/etc/init.d/local_settings
Then:
cd /etc/init.d
sudo chmod +x local_settings
sudo ln -s local_settings /etc/rc2.d/S99local_settings
This makes the file executable, and creates a symbolic link to it in the folder which contains the start-up scripts, giving it priority 99.
Hopefully your clicking noise will now be gone!
thanks!
few minutes now and no clicks. still crossing my fingers but it seems to be a good fix
one note:
i had to switch the command:
sudo ln -s local_settings /etc/rc2.d/S99local_settings
to:
sudo ln -s ../init.d/local_settings /etc/rc2.d/S99local_settings
otherwise the clicking continued upon a restart.
This bug is present in an install via Wubi as well. However, fstab is listing the boot disk as /host/ubuntu/disks/root.disk instead of /dev/xxx. When trying to use /host/ubuntu/disks/root.disk in th hdparm command, it fails to locate it.
Any ideas?