As is the case with many things in Linux, a fix is at hand. Many thanks to SammyNetbook for pointing the way. The frequency of head parking can be changed by lowering the aggressiveness of APM power saving through the hdparm command. In the case of my lappy, running
# hdparm -B 254 /dev/sda
(as root) solved the headparking issue. (There maybe lower levels that work as well, but I'm happy enough with the result now that I haven't experimented.)
Running the command at startup
The effect of the above command ends at restart. To automatically run it when my lappy starts up, I used init.d. I first created a file mfk-hdsilence.sh in /etc/init.d:
#! /bin/sh
# /etc/init.d/mfk-hdsilence.sh
#
# Some things that run always
hdparm -B 254 /dev/sda
exit 0
Then to activate this:
# update-rc.d mfk-hdsilence.sh defaults
I got a warning when I did this, but it seemed safe to ignore. Result? A non-clicky, super silent lappy. Life is good.
Update: it seems suspending the lappy resets the drive's APM, so I'll need to figure out a way to rerun hdparm when waking up. I am currently experimenting with placing a file 30_mfk-hdsilence.sh in /etc/pm/sleep.d:
#! /bin/sh
# 30_mfk-hdsilence.sh
#
# silence aggressive head parking
case ${1} in
resume|thaw)
hdparm -B 254 /dev/sda
;;
esac
exit 0
It seems to be working, but I'll need to live with it for a while to make sure. Suspending under Linux is always stressful for me.
1 comment:
Very helpful, thanks. Weird that it's parking since I have "Put HDD to sleep when possible" turned off in Power Management.
Post a Comment