[GH-ISSUE #3699] Firefox can't inhibit screensavers/screen blanking #2330

Closed
opened 2026-05-05 09:01:03 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @jmetrius on GitHub (Oct 26, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3699

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.
Originally created by @jmetrius on GitHub (Oct 26, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3699 **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** - [X] The upstream profile (and redirect profile if exists) have no changes fixing it. - [X] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`) - [X] Programs needed for interaction are listed in the profile. - [X] A short search for duplicates was performed. - [NA] If it is a AppImage, `--profile=PROFILENAME` is used to set the right profile.
Author
Owner

@rusty-snake commented on GitHub (Oct 26, 2020):

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.

<!-- gh-comment-id:716517363 --> @rusty-snake commented on GitHub (Oct 26, 2020): `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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2330
No description provided.