calls hdparm excessively at boot

Bug #438355 reported by Tormod Volden
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: acpi-support

At boot the combination of acpi-support and pm-utils manages to run the same hdparm -B setting at least three times:

1. /etc/rc2.d/S99acpi-support -> /etc/acpi/power.sh -> /usr/sbin/pm-powersave -> /usr/lib/pm-utils/power.d/95hdparm-apm
2. /etc/rc2.d/S99acpi-support -> /etc/acpi/start.d/90-hdparm.sh
3. /usr/sbin/pm-powersave -> /usr/lib/pm-utils/power.d/95hdparm-apm

Running hdparm can be disruptive to the disk throughput, and on my hardware these hdparm calls during the busy booting often causes disk controller hangs (which never happens in other situations).

ProblemType: Bug
Architecture: i386
Date: Mon Sep 28 21:33:06 2009
DistroRelease: Ubuntu 9.10
Package: acpi-support 0.126
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-11.36-generic
SourcePackage: acpi-support
Uname: Linux 2.6.31-11-generic i686

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Steve Langasek (vorlon)
Changed in acpi-support (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acpi-support - 0.127

---------------
acpi-support (0.127) karmic; urgency=low

  [ Lionel Le Folgoc ]
  * lib/policy-funcs: Recognize xfce4-power-manager as a power manager.
    LP: #425155

  [ Steve Langasek ]
  * Drop /etc/acpi/start.d/90-hdparm.sh: this is redundant because we're
    already calling pm-powersave on start (either via /etc/acpi/power.sh,
    or by one of the desktop power managers as enumerated in
    lib/policy-funcs) so there's no reason we should be reapplying the
    policy here. LP: #443992, #438355, #318980.
  * Add guidance-power-manager to the list of known desktop power managers.
    LP: #154910

  [ Michael Terry ]
  * lib/policy-funcs: Recognize dalston as a power manager. LP: #432578

 -- Steve Langasek <email address hidden> Mon, 05 Oct 2009 20:11:12 -0700

Changed in acpi-support (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Thomas (sci-data-acq-devel) wrote :

I am still experiencing the problem, despite being up to date. My HDD is spinning down every few SECONDS. I changed the /etc/acpi/*.d/90-hdparm.sh files to read 254 on battery line as well, but that didn't fix it. I also tried removing the spin-down setting in /etc/apm/event.d/20hdparm and/or setting it to 0 or 300 or 100, but the hard drive still spins down just as often. I have verified laptop mode is off. I have even tried purging the laptop mode package. WHAT IS TURNING ON SPIN DOWN AND SETTING SUCH A LOW TIMER? I've turned off everything I can find, but it still happens on battery and to a lesser extent

I have an HP Mini 1033 notebook. These hard drives are speced for 100,000 spindowns, and this has wasted 10,000 of them before I resorted to writing a script that just resets the hdparm setting to 254 and the spindown to 0 every 60 seconds. (Yes, 0 disables spindown on here successfully until you next set the APM mode.)

BTW, can you provide a copy of this wrapper for hdparm?

You're killing my hard drive! Please stop this so I can use ubuntu safely!

Revision history for this message
Thomas (sci-data-acq-devel) wrote :

(continuing incomplete sentence)
* and to a lesser extent on AC power (where the spindown timer seems to be more like 60 seconds than 10 seconds).

Changed in acpi-support (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

This bug is fixed in Ubuntu 9.10, as documented. If you have /etc/acpi/*.d/90-hdparm.sh at all, then you don't appear to be using the Ubuntu 9.10 version of this package.

Changed in acpi-support (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Thomas (sci-data-acq-devel) wrote :

Thank you for your quick response.

This is still a bug that needs fixing due to hardware damage. Ubuntu's support for the previous versions extends until the originally announced date, including security fixes, major regressions (which this is), and hardware damage preventing fixes.

Or you could just reveal where hdparm is being called despite these changes, or provide the wrapper script mentioned above so I can figure it out in the same way.

Am I supposed to open a separate bug report for 9.04 then?

Revision history for this message
Thomas (sci-data-acq-devel) wrote :

Also, "it's fixed in the unreleased next version of Ubuntu" doesn't help when my hardware is being damaged by the current version.

I didn't ever intend to upgrade to 9.10, though, and I'm sure the same is true of the majority of Ubuntu users.

This bug has cost some people hundreds of dollars. It would have done the same to me if I weren't the sort of nerd who would know why the hard drive is kerchunking every few minutes and what sort of place to look to find a fix. Most would assume that their hardware is broken.

I could write my own wrapper script, but that would be a silly waste of time when you obviously already have one (see post #1). Please provide that script or provide information on where the 9.04 version of Ubuntu calls hdparm that is not listed in #3. I grepped the whole darn drive for it and I don't see it. Something is resetting the APM mode to something other than 254 and/or resetting the spindown timeout to a REALLY low number while on battery.

You really ought to release a fix for 9.04 ASAP if this fix does apply to the situation I am experiencing. There are a good many of this notebook running UNR out there, as it's sold with it.

Do it for all the people whose hard drives you can avoid breaking because of it.

Revision history for this message
Steve Langasek (vorlon) wrote :

That next version of Ubuntu is being released tomorrow.

I don't know why you think that the vast majority of Ubuntu users are not going to upgrade. If they're running a standard Ubuntu install, then they will be offered this upgrade automatically; and if they plan to use their netbook for longer than the next year, upgrading is the only way to maintain security support. (If they aren't using a standard Ubuntu install, then an update in the Ubuntu 9.04 repository isn't going to help anyway.)

When on AC power, the default Ubuntu install *always* sets the apm value to 254, which should disable spindown. If you're getting a different value, this isn't originating with Ubuntu. However, there are several bugs in 9.04 regarding the apm settings used while on battery; see /usr/lib/pm-utils/power.d/ for the relevant scripts. You'll also want to delete /etc/pm/sleep.d/99laptop-mode, which was included due to a bug in the laptop-mode-tools package and takes effect even if laptop-mode-tools is disabled.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thomas, you can find my hdparm wrapper script in bug 397096. Please open a new bug if something is wrong, because this bug here (which I filed for acpi-support) has been fixed. You can also boot with "nohdparm". All this refers to Ubuntu 9.10 of course.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.