gnome-shell-extension-caffeine icon indicating copy to clipboard operation
gnome-shell-extension-caffeine copied to clipboard

Caffeine sometimes gets stuck "on" in Gnome 3.14

Open Bujiraso opened this issue 10 years ago • 22 comments

Using the feature where caffeine detects if a window is fullscreen and turns on in those cases, under Gnome 3.14, sometimes the "on" state remains toggled even after the window is closed and the extension cannot be manually toggled off. In these cases, the gnome shell must be restarted to resume functionality.

Bujiraso avatar Nov 26 '14 19:11 Bujiraso

Still encountering this problem in 3.16

Bujiraso avatar Apr 15 '15 20:04 Bujiraso

I encounter the same problem from time to time. In the meantime, I found that disabling and enabling again the extension in gnome-shell resumes normal activity. Still not desirable though.

xaf avatar Apr 24 '15 03:04 xaf

I'll try to debug this

eonpatapon avatar Jun 27 '15 11:06 eonpatapon

I just came across this bug while playing DOTA2 yesterday in Gnome 3.20.2. It got stuck 'ON' and I couldn't toggle it off, even after the game was fully closed and steam was shut off.

brittyazel avatar May 24 '16 16:05 brittyazel

Perhaps related, when this occurs I often see a 30 - 60second hang-up when I try to power off using the gnome shutdown menu with errors similar to the following:

gnome-session[805]: gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session[805]: gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session[805]: gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session[805]: gnome-session-binary[805]: WARNING: Client '/org/gnome/SessionManager/Client2' failed to reply before timeout
gnome-session-binary[805]: WARNING: Client '/org/gnome/SessionManager/Client2' failed to reply before timeout
gnome-session[805]: gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session-binary[805]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
gnome-session[805]: Gjs-Message: JS LOG: Ignored exception from dbus method: Gio.IOErrorEnum: Timeout was reached
gnome-session[805]: Gjs-Message: JS LOG: gnome-session gave us a dead inhibitor: /org/gnome/SessionManager/Inhibitor4

Hopefully somewhat useful?

Bujiraso avatar May 27 '16 00:05 Bujiraso

I also came accross this issue with Gnome 3.20.2 after watching a movie in Kodi fullscreened.

brittyazel avatar Jun 02 '16 18:06 brittyazel

Still a problem as of gnome 3.22.2.

zman0900 avatar Mar 19 '17 21:03 zman0900

Still problem as of gnome 3.24.1

mrlamud avatar Apr 28 '17 23:04 mrlamud

100% occurrence when I launch Vivaldi or Chrome (both Chromium based).

I have to disable and re-enable Caffeine.

Snowman3456 avatar Jun 01 '17 00:06 Snowman3456

Same problem on Gnome 2.36.1. After running a fullscreen application (Steam games), Caffeine gets stuck and doesn't respond to mouse click. I have disable and re-enable it to make it work again.

sliwowitz avatar Feb 24 '18 19:02 sliwowitz

reproduced on gnome 3.26.2 have to disable and re-enable Caffeine in Tweaks>Extensions

jcharlet avatar Mar 01 '18 15:03 jcharlet

Still encountering this issue in gnome 3.36.8. Happens when I launch a libreoffice impress presentation. As others have mentioned disabling and re-enabling fixes the issue.

rmohan91 avatar Dec 18 '20 12:12 rmohan91

I experience this bug regularly as well. However, toggling the extension doesn't resolve the issue for me. I have to restart the Gnome Shell altogether (Alt+F2 r)

Apparently some old inhibitor handles are dangling:

$ gdbus call -e -d org.gnome.SessionManager -m org.gnome.SessionManager.GetInhibitors -o /org/gnome/SessionManager
([objectpath '/org/gnome/SessionManager/Inhibitor17', '/org/gnome/SessionManager/Inhibitor16'],)
$ gdbus call -e -d org.gnome.SessionManager -m org.gnome.SessionManager.Inhibitor.GetReason -o /org/gnome/SessionManager/Inhibitor16
('Inhibit by Caffeine',)
$ gdbus call -e -d org.gnome.SessionManager -m org.gnome.SessionManager.Inhibitor.GetReason -o /org/gnome/SessionManager/Inhibitor17
('Inhibit by Caffeine',)

When I click on the icon, another Inhibitor544 is added to the list. When I click again, it's removed - but the old ones stay.

jplitza avatar Dec 22 '20 16:12 jplitza

After having a look at the code, my guess is that somehow two inhibitors for the same app_id get created, and removeInhibit() is called twice with the corresponding app_id before the _inhibitorRemoved() callback comes back for the first inhibitor, causing removeInhibit() to remove the first inhibitor twice because it finds the same cookie in the second invocation it already requested removal for in the first.

jplitza avatar Dec 23 '20 08:12 jplitza

I just encountered the problem again, and can confirm that the app ID in both inhibitors (again having consecutive numbers) is "fullscreen", supporting my hypothesis from the previous comment.

jplitza avatar Jan 04 '21 21:01 jplitza

I have this problem as well, running Gnome shell 3.38 on Arch linux. I observe similar as others with long reboot time. Mostly happens when I watch full screen videos on i.e. youtube and then exit. When I was watching the systemd-inhibitor list, entering and exiting full screen sometimes correctly results in the appearance and disappearance of a 'block' by gnome-session-b, but sometimes the block condition persists despite no longer being in full screen.

jerricode avatar Feb 13 '21 22:02 jerricode

Pretty sure I've been experiencing this bug as well, as caffeine seemingly enables itself periodically and then refuses to be disabled for more than a second or two before re-enabling itself. I'd love to know what kind of debugging info to look for/share so as to help the developers resolve the issue.

I'm on a Manjaro system, running Caffeine-ng 3.5.1 on GNOME Shell 3.38.3.

wideaperture avatar Mar 02 '21 16:03 wideaperture

I'm having this problem as well. It's been happening for some time.

I can't find a pattern to this, except that it only happens when Caffeine turns on automatically because of a full-screen app (e.g. YouTube). On exiting full screen, Caffeine stays "On", and doesn't respond to clicking the icon. The only way to fix this is to restart Gnome.

Unfortunately, this is intermittent, doesn't happen often (probably four or five times a week), and I can't find a pattern. When I try to duplicate it, I can't.

More information:

  • Ubuntu 20.04 with Gnome 3.36.8

  • Settings are as follows.

    • Show Caffeine in top panel (On)
    • Enable when a fullscreen application is running (On)
    • Restore state across reboots (Off)
    • Enable notifications (On)
    • Pause/resume Night Light if enabled (Off)
    • Pause/resume Night Light for defined applications only (Off)
    • Applications which enable Caffeine automatically (none)

Thank you

paddylandau avatar May 06 '21 23:05 paddylandau

Still happening on Gnome 40, I'm not even sure how to reproduce this.

sangmin7648 avatar Jun 19 '21 11:06 sangmin7648

This is still present for me. I'll look into common factors as I work with it. It seems that maximized windows has something to do with it.

sparkie3 avatar Feb 20 '22 15:02 sparkie3

It seems that maximized windows has something to do with it.

This is as far as I've managed to figure it out. As far as I can tell, it doesn't seem to be connected to blanking the screen, or locking or suspending the computer.

I wish that I could find a pattern!

paddylandau avatar Feb 20 '22 16:02 paddylandau

Has anyone been able to reproduce this on GNOME 43 / 44 with the latest Caffeine? This used to impact me too, but it disappeared at some point.

stuarthayhurst avatar Apr 27 '23 21:04 stuarthayhurst