[Bug 1502307] [NEW] improper APM settings chosen when power status cannot be determined

Antoine Pitrou pitrou at free.fr
Fri Oct 2 19:36:13 UTC 2015


Public bug reported:

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
}

** Affects: hdparm (Ubuntu)
     Importance: Undecided
         Status: New

** Package changed: laptop-mode-tools (Ubuntu) => hdparm (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to hdparm in Ubuntu.
https://bugs.launchpad.net/bugs/1502307

Title:
  improper APM settings chosen when power status cannot be determined

Status in hdparm package in Ubuntu:
  New

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
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/1502307/+subscriptions



More information about the foundations-bugs mailing list