missing hdparm -B setting during boot

Bug #244832 reported by ceg
14
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Undecided
Tormod Volden

Bug Description

Binary package hint: acpi-support

/etc/acpi/power.sh sets fixed hdparm values but gets called only when switching from/to AC.

Disk spin-down and head parking should not be activated without controlled disk idling. The regular uncoordinated logging or journaling activity may spin the disks back up almost imediately after spinning down and lead to excessive load cycling.
(https://wiki.ubuntu.com/PowerManagement)

Laptop drives may default to park their heads quickly when powered on. Thus hdparm -B255 should be set during boot. (hdparm -B255 does not set undefined value 255 but switches the drives apm feature off.) (Testing for the minimal value without head parking occurances may be ok for desktop machines, too.)

Flexible approach:
Let laptop-mode-tools switch hdparm settings for harddisks to -B 255 on AC. (And even when laptop_mode kernel feature is not activated. (the default case))

Package acpi-support:
Remove laptop_mode start/stop calls and hdparm stuff from power.sh
Remove ENABLE_LAPTOP_MODE setting from /etc/default/acpi-support. (And point to laptop-mode.conf for LM on battery, empty battery and AC.)

Package laptop-mode-tools:
Include scripts that call "/usr/bin/laptop_mode auto" in in /etc/acpi/ac.d, battery.d, resume.d and start.d. Then its the users choice to put scripts after or before the laptop-mode symlinks.
(Adapt the approach from the original laptop-mode-tools debian package to current ubuntu acpi-support)

(The current laptop-mode disk-idleing approach seems to be a left-over from the droped ubuntu-laptop-mode package config.)

Revision history for this message
ceg (ceg) wrote :

There is now an overview about the related bugs in the wiki.
https://wiki.ubuntu.com/PowerManagement#head-ab94c99627b86e9fbb29a09d3316178269c3e764

Revision history for this message
Colin Watson (cjwatson) wrote :

Does this change fix this bug, even though it's not specifically as in the description? Note the change from Bart Samwel near the top.

acpi-support (0.111) intrepid; urgency=low

  * lib/IBM.config: Change VBE state and POST_VIDEO for 1834's
    (LP: #40621, #211285)
  * Incorporate a portion of the changes from Debian, as detailed below.
    Debian has been accumulating valuable fixes and structural changes for
    some years, but it will take some time to digest all of them.

  [ Bart Samwel ]
  * ac.d/90-hdparm.sh, battery.d/90-hdparm.sh, resume.d/90-hdparm.sh,
    start.d/90-hdparm.sh: Set hdparm power management to 254 for all hard
    drives. Ignore errors while detecting of APM is supported. Set
    hdparm -B 128 while on battery in 90-hdparm.sh. Head parking is useful
    on the road for shock protection. Still set hdparm -B 254 while on AC.
    (Closes: #448673, #452489, #453478, #458787, #481685)
  * Switch from #!/bin/bash to #!/bin/sh in a number of scripts, and
    cleanup bashisms throughout. Continues a change started with 0.93.
    (Closes: #407510, #485435, #453861)
  * Add checks for existance of key-constants and state-funcs throughout
    scripts to prevent erroneous failures when using eeepc-acpi-scripts.
    Use "test ... || ..." style over "[ ... ] || ..." just for consistency.
    (Closes: #469556)
  * Check if we can actually open event device in acpi_fakekey.c.
    (Closes: #410478)
  * Correctly detect keyboard event device in acpi_fakekey.c. Apparently
    the power key is in the range checked by acpi_fakekey. It's now
    changed it so that it assumes that any input device which has a key in
    the QWERTYUIOP range is "the" keyboard.
    (Closes: #433771)
  * Remove useless use of grep in asus-touchpad.sh.
  * Add HOTK key names in events/asus-* for additional keys.
  * Support Asus Eee PC volume up/down and mute keys in events/asus-eee-volume-*.
    (Closes: #459326)
  * Add rotatescreen.sh, asus-rotate script to support Asus R1F tablet
    screen rotation.
    (Closes: #450531)

  [ Raphael Hertzog ]
  * Add a new SKIP_INTERFACES variables in /etc/default/acpi-support and use
    it to define network interfaces that are not tied to hardware to avoid
    shutting them down during suspend, such as lo, qemu, and dummy.
  * Improved package description in control file, thanks to Cl?ment Stenac.
    (Closes: #383691)

  [ Loic Minier ]
  * Install new manpage for acpi_fakekey, thanks Nico Golde.
    (Closes: #383365)
  * Fix "APCI" instead of "ACPI" typo in IBM.config; thanks Joshua Kwan;
    (Closes: #389511)

 -- Bryce Harrington <email address hidden> Wed, 24 Sep 2008 08:43:42 -0700

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

Is this still a problem in Ubuntu 8.10?

Changed in acpi-support:
assignee: nobody → tormodvolden
status: New → Incomplete
Revision history for this message
ceg (ceg) wrote :

In 9.10: hdparm -B gets set correctly (from another package apparently, /etc/acpi/power.sh rightly so does not mess with this any more)

Changed in acpi-support (Ubuntu):
status: Incomplete → Fix Released
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.