arelange / gnome-shell-extension-hibernate-status

Gnome Shell extension that adds a hibernate/hybrid suspend button in Status menu.
GNU General Public License v2.0
151 stars 54 forks source link

"Hybrid Sleep" option is showing up, even though I can't hybrid sleep #104

Closed artemohanjanyan closed 8 months ago

artemohanjanyan commented 10 months ago

"Hybrid Sleep" option is showing up, even though I disabled:

➜  ~ cat /etc/systemd/sleep.conf.d/disable-suspend.conf 
[Sleep]
AllowSuspend=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
➜  ~ sudo systemctl hybrid-sleep          
Call to HybridSleep failed: Sleep verb "hybrid-sleep" not supported

There's also this message in journalctl when I press that button:

gnome-shell[12410]: have hibernate true

I'm running this on a freshly installed Arch, maybe I just didn't configure something properly in order for this check to work.

Can you help me debug this issue?

p91paul commented 9 months ago

Hi, I checked the code doing detection; for reference, it's this function: https://github.com/arelange/gnome-shell-extension-hibernate-status/blob/d3280b8268df9a887954a0d80b54e91328c13076/extension.js#L73C21-L73C21

On my system, the "result" variable always gets value "na" at line 88, both for CanHybridSleep and CanHibernate. So I can conclude that automatic detection of system capabilities is entirely broken, probably due to a change in who knows which gnome version.

I'm not currently hibernating my system anymore, so I'm not really motivated in investigating this. I welcome contributions however.