Closed Bug 1804770 Opened 2 years ago Closed 2 years ago

Add a pref to control video wakelock

Categories

(Core :: Audio/Video, defect)

Firefox 102
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: tim.w.connors, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1749187 +++

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

  1. Run firefox with a normal selection of tabs open to a variety of sites (can't tell you which one, because I don't know which of many sites is triggering the problem, because of the way the inhibition is reported - see below). Probably youtube.

  2. Kill gnome screensaver and xscreensaver.

  3. Run xscreensaver -verbose

Actual results:

This set of messages is relayed by xsreensaver every 30 seconds:

xscreensaver-systemd: 21:26:54: uninhibited by "firefox-esr" with cookie 0FE73BCD
xscreensaver-systemd: 21:26:55: inhibit: unable to get pid of "firefox-esr": No data available
xscreensaver-systemd: 21:26:55: inhibited by "firefox-esr" with "video-playing" -> cookie 002B8F6E
xscreensaver-systemd: 21:27:25: uninhibited by "firefox-esr" with cookie 002B8F6E
xscreensaver-systemd: 21:27:26: inhibit: unable to get pid of "firefox-esr": No data available
xscreensaver-systemd: 21:27:26: inhibited by "firefox-esr" with "video-playing" -> cookie C5E68D51
xscreensaver-systemd: 21:27:56: inhibited by "firefox-esr" since Sun Jan  9 21:27:26 2022
xscreensaver-systemd: 21:27:56: exec: xscreensaver-command -verbose -deactivate
xscreensaver: ClientMessage DEACTIVATE received while inactive: resetting idle timer.
xscreensaver-command: not active: idle timer reset.

And the screensaver never is invoked. If the user forcefully invokes the screensaver to turn off their screen of a night, the screen is awakened again within 30 seconds. None of that output tells me why firefox considers a video is playing somewhere - like #1744641, the supposedly human-readable text doesn't tell what video is playing. What URL? What tab? None of my tabs have a video symbol on them. They're not searchable in my window alt-tab list. I'm guessing it's some silly ad somewhere on a page I don't care about in the first place, on a page that might be self-refreshing so continually reloading a video. Either way, something, somewhere on the untrusted web is telling my machine that I'm not allowed to invoke the screensaver, that it is too important to be hidden.

Expected results:

  1. The user should be given a choice, perhaps even hidden in about:config, to blanket ignore any requests to inhibit the screensaver (in my case, I never want firefox to inhibit the screensaver as I only watch videos in a real video player, but some people clearly want it).

  2. The "video-playing" text should change to be something useful.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Cloned from #1749187 since whoever triaged it put it against the wrong component and they closed it only fixing a tiny part of the problem.

Hi Alastor, this looks related to 1804168 -- would you have any thoughts here?

Flags: needinfo?(alwu)
See Also: → 1804168

We can do #1 easily by creating a pref to allow users to control display wakelock in case they want to be opt out.

Assignee: nobody → alwu
Flags: needinfo?(alwu)
Blocks: wakelock
Summary: linux screensaver inhibition is unconditional and can't be overridden, yet relies on untrusted data from the web → Add a pref to control video wakelock
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/833ec9b543da add a pref to control video wakelock. r=azebrowski
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
QA Whiteboard: [qa-110b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: