On on off for many years I’ve experienced that sometimes the gnome screensaver doesn’t start/activate as usual. I come back to my computer many hours later, and the screen is still on with the desktop showing. Logging out and logging back in will “fix” it, but it is annoying, especially since I sometimes sleep in the same room as the desktop machine.
How do I debug and/or fix this?
Gnome settings
$ gsettings get org.gnome.desktop.screensaver idle-activation-enabled
true
$ gsettings get org.gnome.desktop.session idle-delay
uint32 300
$ gsettings get org.gnome.desktop.screensaver lock-enabled
false
I have disabled Power / Automatic Suspend because it is also a web-server.
What I’ve tried
I’ve noticed that if I’m e.g. running vlc
, it will temporarily disable the screensaver so that the screensaver doesn’t kick in while watching the movie. When I exit vlc
, the screensaver activates again after idle-delay
. So I was thinking: Perhaps I ran some program that disabled the screensaver. But with vlc
is running, I still see:
$ gsettings get org.gnome.desktop.screensaver idle-activation-enabled
true
So apparently vlc
manages to temporarily disable the screensaver in a way that isn’t reflected by org.gnome.desktop.screensaver idle-activation-enabled
.
Is there any way to see that vlc
has temporarily disabled the screensaver?
I thought that kill -9 $(pgrep vlc)
would leave the screensaver disabled, but the screensaver starts activating again as intended, so I haven’t managed to reproduce the problem on demand.
I have found that once it starts happening, it will continue to happen in that desktop session. Logging out and logging back in does re-activate the screen saver so things start working as normal again.
My Environment
I’m running Gnome 45.5 on NixOS 23.11 under wayland but I’ve seen this screensaver-is-not-100%-reliable behavior on many previous versions of Gnome (mostly on Ubuntu and Xorg) going back many years. So this is not new and not NixOS or wayland-specific.
Perhaps not relevant: I also have a KVM switch in front of both my work laptop (also Gnome) and my NixOS desktop (exhibiting the problem)