Bug#777269: systemd: logind - Unexpected ACPI behavior

Nicolas Kuttler nkuttler at gmail.com
Sat Feb 7 08:49:04 GMT 2015


Package: systemd
Version: 215-11
Severity: important

Dear systemd maintainers,

this is a problem I faced myself, and yesterday I helped an IRC user
troubleshoot the same problem. We use acpid to handle ACPI events
like lid close and the power button. However, systemd's logind does
this as well and may conflict with existing configurations.

Here's a configuration that reliably leads to data loss. Install acpid
and pm-utils to reproduce, and configure as described in man 8 acpid,
the EXAMPLE section. Instead of shutting down the system suspend it.

In file /etc/acpi/events/power:

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

In file /etc/acpi/power.sh however:

/usr/sbin/pm-suspend

This configures the computer to suspend when the power button is
pressed. However, logind powers the system off
(HandlePowerKey=poweroff is the default).

So pushing the power button now shuts down the system and loses any data
not written to persistent storage. This data loss is why the bug is at
least important.

I think one way to fix this bug is to document the new behaviour in the
release notes, section 5.6 [1], analogous to section 5.6.2 "Locally
modified init-scripts may need to be ported to systemd". E.g.

==============================================================================
Locally modified power management may need to be ported to systemd

If you have modified the default power management behavior, for example
with the acpid package, please be aware that these changes now may have
been superseded by systemd's logind. Refer to man 5 logind.conf, and
configure how logind handles events. If you wish to keep your current
configuration you can configure logind to ignore events like power and
suspend button presses, and lid close.
==============================================================================

There may be more ways to configure power management I'm not aware of,
so this wording may be incomplete.

Thank you,

Nicolas

P.S. I have only marked this bug as important despite
https://www.debian.org/Bugs/Developer suggesting grave for data loss as
only data in memory is affected, and it only happens with local
customizatons. Feel free to upgrade to grave.

[1] https://www.debian.org/releases/jessie/amd64/release-notes/ch-information.en.html#systemd-upgrade-default-init-system

-- Package-specific info:

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  acl             2.2.52-2
ii  adduser         3.113+nmu3
ii  initscripts     2.88dsf-58
ii  libacl1         2.2.52-2
ii  libaudit1       1:2.4-1+b1
ii  libblkid1       2.25.2-5
ii  libc6           2.19-14
ii  libcap2         1:2.24-6
ii  libcap2-bin     1:2.24-6
ii  libcryptsetup4  2:1.6.6-5
ii  libgcrypt20     1.6.2-4+b1
ii  libkmod2        18-3
ii  liblzma5        5.1.1alpha+20120614-2+b3
ii  libpam0g        1.1.8-3.1
ii  libselinux1     2.3-2
ii  libsystemd0     215-11
ii  mount           2.25.2-5
ii  sysv-rc         2.88dsf-58
ii  udev            215-11
ii  util-linux      2.25.2-5

Versions of packages systemd recommends:
ii  dbus            1.8.14-2
ii  libpam-systemd  215-11

Versions of packages systemd suggests:
pn  systemd-ui  <none>

-- Configuration Files:
/etc/systemd/logind.conf changed [not included]

-- no debconf information



More information about the Pkg-systemd-maintainers mailing list