I spotted this interesting nugget this morning. Figured I’d document it for myself and share. Looks like Ubuntu (even with 7.10) is changing the APM settings for harddrives to be uber-aggressive — I mean the most aggressive it can be. The setting is found in /etc/acpi/power.sh:

When switching to battery power, /etc/acpi/power.sh issues the command hdparm -B 1 to all block devices. This leads to extremely frequent load cycles. For example, my new thinkpad has already done well over 7000 load cycles — in only 100 hours. That’s at least one unloading per minute…most laptop drives handle up to 600,000 such cycles.

A quick fix:

  • make a file named “99-hdd-spin-fix.sh”. The important thing is starting with “99″.
  • make sure the file contains the following 2 lines (fix it if you have PATA HDD):

#!/bin/sh
hdparm -B 255 /dev/sda

  • copy this file to 3 locations:

/etc/acpi/suspend.d/
/etc/acpi/resume.d/
/etc/acpi/start.d/

I used a setting of -B 200 so that I could still get some power savings. A setting of -B 255 disables all power-saving completely.


Leave a Comment