improper APM settings chosen when power status cannot be determined

Bug #1502307 reported by Antoine Pitrou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hdparm (Ubuntu)
New
Undecided
Unassigned

Bug Description

On my *desktop* machine, on_ac_power returns 255 as a status code, which according to the man page means "Power status could not be determined". This is reasonable, but unfortunately /etc/apm/event.d/20hdparm takes it (*) as meaning "use the conservative setting" which sets the hard drive to spin down after 90 seconds of inactivity. This is entirely inappropriate for a desktop machine, as now I have to wait several seconds each time I access my non-system hard drive.

/etc/apm/event.d/20hdparm should really take 255 to mean "this is unlikely to be a battery-powered machine at all, don't mess with the power management settings".

(*) relevant snippet:

choose_power ()
{
    if on_ac_power > /dev/null
    then
 power_performance
    else
 power_conserve
    fi
}

Revision history for this message
Antoine Pitrou (pitrou) wrote :

Note the aforementioned file is part of the hdparm package, which is reasonable to install on a desktop machine:

$ dpkg -S apm/event.d/20hdparm
hdparm: /etc/apm/event.d/20hdparm

affects: laptop-mode-tools (Ubuntu) → hdparm (Ubuntu)
Revision history for this message
Antoine Pitrou (pitrou) wrote :

I'm entirely sure about the diagnosis, since it seems the configuration is conditioned on APMD_DRIVES (does it get a default value when the script is being run?). What I know is that, since Ubuntu 15.04, my HDD has been showing this behaviour of spinning down quite quickly while it didn't before...

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.