-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manual suspend doesn't work anymore. #353
Comments
That AI sure doesn't like If that fixes the problem, it's the flag that controls |
I can confirm this issue with Caffeine 55 on GNOME Shell 47.2:
Took me quite some while to figure out that Caffeine is at fault, because it worked before. Disabling Caffeine before attempting to hibernate solves the issue, it's just a little inconvenient to be required to disable Caffeine first. @stuarthayhurst I truly don't understand your comment. Is it about adding a option to allow for manual hibernation again at the cost of force-disabling the "Allow screen blank" option if enabled? Personally I wouldn't mind, because I use Caffeine precisely to keep the screen active. Amazing project btw, to all contributors, keep up the great work here ❤️ |
So when we tell GNOME not to sleep, we get some config on how exactly the shell interprets this. By default, Caffeine tells the shell to not mark to session as idle (a.k.a don't let the screen blank), and also tells it not to suspend the session (a.k.a don't sleep the computer, the most important bit). I was originally replying to someone that used an AI to create a solution that supposedly worked, and in their solution it dropped the part that stops the screen from blanking, which is why I mentioned removing that setting. My comment probably doesn't make much sense without the context of the comment I was replying to, I guess they deleted it? However, I never tested that 'fix' because it was full of syntax errors, and I also can't really reproduce this problem myself. A while ago the shutdown button stopped working after a systemd update but that went away with the next update so I didn't investigate it further.
❤️ |
Ah, I see, this explains my confusion. AFAIK only GitHub Support can remove comments without a trace, so GitHub probably just deleted the whole account if it was some spammy AI account.
Unfortunately I'm not deep enough into the inner workings of Caffeine. Are you referring to Caffeine's optional (disabled by default) "Allow screen blank: Allow turning off screen when Caffeine is enabled" setting? Because setting this to "Always" doesn't seem to make any difference with inhibiting manual hibernation. Or are you referring to something else? Did Caffeine change something in this regard lately? Else this might be a regression of Gnome Shell 47.2, or even some other component (maybe systemd?). I'm an Arch Linux user too (like @00due). Arch Linux is pretty close to upstream, we thus see such regressions early. However, I just checked my Pacman logs (Arch's package manager) and there wasn't a Gnome Shell upgrade recently. I upgraded to Gnome Shell 47.2 on 2024-11-28, Gnome Session didn't release a new version since 47.0 (released in Sept). What was upgraded recently was systemd 257.1 on 2024-12-22. I'm not entirely sure when manual hibernation stopped working, but it might have been around that time. @00due, can you narrow that down further? Kinda matches with the day you've created this issue. If this issue is indeed caused by some other component, it might also explain why you (@stuarthayhurst) can't reproduce it. Are you using older versions of Gnome Shell and/or systemd? Just let us know how we can help you with debugging this issue. Since disabling Caffeine before hibernating works for now (one just needs to know 😆), we could alternatively also just wait a little longer to check whether the next systemd version fixes this again (like with the shutdown button you mentioned). |
Yep, that was the setting I was on about. Thanks for checking that, shame it didn't work :(
Nope, we mostly release around the same time as new GNOME versions, including whichever miscellaneous bits changed between GNOME releases. It had been fine for me on GNOME 47 for a long time, I only saw a few hiccups around the same time as some systemd updates, and nothing recently.
I run Debian Unstable, so my packages should be more or less in line with yours on Arch. Running GNOME Shell 47.2 and SystemD 257.1.
Mmm, nothing immediately seems wrong on our end, I wonder if a component changed how it interpreted the specification (i.e. systemd sees an inhibitor and refuses to suspend / hibernate / shut down). When I triggered the bug before, It could also be that GNOME started checking inhibitors before disabling extensions, meaning Caffeine doesn't get disabled so the inhibitor isn't removed. It could also be that an inhibitor gets leaked, so when Caffeine is disabled to prepare for hibernate / shutdown there's still one left over. Out of curiosity, if you can reproduce this reliably, could you try #334? It reworks how inhibitors are handled, so if that works it might be on our end. |
Is there a way to verify that? Like enabling a debug mode or something? Just let me know how I can help you to debug the issue.
I just tried with #334 and unfortunately the issue persists. Off Topic: I had to check the loaded source code to verify that |
Hm, I might have run into something else then
I suppose you could put something like
Oh well, thanks for checking. That PR completely changes how inhibitors are handled, so it's either an upstream issue or an issue with the inhibitor that we create, such as a bad flag or something like that.
I'm not sure if the shell / extension tool would like that, but you're welcome to test if it breaks the update detection |
I just added It gets even weirder: If I change the version number in |
Did you install it as a user? If you used root then it would install it for root instead. Also, did you log out and back in after making changes? Sometimes even that's not enough and I've had to reboot after making changes, but that's normally only if something had an error. |
After updating my system (Arch Linux) a few days ago, manually suspending has stopped working. The button in the control center does nothing, and the power button prompts me to shut down the PC.
Running
systemctl hybrid-sleep
returns this:Operation inhibited by "username" (PID 1277 "gnome-session-b", user username), reason is "user session inhibited".
I tried disabling my extensions one by one, and the one causing this is Caffeine. Also, if I just disable Caffeine from the control center, that allows me to suspend too.
The text was updated successfully, but these errors were encountered: