[Pkg-acpi-devel] Bug#761458: [acpi-support] doesn't react on ac/battery change

Maurizio Avogadro mavoga at gmail.com
Sat Sep 13 23:54:46 UTC 2014


Package: acpi-support
Version: 0.142-4
Severity: important

acpi-support seems to correctly detect power changes but fails to apply
the matching policy.

The /etc/acpi/power.sh script expects to be called with some positional
parameter or exits:

--------------- 8< ---------------
if [ -z "$*" ] && { CheckPolicy || CheckUPowerPolicy; }; then
    exit;
fi

pm-powersave $*
--------------- 8< ---------------

but the event files /etc/acpi/power.d/ac and /etc/acpi/power.d/battery
calling it don't provide any parameter.

The event files should call the action script with a parameter, or the
action script should be able to call pm-powersave without any parameter
(pm-powersave can choose the correct profile according to on_ac_power
exit status when called without parameters AFAICS).

Furthermore, I noticed that for every ac adapter
connection/disconnection at least 1 ac_adapter and 2 battery acpi events
are generated:

(output of acpi_listen on AC disconnect)
--------------- 8< ---------------
ac_adapter ACPI0003:00 00000080 00000000
battery PNP0C0A:00 00000080 00000001
battery PNP0C0A:00 00000081 00000001
 PNP0C14:01 000000d0 00000000
processor LNXCPU:00 00000081 00000000
processor LNXCPU:01 00000081 00000000
processor LNXCPU:02 00000081 00000000
processor LNXCPU:03 00000081 00000000
processor LNXCPU:04 00000081 00000000
processor LNXCPU:05 00000081 00000000
processor LNXCPU:06 00000081 00000000
processor LNXCPU:07 00000081 00000000
--------------- 8< ---------------

(output of acpi_listen on AC reconnect)
--------------- 8< ---------------
ac_adapter ACPI0003:00 00000080 00000001
battery PNP0C0A:00 00000080 00000001
battery PNP0C0A:00 00000081 00000001
 PNP0C14:01 000000d0 00000000
processor LNXCPU:00 00000081 00000000
processor LNXCPU:01 00000081 00000000
processor LNXCPU:02 00000081 00000000
processor LNXCPU:03 00000081 00000000
processor LNXCPU:04 00000081 00000000
processor LNXCPU:05 00000081 00000000
processor LNXCPU:06 00000081 00000000
processor LNXCPU:07 00000081 00000000
thermal_zone LNXTHERM:00 00000081 00000000
--------------- 8< ---------------

Since the last event is always a "battery" event, simply passing a
parameter to the action script ends up in a system always running in
powersave mode.

I actually ignore what the best solution could be, i.e. letting
pm-powersave decide or detecting the power source before calling it, and
I also ignore whether the acpi events emitted on my system are expected,
or caused by some other issue, or system dependent, but the result is
that power saving features don't work.

Thanks


Maurizio


--- System information. ---
Architecture: amd64
Kernel: Linux 3.16-2.slh.1-aptosid-amd64

Debian Release: jessie/sid
990 testing security.debian.org
990 testing ftp.de.debian.org
500 unstable ftp.de.debian.org
500 unstable aptosid.com
500 stable security.debian.org
500 stable ftp.de.debian.org
500 proposed-updates ftp.de.debian.org
500 oldstable security.debian.org
1 experimental ftp.de.debian.org

--- Package information. ---
Depends (Version) | Installed
==================================-+-=============
acpi-support-base (>= 0.109-1) | 0.142-4
x11-xserver-utils | 7.7+3
acpid (>= 1.0.4) | 1:2.0.23-1
lsb-base (>= 1.3-9) | 4.1+Debian13
pm-utils | 1.4.1-15


Recommends (Version) | Installed
===========================-+-===========
rfkill |
acpi-fakekey | 0.142-4


Suggests (Version) | Installed
================================-+-===========
radeontool |
vbetool | 1.1-3
xinput | 1.6.1-1
xscreensaver | 5.26-1
OR gnome-screensaver | 3.6.1-1+b1
OR kscreensaver | 4:4.14.0-1
OR xautolock |
OR xlock |
OR xtrlock |
OR i3lock |



More information about the Pkg-acpi-devel mailing list