You are not logged in.

#1 2020-02-09 12:18:14

izflare
Member
Registered: 2020-02-09
Posts: 3

[SOLVED] systemd-logind does not detect Lid open/close correctly

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

#2 2020-02-11 15:58:50

izflare
Member
Registered: 2020-02-09
Posts: 3

Re: [SOLVED] systemd-logind does not detect Lid open/close correctly

I fixed the problem by myself. Thanks.

Offline

#3 2020-02-11 16:01:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,712

Re: [SOLVED] systemd-logind does not detect Lid open/close correctly

Care to share what it was in the end? It might help other people:  https://wiki.archlinux.org/index.php/Co … way_street

Offline

#4 2020-02-13 02:31:41

izflare
Member
Registered: 2020-02-09
Posts: 3

Re: [SOLVED] systemd-logind does not detect Lid open/close correctly

V1del wrote:

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

#5 2020-02-14 04:36:33

RoundCube
Member
Registered: 2016-05-14
Posts: 36

Re: [SOLVED] systemd-logind does not detect Lid open/close correctly

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

Board footer

Powered by FluxBB