You are not logged in.
Hi,
I installed Arch Linux in my laptop.
I want to suspend my laptop when the lid closed, but it does not work.
I edited /etc/systemd/logind.conf and uncomment the row of HandleLidSwitch=suspend then sudo systemctl restart systemd-logind, but it does not work. First of all, it seems systemd-logind does not detect lid open/close because journalctl -u systemd-logind -f outputs nothing while I close and open the lid.
However, I run systemctl suspend in another terminal, then close and open the lid, my laptop wakes up from suspend and journalctl -u systemd-logind -f shows the following output:
Feb 09 21:14:56 ArchLinux systemd-logind[392]: Operation `sleep` finished.
How should I do?
Thanks.
Last edited by izflare (2020-02-11 15:59:19)
Offline
I fixed the problem by myself. Thanks.
Offline
Care to share what it was in the end? It might help other people: https://wiki.archlinux.org/index.php/Co … way_street
Offline
Care to share what it was in the end? It might help other people: https://wiki.archlinux.org/index.php/Co … way_street
Oh, that's true. I'm sorry.
I installed xorg-drivers and xorg-apps via pacman -S and created /etc/X11/Xwrapper.config such as
allowed_users=anybody
needs_root_rights=yes
then the problem was fixed.
Offline
That sounds somewhat fishy …
I recall something that HandleLidSwitch in /etc/systemd/logind.conf is ignored if your Desktop Environment handled this, so the right place to check would be you DE's power management setting.
Offline
I have almost same problem.
Laptop : XPS 15 9560
DE : Gnome/wayland
- After cold boot(auto login), power button and lcd brightness up/down buttons does not working.
- `systemctl suspend` command OK. Resume by power button OK.
- After resuming, power and brightness up/down buttons are working normally.
- Previously on KDE Plasma/Xorg, no issue at all.
$ journalctl -u systemd-logind.service -b
-- Logs begin at Fri 2020-03-20 13:02:53 KST, end at Fri 2020-03-20 13:08:20 KST. --
-- No entries --
$ systemctl suspend
[ suspend OK then resume by power button]
$ journalctl -u systemd-logind.service -b
-- Logs begin at Fri 2020-03-20 13:02:53 KST, end at Fri 2020-03-20 13:08:59 KST. --
3월 20 13:08:53 a systemd-logind[911]: Operation 'sleep' finished.
$ journalctl -u systemd-logind.service -b -f
-- Logs begin at Fri 2020-03-20 13:02:53 KST. --
3월 20 13:08:53 a systemd-logind[911]: Operation 'sleep' finished.
$ cat /etc/systemd/logind.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=suspend
HandleSuspendKey=suspend
HandleHibernateKey=suspend
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
$ systemctl status systemd-logind.service
● systemd-logind.service - Login Service
Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static; vendor preset: disabled)
Active: active (running) since Fri 2020-03-20 13:01:48 KST; 17min ago
Docs: man:systemd-logind.service(8)
man:logind.conf(5)
https://www.freedesktop.org/wiki/Software/systemd/logind
https://www.freedesktop.org/wiki/Software/systemd/multiseat
Main PID: 911 (systemd-logind)
Status: "Processing requests..."
Tasks: 1 (limit: 19012)
Memory: 5.0M
CGroup: /system.slice/systemd-logind.service
└─911 /usr/lib/systemd/systemd-logind
3월 20 13:08:53 a systemd-logind[911]: Operation 'sleep' finished.
Warning: journal has been rotated since unit was started, output may be incomplete.
This config has no effect.
$ cat /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes
Last edited by YCH (2020-03-20 04:32:25)
YCH
Offline