mate-desktop / mate-screensaver

MATE screen saver and locker
https://mate-desktop.org
GNU General Public License v2.0
48 stars 40 forks source link

Screensaver blocking stops working after a while when playing videos in Firefox #289

Open eugenesan opened 8 months ago

eugenesan commented 8 months ago

Screensaver and (screen off) activates when playing videos in Firefox. The behavior is inconsistent and doesn't affect other apps like Chrome.

After fresh session start everything works (screensaver is blocked when playing videos) but after some time (or some activity) screensaver activates according screensaver/power settings when playing videos. Sometimes restarting the browser helps but sometimes session restart is required to restore screensaver blocking. Interestingly, even when the issue starts to affect Firefox, Chrome is still able to block the screensaver.

Enabling "Power Manager Inhibit Applet" always works (aside of annoying mouse cursor behavior).

I am not sure if the issue is Mate specific. Tried to play with d-feet and dbus-monitor but help with debugging is needed.

Tested on Ubuntu-Mate 22.04 and 23.10.

adatum commented 4 months ago

Screensaver blocking while playing videos has not been working at all for me for several months, whether in Firefox or Chromium.

What is responsible for detecting video playback and blocking the screensaver?

Fedora 39 and 40. MATE 1.28.2. mate-screensaver-command 1.28.0

eugenesan commented 4 months ago

I wouldn't hold your breath hoping for the issue to be fixed any time soon. No one even acknowledged the problem.

I respect Mate maintainers for keeping Gnome2 legacy alive for so long but it seems like community interest in the project is withering away and with it the man power and resources required to maintain it.

lukefromdc commented 4 months ago

This sort of thing is completely outside the part of the code I have worked on myself. We need someone familiar with the internal workings of the screensaver to have a look at this

adatum commented 4 months ago

I respect Mate maintainers for keeping Gnome2 legacy alive for so long but it seems like community interest in the project is withering away and with it the man power and resources required to maintain it.

Agreed, and having used MATE consistently for 15+ years, I loathe the thought of having to find a new desktop environment on my desktop.

At least if the mechanism of how/where the screensaver is blocked/inhibited when there is video playback (including in a video player, not just a browser), it can at least be investigated. Right now, I don't know if it's MATE, browsers, graphics drivers, or something else that is responsible for the behavior.

lukefromdc commented 4 months ago

You should be able to kill mate-screensaver from mate-system-monitor to stop it entirely or use the inhibit applet. Not sure if "never" is an option on timeout settings, in the middle of a mate-wayland session now so can't close everything to check

adatum commented 4 months ago

@lukefromdc There's no need to kill mate-screensaver. Of course, it could be disabled from settings/preferences, or an inhibit applet or caffeine could be used, to totally avoid the screensaver.

The preferable behavior is not to disable the screensaver entirely, but rather to avoid having it start while a video is playing. i.e. playback somehow (how exactly?) inhibits the screensaver, and only during playback. This was the actual behavior until somewhat recently. If playback stops, then the screensaver is activated after the usual idle time.

Btw, I'm using MATE on X, not Wayland.

lukefromdc commented 4 months ago

I was assuming you were on Xorg as that's the longstanding and normal way MATE is used and the only way the screensaver is usable. Wayland support is brand-new, I coded up much of it myself building on earlier work from a few years ago by others.

Most of my work on MATE was on the GTK2-GTK 3 transition, getting past a major breaking change in GTK3 theming with the 3.20 release, various bugfixes, and most recently the wayland work. That was done as insurance since there are any distros whatsoever talking of sunsetting X11. It's my daily driver simply because I coded it and need to be familiar with issues in it as others start to use it and issues come up.

I mentioned wayland just because being in the middle of a wayland session and not wanting to close all applications to start an x11 session, I could not run the mate-screensaver prefs dialog to see if "never" is an option for when to consider the computer idle.