Open Bug 1935914 Opened 2 months ago Updated 10 days ago

[Linux] Firefox goes to sleep in fullscreen mode unless the browser is closed and restarted

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 128
Desktop
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: engel.evan, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce:

  1. Wake my computer from sleep.
  2. Firefox is already open and in fullscreen mode
  3. Navigate to a video. (YouTube, Netflix, etc.) Make the video fullscreen and watch for 15 min. (which is the timeout setting on my computer)

Actual results:

The computer goes to sleep. This should not be the case; a fullscreen video should disable the timeout.

Expected results:

Previously, making a video fullscreen would disable my computer's timeout/sleep. I can still achieve this if I close Firefox and re-open. However, as this is my HTPC, this is not ideal. My aim is to leave Firefox on my screen all the time. Timeout is acceptable and expected when a video is not playing in fullscreen.

I am running Firefox 128.5.0esr (64-bit)
Linux Mint 21.3 Virginia
Desktop Xfce 4.18.1
Kernel 5.15.0-126-generic

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
OS: Unspecified → Linux
Hardware: Unspecified → Desktop

Logging with "LinuxWakeLock:5,HTMLMediaElement:5,HTMLMediaElementEvents:5" might identify what is happening or not.
This can be in the MOZ_LOG environment variable, or logging to the profiler from about:logging works well.

Severity: -- → S3

(In reply to Karl Tomlinson (:karlt) from comment #2)

Logging with "LinuxWakeLock:5,HTMLMediaElement:5,HTMLMediaElementEvents:5" might identify what is happening or not.
This can be in the MOZ_LOG environment variable, or logging to the profiler from about:logging works well.

So, oddly, when I try to recreate the bug while logging, it doesn't happen.

As soon as I turn logging off, the issue returns.

Sorry. I wish I had more data to provide!

Update: I was able to recreate the error while logging. Below:

2025-01-05 20:48:23.913988 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f185900d6d0] WakeLockListener topic video-playing state locked-foreground request lock 1
2025-01-05 20:48:23.914005 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f1841ed9ce0] WakeLockTopic::InhibitScreensaver() Inhibited 1
2025-01-05 21:03:41.046831 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f185900d6d0] WakeLockListener topic video-playing state locked-background request lock 0
2025-01-05 21:03:41.046841 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f1841ed9ce0] WakeLockTopic::UninhibitScreensaver() Inhibited 1
2025-01-05 21:03:41.046845 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f1841ed9ce0] WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower
2025-01-05 21:03:41.046848 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f1841ed9ce0] UninhibitFreeDesktopPower()
2025-01-05 21:03:41.046852 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f1841ed9ce0] WakeLockTopic::DBusUninhibitScreensaver() mWaitingForDBusInhibit 0 mWaitingForDBusUninhibit 0 request id -1
2025-01-05 21:03:41.046855 UTC - [Parent 49936: Main Thread]: D/LinuxWakeLock [7f1841ed9ce0]   missing inihibit token, quit.

Thanks. IIUC WakeLopicTopic has been told to that the system should be kept awake, but believes that the system is already being kept awake from a previous request. There is no token from a previous DBus inhibit.

Is the system running under Wayland?

Changes for bug 1917548 and bug 1896235, at least, have changed the code a fair bit since Firefox 128, so it would be helpful to know whether this still occurs with a Nightly build?

Component: Audio/Video: Playback → Widget: Gtk

I'll test Nightly build ASAP, thank you.

Regarding Wayland, the system appears to be running X11. I followed the steps described here. The result was:

Type=x11

The issue does not appear in the Nightly build.

Update: The issue how appears in the Nightly build.

I'm running 135.0a1 64-bit
Firefox for Ubuntu
canonical 1.0

