You are not logged in.

#1 2025-02-15 10:11:08

starch2021
Member
Registered: 2021-01-21
Posts: 34

[Solved] Laptop-Lid Suspend with external monitor stopped working

After some updates and a reboot, when I have an external monitor connected (not necessarily active), "suspend" doesn't work anymore when closing the laptop lid. I didn't change any configuration.

What I've checked and found so far doesn't help me yet, but it may help people with some knowledge on this topic.

There seem to be two ways, one is to have "logind" handle your suspend, the other ...dunno.


$ xfconf-query -c xfce4-power-manager -lv
[...]
/xfce4-power-manager/lid-action-on-ac                   1
/xfce4-power-manager/lid-action-on-battery              1
/xfce4-power-manager/logind-handle-lid-switch           false
[...]
$ xfce4-power-manager -q && xfce4-power-manager --no-daemon --debug

...
        TRACE[xfpm-manager.c:333] xfpm_manager_lid_changed_cb(): LID closed: ((XfpmLidTriggerAction) LID_TRIGGER_SUSPEND)
        TRACE[xfpm-manager.c:339] xfpm_manager_lid_changed_cb(): Ignoring lid closed event: external monitor connected
        TRACE[xfpm-manager.c:333] xfpm_manager_lid_changed_cb(): LID opened: ((XfpmLidTriggerAction) LID_TRIGGER_SUSPEND)
...
$ cat /etc/UPower/UPower.conf
[...]
IgnoreLid=false
[...]
$ cat /etc/systemd/logind.conf  | grep Lid
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#LidSwitchIgnoreInhibited=yes
$ systemd-inhibit --list
WHO               UID  USER PID    COMM            WHAT  WHY                                       MODE 
NetworkManager    0    root 1806   NetworkManager  sleep NetworkManager needs to turn off networks delay
UPower            0    root 2535   upowerd         sleep Pause device polling                      delay
code              1000 sn   105967 code            sleep Application cleanup before suspend        delay
xfce4-screensaver 1000 sn   2737   xfce4-screensav sleep Locking screen before sleep               delay

So it seems the suspend is not handled by "logind", and "systemd" does not list anything to inhibit suspend if there's an external monitor attached.

Last edited by starch2021 (2025-03-21 09:24:11)

Offline

#2 2025-02-15 12:41:00

lambdarch
Member
From: France
Registered: 2021-01-10
Posts: 106
Website

Re: [Solved] Laptop-Lid Suspend with external monitor stopped working

Offline

#3 2025-02-15 13:59:42

starch2021
Member
Registered: 2021-01-21
Posts: 34

Re: [Solved] Laptop-Lid Suspend with external monitor stopped working

thanks, yes, that looks very much like the same issue...."laptop lid suspend" in the search doesn't yield this thread.

So seems there's no solution as of now.

And if I suspend explicitly via menu or command that works, but then if I close the lid the laptop wakes up again.
So currently I have to unplug the dock (switching off the external monitor isn't enough) and close the lid.
Or if I want it to be connected, suspend via menu and leave display open.

Offline

#4 2025-03-21 09:23:42

starch2021
Member
Registered: 2021-01-21
Posts: 34

Re: [Solved] Laptop-Lid Suspend with external monitor stopped working

I've used the solution that came up in the other thread:

as user:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -t bool -s true --create

And as root:

- in "/etc/systemd/logind.conf" set

HandleLidSwitchDocked=suspend

then reload:

systemctl reload systemd-logind

Now my laptop suspends again when closing the lid.

Offline

Board footer

Powered by FluxBB