Firefox prevent Linux from sleep/suspend
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
People
(Reporter: sinker, Assigned: sinker)
Details
Attachments
(1 external file)
After using firefox for a period of time, it will prevent the device from sleep or suspend.
When it happen, Firefox holds a inhibitor.
$ gnome-session-inhibit --list
firefox: Playing video (suspend)
And, there is no any tab playing video.
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
More details!
Some service may play muted video. Firefox will show an indicator when a tab is playing audio. However, it doesn't show any indicator for video without audio channel or muted. And, on linux, video playback would cause wakelock to prevent the system from sleeping or suspend, even the owner doc is in background. Without any indicator, doesn't know what block the system from sleeping.
GTK is the only backend that does this: macOS/Windows/Android release the video lock once backgrounded (foreground video only blocks the display, never system sleep).
Suggested fix: release the video lock once backgrounded, and keep video-playing idle for foreground, matching the other platforms; audible background playback is already handled by the separate audio-playing topic.
| Assignee | ||
Comment 2•3 months ago
|
||
A muted autoplay video in a background tab or subframe still takes the
"video-playing" wake lock, because that lock is gated on the presence of an
audio track rather than on being audible. GTK then escalated a backgrounded
video lock to a GNOME SUSPEND inhibitor, blocking system sleep with no
user-visible signal (the tab shows no sound indicator).
GTK was the only backend doing this: macOS, Windows and Android all release
the video lock once it is backgrounded. Genuinely audible background playback
is covered by the separate "audio-playing" topic, so a backgrounded
video-playing lock should hold no inhibitor at all.
Release both the foreground (IDLE) and background (SUSPEND) inhibitors when a
video-playing lock goes to locked-background. Foreground video still holds an
IDLE inhibitor to keep the display awake.
Updated•3 months ago
|
Comment 4•3 months ago
|
||
| bugherder | ||
Comment 5•3 months ago
|
||
Did you want to nominate this for the Fx155 relnotes? Possible wording:
Fixed Firefox preventing Linux systems from sleeping or suspending after a long browsing session
| Assignee | ||
Comment 6•3 months ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: This is long existing bug that Linux users are frustrated and difficult to figure out the root cause.
[Affects Firefox for Android]: No
[Suggested wording]:
Fixed Firefox preventing Linux systems from sleeping or suspending after a long browsing session
[Links (documentation, blog post, etc)]:
Updated•2 months ago
|
Description
•