acpi-support calls pm-powersave even when upower is running

Bug #582471 reported by Steve Langasek on 2010-05-18
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
High
Steve Langasek
Lucid
High
Steve Langasek
Maverick
High
Steve Langasek

Bug Description

SRU justification:
On some hardware, calling pm-utils power.d scripts twice causes system crashes.

Regression potential:
If I got this wrong, then in some cases users will have nothing processing power events at all, which may result in the system being left in "performance" mode while on battery.

Binary package hint: acpi-support

acpi-support in lucid calls pm-powersave unconditionally on ACPI power events, but in lucid, upower is installed by default on the Ubuntu desktop and *also* calls pm-powersave, triggering on udev events. This results in running all the /usr/lib/pm-utils/power.d scripts twice, which is at best unnecessary and at worst, will confuse hardware by multiple calls to hdparm as in bug #340014. acpi-support should be fixed to skip calling pm-powersave in the presence of upower.

(Since upower is unfortunately not yet part of the KDE stack, we will need to be selective at runtime rather than being able to prune this code entirely.)

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: acpi-support 0.136
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
Architecture: amd64
Date: Tue May 18 12:15:25 2010
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: acpi-support

Steve Langasek (vorlon) wrote :
Changed in acpi-support (Ubuntu):
status: New → Triaged
assignee: nobody → Steve Langasek (vorlon)
importance: Undecided → High
Changed in acpi-support (Ubuntu Lucid):
importance: Undecided → High
assignee: nobody → Steve Langasek (vorlon)
milestone: none → ubuntu-10.04.1
Changed in acpi-support (Ubuntu Maverick):
importance: Undecided → High
Changed in acpi-support (Ubuntu Lucid):
status: New → Triaged
Launchpad Janitor (janitor) wrote :

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

---------------
acpi-support (0.137) maverick; urgency=low

  * power.sh, lib/policy-funcs: don't call pm-powersave if upower is running,
    as upower already does this for us unconditionally and we don't want to
    run these scripts twice. Eventually power.sh should be dropped entirely,
    but Kubuntu hasn't yet transitioned to use upower. LP: #582471.
  * lib/power-funcs: drop dependency on finger, we can do this just as well
    using who from coreutils.
 -- Steve Langasek <email address hidden> Tue, 22 Jun 2010 19:16:30 -0700

Changed in acpi-support (Ubuntu Maverick):
status: Triaged → Fix Released
Steve Langasek (vorlon) on 2010-07-09
description: updated
Steve Langasek (vorlon) on 2010-07-10
Changed in acpi-support (Ubuntu Lucid):
status: Triaged → In Progress
John Dong (jdong) wrote :

ACK from ubuntu-sru

Accepted into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in acpi-support (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Martin Pitt (pitti) wrote :

Since lucid final's /etc/acpi/power.sh already calls CheckPolicy() from policy-funcs, this does not affect a standard Ubuntu desktop, since the script does not do anything if gnome-power-manager is running. So I killed g-p-m for verification.

With the lucid-final acpi-support version, I confirm that pm-powersave gets called twice if I plug in or pull out the power chord. This can be seen in /var/log/pm-powersave.log.

With the lucid-proposed acpi-support I confirm that pm-powersave only gets called once. This remains true when gnome-power-manager is running as well.

So as far as I can see this is working fine.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

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

---------------
acpi-support (0.136.1) lucid-proposed; urgency=low

  * power.sh, lib/policy-funcs: don't call pm-powersave if upower is running,
    as upower already does this for us unconditionally and we don't want to
    run these scripts twice. Eventually power.sh should be dropped entirely,
    but Kubuntu hasn't yet transitioned to use upower. LP: #582471.
 -- Steve Langasek <email address hidden> Tue, 22 Jun 2010 19:16:30 -0700

Changed in acpi-support (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers