No sleep while Firefox is running

I am running Firefox 131.0.3 on Wayland, Gnome 46 and NixOS 24.05. I was using Brave about two weeks ago, and I decided to use Firefox instead. Since then, my machine no longer goes to sleep automatically after a certain period of inactivity if Firefox is running. If Firefox is not running, the computer goes to sleep normally.

Am I alone experiencing this issue?

2 Likes

I’ve also been having trouble with idle detection, but hadn’t considered that it might be FF causing it :thinking:; but it is one program I’m pretty much certain to be always running. Idle detection does work when the screen is locked, though.

Firefox idle inhibition works as expected on hyprland + hypridle via the idle-inhibit-unstable-v1 protocol.

I don’t know whether GNOME implements that or has some bespoke protocol; they often do such things. If it’s the latter, that’s what I’d suspect first.

I too experience annoying, and very hard to diagnose dissatisfaction from GNOME’s automatic suspend behavior! And I too didn’t suspect Firefox was the culprit. Examples of annoying behavior:

  • Laptop not going to sleep even though I didn’t touch it for a full night, and wasting my battery completely, even though I closed the laptop’s screen.
  • Manually asking GNOME to suspend does indeed suspends it, but merely opening the screen wakes it up, and in order to tell it to suspend, I have to unlock it (with my long hacker password) and then suspending from the main menu.
  • Pressing the power button also doesn’t seem to do what I want it to do - which is suspending. Related: Gnome power button behavior when session is locked

Please share with us any insights you reach!

There’s this for sway, but the issue is the opposite nixos/sway: workaround idle inhibit not working in Firefox by teutat3s · Pull Request #348792 · NixOS/nixpkgs · GitHub