You are not logged in.

#1 2022-01-10 09:12:21

Allexj
Member
Registered: 2015-07-11
Posts: 68

After I switched from GNOME to KDE, laptop does not sleep on lid close

On GNOME if I closed the lid, it goes to sleep correctly. On KDE, in system settings, the option to go to sleep on lid close is missing: https://i.imgur.com/I0wHGxz.png

The lid closed is detected, in fact here is the journalctl log:
Jan 10 09:51:28 Archy systemd-logind[527]: Lid closed.
Jan 10 09:51:28 Archy root[2260]: LID closed
Jan 10 09:51:36 Archy systemd-logind[527]: Lid opened.
Jan 10 09:51:36 Archy root[2264]: LID opened

but nothing happens.

I also edited the logind.conf file but does not help:
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend

If I do systemctl suspend or if I click on Sleep kde button, it goes to sleep, the question is why it does not go to sleep automatically?

Also, if I suspend with systemctl suspend or via Sleep button, and then close the lid... if I reopen the lid, it automatically wakes up! So it appears that the bug is ONLY when I try to suspend...


By now, the workaround is installing acpid, and force the suspend from there, here is the relevant part from /etc/acpi/handler.sh :
button/lid)
        case "$3" in
            close)
                systemctl suspend
                logger 'LID closed'
                ;;
            open)
                logger 'LID opened'
                ;;
            *)
                logger "ACPI action undefined: $3"
                ;;
    esac
    ;;





EDIT:
reported here: https://bugs.kde.org/show_bug.cgi?id=448400 and here: https://gitlab.freedesktop.org/upower/u … issues/165 if you want more info

Last edited by Allexj (2022-01-13 23:21:15)

Offline

Board footer

Powered by FluxBB