You are not logged in.
I've upgraded my laptop arch installation after a long period with no upgrade. After it I have broken suspending on LID close.
Current version of systemd is 212.
I have perfectly working suspending when I press suspend button, but definitely not working after closing the LID.
Before update I have suspend on LID configuration in acpid configuration. But after reading similar topic and some log digging I realized that now systemd-logind rule that behavior.
I have such lines in sustemd journal:
apr 29 19:27:25 laptop systemd-logind[1989]: Lid closed.
apr 29 19:27:27 laptop systemd-logind[1989]: Lid opened.
acpi_listen shows almost the same
button/lid LID close
video/switchmode VMOD 00000080 00000000
button/lid LID open
According to bug in arch linux bug tracker and bug in systemd bug tracker I realised that the reason is new behavior of systemd in system with binary nvidia drivers (like my system). And it isn't fixable until next release.
So the question is: how to tell systemd-logind to allow acpid to rule LID events? I want to restore desire behavior using acpid.
Last edited by petRUShka (2014-04-29 16:02:49)
Offline
You can modify /etc/systemd/logind.conf to ignore the laptop lid (lidswitch I think).
However, I don't see why it breaks. Maybe logind took over from acpid and something is inhibiting suspend?
fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
You can modify /etc/systemd/logind.conf to ignore the laptop lid (lidswitch I think).
However, I don't see why it breaks. Maybe logind took over from acpid and something is inhibiting suspend?
Set it to ignore doesn't solve the problem It still in the same state:
apr 30 20:37:48 laptop systemd-logind[8920]: Watching system buttons on /dev/input/event1 (Lid Switch)
Offline
Why do you think systemd(-logind) is blocking your acpid handler script? Can you show us your acpid set up and maybe logs or whatever you used to diagnose the problem?
Offline
Why do you think systemd(-logind) is blocking your acpid handler script? Can you show us your acpid set up and maybe logs or whatever you used to diagnose the problem?
I don't see logger messages from acpid in journalctl log.
Offline
/etc/acpi/events/anything
# Pass all events to our one handler script
event=.*
action=/etc/acpi/handler.sh %e
/etc/acpi/handler.sh: http://pastie.org/private/3a1vjno9earln0jhvfqa
systemctl status acpid.service:
● acpid.service - ACPI event daemon
Loaded: loaded (/usr/lib/systemd/system/acpid.service; enabled)
Active: active (running) since Вт 2014-04-29 17:37:47 MSK; 1 day 3h ago
Main PID: 507 (acpid)
CGroup: /system.slice/acpid.service
└─507 /usr/bin/acpid -f
апр 30 20:32:59 lparch acpid[507]: client connected from 544[0:0]
апр 30 20:32:59 lparch acpid[507]: 1 client rule loaded
апр 30 20:33:02 lparch acpid[507]: client connected from 544[0:0]
апр 30 20:33:02 lparch acpid[507]: 1 client rule loaded
апр 30 21:27:06 lparch acpid[507]: client 544[0:0] has disconnected
апр 30 21:27:06 lparch acpid[507]: client 544[0:0] has disconnected
апр 30 21:27:06 lparch acpid[507]: client connected from 544[0:0]
апр 30 21:27:06 lparch acpid[507]: 1 client rule loaded
апр 30 21:27:08 lparch acpid[507]: client connected from 544[0:0]
апр 30 21:27:08 lparch acpid[507]: 1 client rule loaded
Offline
Raynman wrote:Why do you think systemd(-logind) is blocking your acpid handler script? Can you show us your acpid set up and maybe logs or whatever you used to diagnose the problem?
I don't see logger messages from acpid in journalctl log.
How closely did you look? systemctl says it's enabled and running and your handler.sh contains plenty of logger lines. Does
# journalctl SYSLOG_IDENTIFIER=logger
show you anything? (remember to run as root; that's what the # is supposed to mean)
Offline
Strange situation. I have no logger entries in journalctl output. But I put this
logger "$1 $2 $3 $4"
just before
case "$1" in
After putting logger before case I see logger entries on each event, like this:
may 02 11:19:17 lparch logger[22375]: button/lid LID close
But I still don't see event processing. May something wrong with handler.sh? I'm not a guru in bash scripting, but it is almost the same as default handler.sh
Offline
I have the similar situation. My laptop without an external monitor.
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=poweroff
HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
Closing LID doesn't cause a suspend:
# systemctl status systemd-logind.service
● systemd-logind.service - Login Service
Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static)
Active: active (running) since Сб 2014-06-07 22:10:40 MSK; 2min 58s ago
Docs: man:systemd-logind.service(8)
man:logind.conf(5)
http://www.freedesktop.org/wiki/Software/systemd/logind
http://www.freedesktop.org/wiki/Software/systemd/multiseat
Main PID: 214 (systemd-logind)
Status: "Processing requests..."
CGroup: /system.slice/systemd-logind.service
└─214 /usr/lib/systemd/systemd-logind
июн 07 22:10:47 asus1225b systemd-logind[214]: Watching system buttons on /dev/input/event1 (Lid Switch)
июн 07 22:10:47 asus1225b systemd-logind[214]: Watching system buttons on /dev/input/event2 (Sleep Button)
июн 07 22:10:49 asus1225b systemd-logind[214]: New session c1 of user lightdm.
июн 07 22:11:00 asus1225b systemd-logind[214]: New session c2 of user gray.
июн 07 22:11:52 asus1225b systemd-logind[214]: Lid closed.
июн 07 22:12:06 asus1225b systemd-logind[214]: Lid opened.
июн 07 22:12:08 asus1225b systemd-logind[214]: Lid closed.
июн 07 22:12:23 asus1225b systemd-logind[214]: Lid opened.
июн 07 22:12:25 asus1225b systemd-logind[214]: Lid closed.
июн 07 22:12:33 asus1225b systemd-logind[214]: Lid opened.
Power button doesn't work too.
But if I restart systemd-logind.service - suspend works fine:
# systemctl status systemd-logind.service
● systemd-logind.service - Login Service
Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static)
Active: active (running) since Сб 2014-06-07 22:18:51 MSK; 34s ago
Docs: man:systemd-logind.service(8)
man:logind.conf(5)
http://www.freedesktop.org/wiki/Software/systemd/logind
http://www.freedesktop.org/wiki/Software/systemd/multiseat
Main PID: 660 (systemd-logind)
Status: "Processing requests..."
CGroup: /system.slice/systemd-logind.service
└─660 /usr/lib/systemd/systemd-logind
июн 07 22:18:51 asus1225b systemd-logind[660]: Watching system buttons on /dev/input/event4 (Video Bus)
июн 07 22:18:51 asus1225b systemd-logind[660]: Watching system buttons on /dev/input/event1 (Lid Switch)
июн 07 22:18:51 asus1225b systemd-logind[660]: Watching system buttons on /dev/input/event2 (Sleep Button)
июн 07 22:18:51 asus1225b systemd[1]: Started Login Service.
июн 07 22:18:51 asus1225b systemd-logind[660]: New session c2 of user gray.
июн 07 22:18:51 asus1225b systemd-logind[660]: New session c1 of user lightdm.
июн 07 22:19:08 asus1225b systemd-logind[660]: Lid closed.
июн 07 22:19:08 asus1225b systemd-logind[660]: Suspending...
июн 07 22:19:22 asus1225b systemd-logind[660]: Lid opened.
июн 07 22:19:22 asus1225b systemd-logind[660]: Operation finished.
And power button works again.
After a reboot I need to restart systemd-logind.service again. Can't find out how to fix it.
UPDATE
I changed power management settings inside XFCE and systemd follows these settings. So, the problems was fixed.
Last edited by gray85 (2014-08-14 19:14:31)
Offline