Sample Header Ad - 728x90

How to control laptop lid behaviour in Debian 12 in XFCE

2 votes
1 answer
1515 views
I have recently installed Debian 12 amd64 on a Lenovo IdeaPad 100s. There seem to be a problem with the laptop lid, in paricular I do not find where the behaviour the system should take is set. In xfce-power-manager gui I have set to "Do nothing". Still when I close the lid the system goes to hibernation. After I reopen the lid it goes in a strange mode in which it is not fully out of hibernation in the graphical session. Still the system is "awake enough" that I can go in the second log in (CTRL-ALT-F2) and log in text mode and reboot. I have tried to chance "Do nothing" in other settings, but the system always does the same, as if xfce-power-manager were not really setting anything. I have tried to modify by hand /etc/systemd/logind.conf changing the lines
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
leaving the rest fully commented as I found it
...
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
...
After restarting the service systemctl restart systemd-logind.service and even after rebooting the behavior of the closure of the lid did note change. I doubt systemd-logind is doing anything here because all options are listed as inactive because systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target returns
○ sleep.target - Sleep
     Loaded: loaded (/lib/systemd/system/sleep.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ suspend.target - Suspend
     Loaded: loaded (/lib/systemd/system/suspend.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ hibernate.target - System Hibernation
     Loaded: loaded (/lib/systemd/system/hibernate.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ hybrid-sleep.target - Hybrid Suspend+Hibernate
     Loaded: loaded (/lib/systemd/system/hybrid-sleep.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)
At this point I am left to wonder which program is handling the lid .. Please note that if I use the logout button to do anything like suspend or hibernate or sleep it does it correctly and I am able to wake the machine getting back to a working state. Only when the lid is closed I get this mess ...
Asked by Rho Phi (329 rep)
Jan 7, 2024, 09:40 PM
Last activity: Oct 31, 2024, 12:30 PM