[ltp] Head's up: new Lenovo BIOSes and HD APM (hdparm -B)

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Mon, 29 May 2006 11:33:12 -0300


I have this thing for attacking a single config problem and making sure it
works 100% fine from bottom up, even if I have to look into EC firmware and
kernel modules to find out what's wrong.  Now that IrDA and ACPI are done,
it is time for the HD :-)

Basically, you probably should keep one eye on the unload and spin counters
in the SMART attributes.  Your BIOS could be telling the disk to unload
heads so often, the HD might expire in less than two years.

The T43 BIOS (and likely BIOSes for newer models and the R52 too) will
fiddle around with the HD's APM setting (hdparm -B).  It *does not* matter
what you tell the BIOS to do, it may still touch what it shouldn't.

Likely times when you will get the HD with strange settings are just after a
resume, especially from S3 (suspend-to-ram), and after ac-power transitions.

The latest T43 BIOS will set a Hitachi 5K* HD to its "middle level" of PM at
every S3 resume, for example.  That causes the disk to unload heads every
~20s of inactivity so.  This time *will* change depending on access
patterns, the disk tries to predict if you will need it or not (see
Hitachi's complete datasheet for more info).

It is a good thing Hitachi 5K100s are rated for 600k unloads, my relatively
unused thinkpad was already at 13k or so when I noticed, tracked down, and
solved this issue.  Given my usage pattern, it should be on the 1k range :-P

For those curious, I just set the proper disk paramenters in Debian's hdparm
initscript config, and told suspend2 to always reapply those settings
imediately after resume (make sure that it runs *before* laptop-mode-tools
if you want laptop-mode-tools to be able to control HD APM as well...).

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh