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

Hibernate button only works once #57

Closed loulou921222 closed 3 years ago

loulou921222 commented 3 years ago

After resuming from suspend or hibernate, the hibernate button doesn't do anything when pressed. In the extensions menu, the on/off switch is grayed out. It'll work again if I restart the gnome shell afterwards.

loulou921222 commented 3 years ago

5.4.68-1-lts kernel Gnome version 3.36.6 on Xorg

p91paul commented 3 years ago

can you get journalctl log while clicking on hibernate? Having the on-off switch grayed out is highly unusual. Are you able to use systemctl hibernate twice?

loulou921222 commented 3 years ago

I am always able to use systemctl hibernate, it always works πŸ™‚ I’m always able to use the button from the extension when the on/off switch for the extension in gnome-tweaks is blue (on) The button is always on when: -I only just booted up or -I restarted gnome shell The button is always grayed out when: -I resumed (from hibernate or suspend [ram] - the only supported other states on my system other than off and on) or -If I click the button. If it's off or on, it'll get grayed out until I restart gnome-shell, then it'll go to on or off (depending on what I was trying to set it to)

When the on/off button for the extension is grayed out, clicking the hibernate button from the extension doesn't even show the confirmation menu, Are you sure you want to hibernate or something like that

Are there any parameters that I should be running journalctl with?

sudo journalctl -r
-- Logs begin at Fri 2020-07-17 12:56:40 BST, end at Thu 2020-10-01 17:23:10 BST. --
Oct 01 17:23:10 Arch kernel: audit: type=1105 audit(1601569390.087:413): pid=88090 uid=0 auid=1000 ses=5 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/>
Oct 01 17:23:10 Arch kernel: audit: type=1110 audit(1601569390.087:412): pid=88090 uid=0 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? termi>
Oct 01 17:23:10 Arch kernel: audit: type=1101 audit(1601569390.087:411): pid=88090 uid=1000 auid=1000 ses=5 msg='op=PAM:accounting grantors=pam_permit,pam_time acct="lou" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=s>
Oct 01 17:23:10 Arch sudo[88090]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Oct 01 17:23:10 Arch sudo[88090]:      lou : TTY=pts/0 ; PWD=/home/lou ; USER=root ; COMMAND=/usr/bin/journalctl -r
Oct 01 17:23:10 Arch audit[88090]: USER_START pid=88090 uid=0 auid=1000 ses=5 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:23:10 Arch audit[88090]: CRED_REFR pid=88090 uid=0 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:23:10 Arch audit[88090]: USER_ACCT pid=88090 uid=1000 auid=1000 ses=5 msg='op=PAM:accounting grantors=pam_permit,pam_time acct="lou" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:23:10 Arch sudo[88090]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Oct 01 17:23:10 Arch dbus-daemon[463]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Oct 01 17:23:10 Arch dbus-daemon[463]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.13098' (uid=0 pid=88090 comm="sudo journalctl -r ")
Oct 01 17:22:51 Arch kernel: audit: type=1104 audit(1601569371.397:410): pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? termi>
Oct 01 17:22:51 Arch kernel: audit: type=1106 audit(1601569371.397:409): pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev>
Oct 01 17:22:51 Arch audit[88052]: CRED_DISP pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:22:51 Arch audit[88052]: USER_END pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:22:51 Arch sudo[88052]: pam_unix(sudo:session): session closed for user root
Oct 01 17:22:50 Arch kernel: audit: type=1105 audit(1601569370.307:408): pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/>
Oct 01 17:22:50 Arch kernel: audit: type=1110 audit(1601569370.307:407): pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? termi>
Oct 01 17:22:50 Arch kernel: audit: type=1101 audit(1601569370.307:406): pid=88052 uid=1000 auid=1000 ses=5 msg='op=PAM:accounting grantors=pam_permit,pam_time acct="lou" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=s>
Oct 01 17:22:50 Arch sudo[88052]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Oct 01 17:22:50 Arch sudo[88052]:      lou : TTY=pts/0 ; PWD=/home/lou ; USER=root ; COMMAND=/usr/bin/journalctl -r
Oct 01 17:22:50 Arch audit[88052]: USER_START pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:22:50 Arch sudo[88052]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Oct 01 17:22:50 Arch audit[88052]: CRED_REFR pid=88052 uid=0 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:22:50 Arch audit[88052]: USER_ACCT pid=88052 uid=1000 auid=1000 ses=5 msg='op=PAM:accounting grantors=pam_permit,pam_time acct="lou" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 01 17:22:50 Arch dbus-daemon[463]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Oct 01 17:22:50 Arch dbus-daemon[463]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.13097' (uid=0 pid=88052 comm="sudo journalctl -r ")

at 17:23:00 I pressed the button 5 times.

p91paul commented 3 years ago

I'm on 3.36 too, and I just recovered from my second successful hibernation through the extension... so I guess I cannot reproduce. Which button did you press while collecting your logs? the hibernate button, or the on-off button? can you send me what is logged when you press the blue button and it turns grey?

loulou921222 commented 3 years ago

I pressed the hibernate button. Am I collecting the logs correctly by using journalctl -r?

loulou921222 commented 3 years ago

Resuming from hibernate now (although the same happens resuming for suspend too) image it’s grayed out (hibernate button still there, does nothing) restarting gnome shell image it’s blue, and the hibernate button works clicking it once, and it goes gray image I see an error in the logs

-- Logs begin at Fri 2020-07-17 12:56:40 BST, end at Sat 2020-10-03 14:24:35 BST. --
10月 03 14:24:35 Arch kernel: audit: type=1105 audit(1601731475.749:108): pid=15062 uid=0 auid=1000 ses=4 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev>
10月 03 14:24:35 Arch kernel: audit: type=1110 audit(1601731475.749:107): pid=15062 uid=0 auid=1000 ses=4 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? term>
10月 03 14:24:35 Arch kernel: audit: type=1101 audit(1601731475.749:106): pid=15062 uid=1000 auid=1000 ses=4 msg='op=PAM:accounting grantors=pam_permit,pam_time acct="lou" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=>
10月 03 14:24:35 Arch audit[15062]: USER_START pid=15062 uid=0 auid=1000 ses=4 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
10月 03 14:24:35 Arch sudo[15062]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
10月 03 14:24:35 Arch sudo[15062]:      lou : TTY=pts/0 ; PWD=/home/lou ; USER=root ; COMMAND=/usr/bin/journalctl -r
10月 03 14:24:35 Arch audit[15062]: CRED_REFR pid=15062 uid=0 auid=1000 ses=4 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
10月 03 14:24:35 Arch audit[15062]: USER_ACCT pid=15062 uid=1000 auid=1000 ses=4 msg='op=PAM:accounting grantors=pam_permit,pam_time acct="lou" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
10月 03 14:24:35 Arch sudo[15062]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
10月 03 14:24:35 Arch dbus-daemon[458]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
10月 03 14:24:35 Arch dbus-daemon[458]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.2804' (uid=0 pid=15062 comm="sudo journalctl -r ")
10月 03 14:24:33 Arch gnome-shell[965]: JS ERROR: Extension hibernate-status@dromi: TypeError: buttonGroup is undefined
                                            disable@/usr/share/gnome-shell/extensions/hibernate-status@dromi/extension.js:217:9
                                            disable@/usr/share/gnome-shell/extensions/hibernate-status@dromi/extension.js:246:15
                                            _callExtensionDisable@resource:///org/gnome/shell/ui/extensionSystem.js:107:32
                                            _onEnabledExtensionsChanged/<@resource:///org/gnome/shell/ui/extensionSystem.js:500:18
                                            _onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:499:21
                                            _init/createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:529:46
                                            disableExtension@resource:///org/gnome/shell/ui/extensionSystem.js:208:29
                                            DisableExtension@resource:///org/gnome/shell/ui/shellDBus.js:311:38
                                            _handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:327:38
                                            _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:404:34
10月 03 14:24:16 Arch dleyna-renderer-service[14979]: dLeyna: Exit
10月 03 14:24:15 Arch gnome-shell[965]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x7400007
10月 03 14:24:15 Arch dbus-daemon[911]: [session uid=1000 pid=911] Successfully activated service 'org.gnome.Shell.Extensions'
10月 03 14:24:15 Arch dbus-daemon[911]: [session uid=1000 pid=911] Activating service name='org.gnome.Shell.Extensions' requested by ':1.230' (uid=1000 pid=14985 comm="/usr/bin/gjs /usr/share/gnome-shell/org.gnome.Exte")
10月 03 14:24:15 Arch dbus-daemon[911]: [session uid=1000 pid=911] Successfully activated service 'org.gnome.Extensions'
10月 03 14:24:14 Arch dbus-daemon[911]: [session uid=1000 pid=911] Activating service name='org.gnome.Extensions' requested by ':1.218' (uid=1000 pid=965 comm="/usr/bin/gnome-shell ")
10月 03 14:24:14 Arch dleyna-renderer-service[14979]: Client :1.227 lost
10月 03 14:24:14 Arch dleyna-renderer-service[14979]: Calling GetRenderers method
10月 03 14:24:14 Arch dbus-daemon[911]: [session uid=1000 pid=911] Successfully activated service 'com.intel.dleyna-renderer'

Restart the shell, and it's off correctly click it again, and it goes on (not gray) but clicking it again to turn it off will turn it gray

only trying to turn it off turns it gray, or after resuming

p91paul commented 3 years ago

You are running an outdated version of this extension which is not compatible with gnome 3.36. Please update through extensions.gnome.org, or uninstall and reinstall if necessary!

p91paul commented 3 years ago

For reference, this was the offending bug https://github.com/arelange/gnome-shell-extension-hibernate-status/issues/50

loulou921222 commented 3 years ago

Sorry, yeah you're right, I installed it manually and it works my repos were out of date