You are not logged in.
I've noticed that sometimes when I close my laptop lid, it doesn't actually suspend, it just locks but stays running. When I open the laptop again, I'm greeted by this window:
I did some research and ended up on the
systemd-inhibit --list
command, which gives this output:
WHO UID USER PID COMM WHAT WHY MODE
NetworkManager 0 root 632 NetworkManager sleep NetworkManager needs to turn off networks delay
UPower 0 root 34617 upowerd sleep Execute critical action block
xfce4-power-manager 1000 makeworld 1106 xfce4-power-man handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch xfce4-power-manager handles these events block
xfce4-screensaver 1000 makeworld 862 xfce4-screensav sleep Locking screen before sleep delay
4 inhibitors listed.
UPower is the only unexpected item, and nothing else blocks except XFCE stuff which I expect, since I run XFCE. When I stop the UPower daemon with
sudo systemctl stop upower
, it immediately starts running again. I believe I read somewhere that it is started whenever a process requests it, maybe over DBus. It makes sense that it's starting all the time, since XFCE uses it to display battery info in the status bar. Anyway, once I restart or stop it with systemctl, the problem goes away, and it doesn't show up in
systemd-inhibit --list
anymore. But eventually it comes back, and so my system will fail to suspend again.
How can I fix this permanently? Is anyone else having this issue?
Last edited by makeworld (2021-10-16 15:09:43)
Offline
Today I was confused why my laptop wasn't going to sleep after connecting power after the battery had run almost empty, and found the exact same issue as you did.
Offline
Glad it's not just me, I was feeling like I was going crazy. Crazier still, the issue seems to have gone away on my computer, I haven't experienced it for the past week or two. Not sure why it would go away, or if it will come back in the future.
Offline
I've filed an issue with upower and attached a merge request for a fix: https://gitlab.freedesktop.org/upower/u … issues/160
Doing my One Good Deed on the Intarwebs today, c.f.: https://xkcd.com/979/
Offline
That's great, thank you. Still not experiencing this issue anymore like I mentioned before, but good to know it can be gone permanently.
Offline
You have to run into the case where the "critical battery action" gets cancelled, because that's where the leak occurs. While I haven't reproed this myself, I think you could repro it by almost running out of battery (and getting whatever desktop notification), then cancelling the notification not by user interaction but by plugging into AC power.
Offline
Ah, that makes more sense, it must just be that I haven't triggered it again. I was having battery issues that later resolved themselves, which would have stopped me from "almost running out of battery" as you describe. Thanks for explaining.
Offline
Fixed merged upstream as of a few hours ago, it'll show in your distro... whenever it shows up :-)
Have a nice day!
Last edited by sheu (2022-01-24 18:10:29)
Offline