[Pkg-acpi-devel] Bug#734333: acpi-support-base: unexpected shutdown by short press of power button

Vincent Lefevre vincent at vinc17.net
Fri Jun 20 08:21:54 UTC 2014


On 2014-06-20 08:17:54 +0200, Michael Meskes wrote:
> Anyway, acpi-support is supposed to handle these request if no other
> software is doing it. Or in other words, reacting correctly to the
> key event is not a bug at all.

Well, at least shutting down the machine when the power button has
been used to wake it up doesn't make sense at all for a default
configuration, thus should be regarded as a bug.

BTW, I can see in /usr/share/doc/acpid/examples/powerbtn.sh that it
does:

# Skip if we just in the middle of resuming.
test -f /var/lock/acpisleep && exit 0

I suppose that this handles the problem I've mentioned.

> If you don't want that reaction, feel free to configure acpi-support
> accordingly. Keep in mind that all files under /etc are considered config
> files.

But the lack of a namespace means that acpi-support can conflict
with what the user does. For instance, the acpid(8) man page gives
an example:

------------------------------------------------------------
EXAMPLE
       This  example will shut down your system if you press the power
       button.

       Create a file named /etc/acpi/events/power  that  contains  the
       following:

              event=button/power
              action=/etc/acpi/power.sh "%e"

       Then  create  a file named /etc/acpi/power.sh that contains the
       following:

              /sbin/shutdown -h now "Power button pressed"
------------------------------------------------------------

but acpi-support uses the file /etc/acpi/power.sh chosen in this example
for something completely different. If the user creates this file
following the example before installing acpi-support, bad things will
happen when acpi-support is installed (since overriding a user file is
not acceptable, this user file will be used by /etc/acpi/events/battery
and /etc/acpi/events/ac for something that it is not expected to do).

Similar problems could occur with upgrades, when new config files from
acpi-support need to be installed.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the Pkg-acpi-devel mailing list