Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox can't inhibit screensavers/screen blanking #3699

Closed
4 tasks done
jmetrius opened this issue Oct 26, 2020 · 1 comment · Fixed by #3700
Closed
4 tasks done

Firefox can't inhibit screensavers/screen blanking #3699

jmetrius opened this issue Oct 26, 2020 · 1 comment · Fixed by #3700

Comments

@jmetrius
Copy link
Contributor

Bug and expected behavior
Firefox fails to inhibit screen blanking or screensavers while playing videos using the default profile. This is because the profile does not allow screensaver inhibiton via DBus (org.freedesktop.ScreenSaver)
The issue is resolved by adding dbus-user.talk org.freedesktop.ScreenSaver to /etc/firejail/firefox.local

No profile and disabling firejail
Works fine without a profile

Reproduce
Steps to reproduce the behavior:

  1. Set screensaver or screen blanking duration.
  2. Run in bash firejail firefox and watch a video (e.g. on YouTube)
  3. Screen switches to screensaver or blanks after duration without user interaction while the video is still playing

Environment

  • Arch Linux with GNOME 3.38.1
  • firejail version 0.9.64

Additional context
dbus-monitor --session reports the following necessary calls for screensaver inhibition:

method call time=1603708947.628784 sender=:1.80 -> destination=org.freedesktop.ScreenSaver serial=11 path=/ScreenSaver; interface=org.freedesktop.ScreenSaver; member=Inhibit
method call time=1603708949.331957 sender=:1.80 -> destination=org.freedesktop.ScreenSaver serial=12 path=/ScreenSaver; interface=org.freedesktop.ScreenSaver; member=UnInhibit

Proposed solution
Add dbus-user.talk org.freedesktop.ScreenSaver to the default profile or selectively allow the Inhibit/UnInhibit methods using dbus-user.call. I think the second one would be a better solution but i failed to write a rule for that. I tried something like dbus-user.call org.freedesktop.ScreenSaver=org.freedesktop.ScreenSaver.Inhibit@/ScreenSaver but that seems to be invalid?

Checklist

  • The upstream profile (and redirect profile if exists) have no changes fixing it.
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • Programs needed for interaction are listed in the profile.
  • A short search for duplicates was performed.
  • [NA] If it is a AppImage, --profile=PROFILENAME is used to set the right profile.
rusty-snake added a commit to rusty-snake/firejail that referenced this issue Oct 26, 2020
@rusty-snake
Copy link
Collaborator

dbus-user.call org.freedesktop.ScreenSaver=org.freedesktop.ScreenSaver.Inhibit@/org/freedesktop/ScreenSaver seems to work. However call and broadcast rules are terrible to maintain without #3412/#3424.

rusty-snake added a commit that referenced this issue Oct 26, 2020
fix #3699 -- Firefox can't inhibit screensavers/screen blanking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants