Ubuntu, Dell laptop and hard disk power management
There has been some talk those days on laptop hard disk lifespan. See, for example, what Pascal says about it.
So, after some investigation, I saw that on my laptop (Dell Latitude D420) the BIOS doesn't handle an APM value of 255. By default the startup scripts execute hdparm -B 255 /dev/sda (or other devices) and that actually sets the APM value to 128 (as given by hdparm -I /dev/sda | grep Advanced). (I'm using Ubuntu 7.10 -- the script I'm talking about is /etc/acpi/power.sh.)
On the other hand, using -B 254 seems to disable APM. So here's a way to do it, by default, on every boot:
- Add those lines to /etc/hdparm.conf:
/dev/sda {
apm = 254
} - Make /etc/init.d/hdparm run at startup:
ln -s /etc/init.d/hdparm /etc/rcS.d/S07hdparm
And now the load cycle count reported by SMART remains stable. Which means that hopefully my hard disk will live longer.
Addendum: if you don't use SMART, you should. Install the smartmontools package, enable SMART on your disks with smartctl -s on, and read the smartctl(8) manpage. Optionally, enable the smartd monitoring daemon (via /etc/default/smartmontools).

2 comments:
The startup scripts *do not* alter any settings on your hard drives. 'power.sh' does nothing because LAPTOP_MODE is disabled. What you get is the default your BIOS provides and unfortunately that isn't good enough for Linux.
That's right -- I wanted to summarize, and I ended up writing innacuracies... The fact is I began to enable the laptop mode, and when seeing that the -B 255 didn't seem to be taken into account, with further investigation I found out that the BIOS wasn't understanding this value (and that -B 254 was needed to disable APM).
So, I disabled the laptop mode. But, for people who want to use the laptop mode, it's needed also to change the 255 by a 254 in /etc/acpi/power.sh.
Post a Comment