Package: systemd Version: 235-3 Severity: normal Dear Maintainer,
I want to be able to configure if my laptop should suspend when closing the lid. Because I do not want to kill the X session for this, changing logind.conf and restarting logind is not an option. Therefore, I set HandleLidSwitch=suspend and HandleLidSwitchDocked=suspend and want to manually disable suspend using "systemctl mask sleep.target suspend.target". It works insofar that when closing the lid, the laptop doesn't suspend, but logind crashes multiple times in rapid succession. journalctl: Nov 20 21:39:26 litterbox systemd-logind[10697]: Lid closed. Nov 20 21:39:26 litterbox systemd-logind[10697]: Suspending... Nov 20 21:39:26 litterbox systemd-logind[10697]: Assertion 'signal_name[w]' failed at ../src/login/logind-dbus.c:1495, function send_prepare_for(). Aborting. [...unrelated kernel log entries...] Nov 20 21:39:26 litterbox systemd[1]: systemd-logind.service: Main process exited, code=killed, status=6/ABRT Nov 20 21:39:26 litterbox systemd[1]: systemd-logind.service: Failed with result 'signal'. Nov 20 21:39:26 litterbox systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart. Nov 20 21:39:26 litterbox systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 2. Nov 20 21:39:26 litterbox systemd[1]: Stopped Login Service. Nov 20 21:39:26 litterbox systemd[1]: Starting Login Service... Nov 20 21:39:26 litterbox systemd[1]: Started Login Service. Nov 20 21:39:26 litterbox systemd-logind[10892]: New seat seat0. Nov 20 21:39:26 litterbox systemd-logind[10892]: Watching system buttons on /dev/input/event6 (Power Button) Nov 20 21:39:26 litterbox systemd-logind[10892]: Watching system buttons on /dev/input/event4 (Power Button) Nov 20 21:39:26 litterbox systemd-logind[10892]: Watching system buttons on /dev/input/event3 (Lid Switch) Nov 20 21:39:26 litterbox systemd-logind[10892]: Watching system buttons on /dev/input/event5 (Sleep Button) Nov 20 21:39:26 litterbox systemd-logind[10892]: Watching system buttons on /dev/input/event1 (Logitech USB Receiver) Nov 20 21:39:26 litterbox systemd-logind[10892]: Watching system buttons on /dev/input/event2 (Logitech USB Receiver) Nov 20 21:39:26 litterbox systemd-logind[10892]: Watching system buttons on /dev/input/event0 (AT Translated Set 2 keyboard) Nov 20 21:39:26 litterbox systemd-logind[10892]: New session 4 of user penma. Nov 20 21:39:26 litterbox systemd-logind[10892]: New session 1 of user penma. Nov 20 21:39:26 litterbox systemd-logind[10892]: Suspending... Nov 20 21:39:26 litterbox systemd-logind[10892]: Assertion 'signal_name[w]' failed at ../src/login/logind-dbus.c:1495, function send_prepare_for(). Aborting. Nov 20 21:39:26 litterbox systemd[1]: systemd-logind.service: Main process exited, code=killed, status=6/ABRT Nov 20 21:39:26 litterbox systemd[1]: systemd-logind.service: Failed with result 'signal'. Nov 20 21:39:26 litterbox systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart. [...continues multiple times until...] Nov 20 21:39:27 litterbox systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 7. Nov 20 21:39:27 litterbox systemd[1]: Stopped Login Service. Nov 20 21:39:27 litterbox systemd[1]: systemd-logind.service: Start request repeated too quickly. Nov 20 21:39:27 litterbox systemd[1]: systemd-logind.service: Failed with result 'signal'. Nov 20 21:39:27 litterbox systemd[1]: Failed to start Login Service. after which the whole X session goes down because [ 1689.396] (EE) Fatal server error: [ 1689.396] (EE) systemd-logind disappeared (stopped/restarted?) [ 1689.396] (EE) [ 1689.396] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. The crashes are reproducible when the events above are masked, and they also reliably disappear after unmasking said events. I feel that logind should not crash in this situation, even if there happens to be a better way to prevent suspend from happening. (For what I'm trying to achieve right now, "systemd-inhibit --what=handle-lid-switch cat" is good enough and doesn't crash logind) I run X via startx with no desktop environment (only dwm). -- Package-specific info: -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages systemd depends on: ii adduser 3.113+nmu3 ii libacl1 2.2.52-2 ii libapparmor1 2.10-2+b2 ii libaudit1 1:2.4.5-1 ii libblkid1 2.29-1 ii libc6 2.24-7 ii libcap2 1:2.24-12 ii libcryptsetup4 2:1.7.0-2 ii libgcrypt20 1.7.5-3 ii libgpg-error0 1.21-1 ii libidn11 1.33-1 ii libip4tc0 1.6.1-2+b1 ii libkmod2 22-1 ii liblz4-1 0.0~r131-2+b1 ii liblzma5 5.1.1alpha+20120614-2.1 ii libmount1 2.29-1 ii libpam0g 1.1.8-3.2 ii libseccomp2 2.3.1-2.1 ii libselinux1 2.6-3 ii libsystemd0 235-3 ii mount 2.27.1-1 ii procps 2:3.3.11-3 ii util-linux 2.27.1-1 Versions of packages systemd recommends: ii dbus 1.10.6-1 ii libpam-systemd 235-3 Versions of packages systemd suggests: ii policykit-1 0.105-14.1 pn systemd-container <none> Versions of packages systemd is related to: pn dracut <none> ii initramfs-tools 0.120 ii udev 235-3 -- Configuration Files: /etc/systemd/logind.conf changed: [Login] HandleLidSwitch=suspend HandleLidSwitchDocked=suspend -- no debconf information