You are not logged in.
I am using GNOME/Wayland
And when I close my laptop's lid, nothing shown in the systemd-logind's log, so my laptop cannot suspend on lid closed, which used to be working.
$ cat /proc/acpi/button/lid/LID/state
state: open
$ sleep 5 && cat /proc/acpi/button/lid/LID/state # I closed the lid here
state: closed
$ journalctl -u systemd-logind.service -b -f
5月 18 11:14:21 Planet systemd[1]: Starting User Login Management...
5月 18 11:14:21 Planet systemd-logind[516]: New seat seat0.
5月 18 11:14:21 Planet systemd[1]: Started User Login Management.
5月 18 11:14:22 Planet systemd-logind[516]: New session 1 of user gdm.
5月 18 11:14:28 Planet systemd-logind[516]: New session 3 of user zhaose.
5月 18 11:14:31 Planet systemd-logind[516]: Session 1 logged out. Waiting for processes to exit.
5月 18 11:14:31 Planet systemd-logind[516]: Removed session 1.I found a similar topic: https://bbs.archlinux.org/viewtopic.php?id=252773 but it seems not to be solved.
I haven't edited the logind.conf, and the suspend on lib close option in gnome-tweak-tools also is turned on.
Offline
Does it work from the multi-user.target (no gnome/GDM/etc)?
See 2nd link below.
Online
Does it work from the multi-user.target (no gnome/GDM/etc)?
See 2nd link below.
No, nothing changes. When I close and open the lid there still nothing happens, Lid closed and open was not shown in
sudo journalctl --unit=systemd-logind --followIn addition,
systemctl suspend always works fine, both under GUI and without GUI
Maybe this is not a desktop problem and I should post is in another section?
Offline
Is the lid caught by "sudo libinput debug-events"?
Online
Is the lid caught by "sudo libinput debug-events"?
Yes, I got these:
-event2 SWITCH_TOGGLE +5.543s switch lid state 1
event2 SWITCH_TOGGLE +7.051s switch lid state 0Offline
Does it show up in acpi_listen as well?
https://wiki.archlinux.org/title/Acpid
Wild guess, enable "HandleLidSwitchDocked=suspend" in /etc/systemd/logind.conf
Online
Does it show up in acpi_listen as well?
https://wiki.archlinux.org/title/AcpidWild guess, enable "HandleLidSwitchDocked=suspend" in /etc/systemd/logind.conf
I have already tried enabling "HandleLidSwitchDocked=suspend", it does not work.
The acpi_listen shows LID close and open properly.
Offline
I finally found the problem.
I am using testing repo, and the rc version of systemd may have bugs. I downgrade it to the version in the main repo and it fixed.
Offline
Sounds like this one: https://github.com/systemd/systemd/issues/23425
Offline