Log:
2025-01-16 20:20:29.303736 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73d4338be0] WakeLockListener topic video-playing state locked-foreground request lock 1 2025-01-16 20:20:29.303813 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::InhibitScreensaver() state inhibited 2025-01-16 20:20:29.303820 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): recent state inhibited 2025-01-16 20:20:29.303825 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): next state inhibited 2025-01-16 20:20:29.303830 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): empty queue 2025-01-16 20:20:32.048163 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73d4338be0] WakeLockListener topic video-playing state unlocked request lock 0 2025-01-16 20:20:32.048193 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::UnInhibitScreensaver() state inhibited 2025-01-16 20:20:32.048201 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): recent state inhibited 2025-01-16 20:20:32.048207 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): next state uninhibited 2025-01-16 20:20:32.048213 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower 2025-01-16 20:20:32.048220 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] UninhibitFreeDesktopPower() 2025-01-16 20:20:32.048225 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitScreensaver() request id 11 2025-01-16 20:20:32.049825 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitScreensaver() proxy created 2025-01-16 20:20:32.051561 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitFailed() UnInhibit call failed : GDBus.Error:org.xfce.PowerManager.Error.CookieNotFound: Invalid cookie 2025-01-16 20:20:32.051585 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitFailed() 2025-01-16 20:20:42.291164 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73d4338be0] WakeLockListener topic video-playing state locked-foreground request lock 1 2025-01-16 20:20:42.291206 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::InhibitScreensaver() state inhibited 2025-01-16 20:20:42.291219 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): recent state inhibited 2025-01-16 20:20:42.291229 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): next state inhibited 2025-01-16 20:20:42.291247 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): empty queue 2025-01-16 20:36:03.699077 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73d4338be0] WakeLockListener topic video-playing state locked-background request lock 0 2025-01-16 20:36:03.699105 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::UnInhibitScreensaver() state inhibited 2025-01-16 20:36:03.699110 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): recent state inhibited 2025-01-16 20:36:03.699115 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::ProcessNextRequest(): next state uninhibited 2025-01-16 20:36:03.699119 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower 2025-01-16 20:36:03.699123 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] UninhibitFreeDesktopPower() 2025-01-16 20:36:03.699127 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitScreensaver() request id 11 2025-01-16 20:36:03.700164 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitScreensaver() proxy created 2025-01-16 20:36:03.700829 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitFailed() UnInhibit call failed : GDBus.Error:org.xfce.PowerManager.Error.CookieNotFound: Invalid cookie 2025-01-16 20:36:03.700840 UTC - [Parent 217287: Main Thread]: D/LinuxWakeLock [7f73b41174c0] WakeLockTopic::DBusUninhibitFailed()

Thanks. The log is truncated. Please try again, run Firefox (latest nightly) on terminal as:

MOZ_LOG= "LinuxWakeLock:5" ./firefox -P > log.txt 2>&1

reproduce the issue and attach the log.txt here. (You need to use -P param to create/select a different testing profile for nightly to preserve your production one).

Thanks.

Flags: needinfo?(engel.evan)

Also please attach content of about:support page.

Priority: -- → P3
Summary: Firefox goes to sleep in fullscreen mode unless the browser is closed and restarted → [Linux] Firefox goes to sleep in fullscreen mode unless the browser is closed and restarted

So I can actually see something similar one and off on Firefox DevEdition builds on MacOS. I assume the implementations are different and I should file a separate bug? Or should we keep it in the same one?

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #11)

So I can actually see something similar one and off on Firefox DevEdition builds on MacOS. I assume the implementations are different and I should file a separate bug? Or should we keep it in the same one?

Yes, they're completely different.

Attached file About:Support
Thank you! I was able to recreate the bug and log it, however, I once again used about:logging. I was unable to log using the terminal. Perhaps I missed a step? I opened the terminal in the Firefox.trunk folder. Is that incorrect? Below is the newest log, as well as the output of About:Support. LOG: `2025-01-31 16:16:42.665658 UTC - [Parent 11258: Main Thread]: I/Logger Flushing old log files 2025-01-31 16:16:47.815128 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d98371c0] WakeLockListener topic video-playing state locked-foreground request lock 1 2025-01-31 16:16:47.815162 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::InhibitScreensaver() state inhibited 2025-01-31 16:16:47.815170 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::ProcessNextRequest(): recent state inhibited 2025-01-31 16:16:47.815176 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::ProcessNextRequest(): next state inhibited 2025-01-31 16:16:47.815182 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::ProcessNextRequest(): empty queue 2025-01-31 16:43:06.659773 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d98371c0] WakeLockListener topic video-playing state unlocked request lock 0 2025-01-31 16:43:06.659805 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::UnInhibitScreensaver() state inhibited 2025-01-31 16:43:06.659814 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::ProcessNextRequest(): recent state inhibited 2025-01-31 16:43:06.659820 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::ProcessNextRequest(): next state uninhibited 2025-01-31 16:43:06.659861 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower 2025-01-31 16:43:06.659875 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] UninhibitFreeDesktopPower() 2025-01-31 16:43:06.659882 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::DBusUninhibitScreensaver() request id 27 2025-01-31 16:43:06.676198 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::DBusUninhibitScreensaver() proxy created 2025-01-31 16:43:06.677022 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::DBusUninhibitFailed() UnInhibit call failed : GDBus.Error:org.xfce.PowerManager.Error.CookieNotFound: Invalid cookie 2025-01-31 16:43:06.677040 UTC - [Parent 11258: Main Thread]: D/LinuxWakeLock [7ff1d66ecde0] WakeLockTopic::DBusUninhibitFailed() ` ABOUT:SUPPORT ``
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: