Launchpad has imported 41 comments from the remote bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=1862159.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2023-10-31T09:53:10+00:00 Thedcoder wrote:

Firefox fails to properly call the `org.freedesktop.PowerManagement`
D-Bus interface. The issue was originally posted on [Xfce's bug-
tracker](https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/210):

> I've been doing some debugging and found that Firefox isn't calling the D-Bus 
> interface method at `org.freedesktop.PowerManagement.Inhibit -> Inhibit`.
> 
> I used this command to monitor the calls and didn't see anything while I was 
> playing media in Firefox: `busctl --user monitor 
> org.freedesktop.PowerManagement`
> 
> The interesting thing is that it does call 
> `org.freedesktop.PowerManagement.Inhibit -> UnInhibit` with the wrong cookie 
> value every-time I pause the video, but it won't call `Inhibit` after I 
> resume playback:
> 
> ```
> $ busctl --user monitor org.freedesktop.PowerManagement
> Monitoring bus message stream.
> ‣ Type=method_call  Endian=l  Flags=0  Version=1 Cookie=2768  Timestamp="Tue 
> 2023-10-31 06:41:08.423673 UTC"
>   Sender=:1.43  Destination=:1.35  
> Path=/org/freedesktop/PowerManagement/Inhibit  
> Interface=org.freedesktop.PowerManagement.Inhibit  Member=UnInhibit
>   UniqueName=:1.43
>   MESSAGE "u" {
>           UINT32 21;
>   };
> 
> ‣ Type=error  Endian=l  Flags=1  Version=1 Cookie=273  ReplyCookie=2768  
> Timestamp="Tue 2023-10-31 06:41:08.423829 UTC"
>   Sender=:1.35  Destination=:1.43
>   ErrorName=org.xfce.PowerManager.Error.CookieNotFound  ErrorMessage="Invalid 
> cookie"
>   UniqueName=:1.35
>   MESSAGE "s" {
>           STRING "Invalid cookie";
>   };
> 
> ‣ Type=method_call  Endian=l  Flags=0  Version=1 Cookie=2777  Timestamp="Tue 
> 2023-10-31 06:41:15.928327 UTC"
>   Sender=:1.43  Destination=:1.35  
> Path=/org/freedesktop/PowerManagement/Inhibit  
> Interface=org.freedesktop.PowerManagement.Inhibit  Member=UnInhibit
>   UniqueName=:1.43
>   MESSAGE "u" {
>           UINT32 21;
>   };
> 
> ‣ Type=error  Endian=l  Flags=1  Version=1 Cookie=274  ReplyCookie=2777  
> Timestamp="Tue 2023-10-31 06:41:15.928471 UTC"
>   Sender=:1.35  Destination=:1.43
>   ErrorName=org.xfce.PowerManager.Error.CookieNotFound  ErrorMessage="Invalid 
> cookie"
>   UniqueName=:1.35
>   MESSAGE "s" {
>           STRING "Invalid cookie";
>   };
> 
> ‣ Type=method_call  Endian=l  Flags=0  Version=1 Cookie=2786  Timestamp="Tue 
> 2023-10-31 06:41:25.629256 UTC"
>   Sender=:1.43  Destination=:1.35  
> Path=/org/freedesktop/PowerManagement/Inhibit  
> Interface=org.freedesktop.PowerManagement.Inhibit  Member=UnInhibit
>   UniqueName=:1.43
>   MESSAGE "u" {
>           UINT32 21;
>   };
> 
> ‣ Type=error  Endian=l  Flags=1  Version=1 Cookie=275  ReplyCookie=2786  
> Timestamp="Tue 2023-10-31 06:41:25.629365 UTC"
>   Sender=:1.35  Destination=:1.43
>   ErrorName=org.xfce.PowerManager.Error.CookieNotFound  ErrorMessage="Invalid 
> cookie"
>   UniqueName=:1.35
>   MESSAGE "s" {
>           STRING "Invalid cookie";
>   };
> ```
> 
> I also found that this issue is not easily reproducible. I restarted Firefox 
> to test it again and it worked perfectly and called both functions normally 
> with the correct values!
> 
> I normally keep Firefox open 24/7, so at some point it glitches out and stops 
> calling `Inhibit` and keeps calling `UnInhibit` with a cached cookie value 
> every time the playback is paused.
> 
> So this is almost certainly a regression in Firefox itself, will do some more 
> digging and get back with the results here.

This is on a X11 desktop running Firefox v119, but the issue might have
been present in older versions as well. The most recent change which
touches the part of this D-Bus code is [bug
1848084](https://bugzilla.mozilla.org/show_bug.cgi?id=1848084) (credit
to bbhtt from Libera IRC for finding this).

I will continue to narrow down the steps required to reproduce this bug,
if anyone has any clues please let me know. I use Firefox with several
windows (including private windows) with at-least one window being
always open at a time.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/0

------------------------------------------------------------------------
On 2023-11-02T11:37:11+00:00 Stransky wrote:

Can you run with MOZ_LOG="LinuxWakeLock:5" env variable? You'll get wake
lock log from Firefox perspective and it's see what's called.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/1

------------------------------------------------------------------------
On 2023-11-02T13:30:14+00:00 Thedcoder wrote:

Created attachment 9361606
output.log

Turns out it was actually very easy to reproduce:

1. Open Firefox
2. Open private window and load a video (I just opened YouTube)
4. Close the private window
5. Open a new private window and load another video
6. Confirm that power inhibition is broken

Here's the terminal output:

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/2

------------------------------------------------------------------------
On 2023-11-02T13:32:03+00:00 Thedcoder wrote:

Turns out it was actually very easy to reproduce:

1. Open Firefox
2. Open private window and load a video (I just opened YouTube)
4. Close the private window
5. Open a new private window and load another video
6. Confirm that power inhibition is broken

Here's the terminal output:
```
$ MOZ_LOG="LinuxWakeLock:5" firefox
[GFX1-]: vaapitest: ManageChildProcess failed

[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockListener video-playing 
state locked-foreground
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType Initial
[Parent 330129: Main Thread]: D/LinuxWakeLock   switched to WakeLockType 
FreeDesktopScreensaver
[Parent 330129: Main Thread]: D/LinuxWakeLock shouldLock 1
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::InhibitScreensaver() state 0
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::SendInhibit() 
WakeLockType FreeDesktopScreensaver
[Parent 330129: Main Thread]: D/LinuxWakeLock InhibitFreeDesktopScreensaver()
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusInhibitScreensaver() waiting 0
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusInhibitFailed() Inhibit call failed : 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
org.freedesktop.ScreenSaver was not provided by any .service files
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusInhibitFailed(1)
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType FreeDesktopScreensaver
[Parent 330129: Main Thread]: D/LinuxWakeLock   switched to WakeLockType 
FreeDesktopPower
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::SendInhibit() 
WakeLockType FreeDesktopPower
[Parent 330129: Main Thread]: D/LinuxWakeLock InhibitFreeDesktopPower()
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusInhibitScreensaver() waiting 0
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusInhibitSucceeded(), mInhibitRequestID 3
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockListener video-playing 
state locked-background
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::~WakeLockTopic() 
state 0
[Parent 330129: Main Thread]: D/LinuxWakeLock shouldLock 0
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::UninhibitScreensaver() state 1
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::SendUninhibit() 
WakeLockType FreeDesktopPower
[Parent 330129: Main Thread]: D/LinuxWakeLock UninhibitFreeDesktopPower()
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitScreensaver() waiting 0 request id 3
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockListener video-playing 
state unlocked
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::~WakeLockTopic() 
state 0
[Parent 330129: Main Thread]: D/LinuxWakeLock shouldLock 0
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::UninhibitScreensaver() state 1
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::SendUninhibit() 
WakeLockType FreeDesktopPower
[Parent 330129: Main Thread]: D/LinuxWakeLock UninhibitFreeDesktopPower()
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitScreensaver() waiting 1 request id 3
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitScreensaver() proxy created
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitFailed() UnInhibit call failed : 
GDBus.Error:org.xfce.PowerManager.Error.CookieNotFound: Invalid cookie
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitFailed()
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376ee00 
state=DECODING_METADATA Decode metadata failed, shutting down decoder: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachine.cpp:372
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376ee00 
Decode error: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006) - static 
MP4Metadata::ResultAndByteBuffer mozilla::MP4Metadata::Metadata(ByteStream *): 
Cannot parse metadata: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachineBase.cpp:166
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376dc00 
state=DECODING_METADATA Decode metadata failed, shutting down decoder: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachine.cpp:372
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376dc00 
Decode error: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006) - static 
MP4Metadata::ResultAndByteBuffer mozilla::MP4Metadata::Metadata(ByteStream *): 
Cannot parse metadata: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachineBase.cpp:166
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376e800 
state=DECODING_METADATA Decode metadata failed, shutting down decoder: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachine.cpp:372
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376e800 
Decode error: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006) - static 
MP4Metadata::ResultAndByteBuffer mozilla::MP4Metadata::Metadata(ByteStream *): 
Cannot parse metadata: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachineBase.cpp:166
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376e200 
state=DECODING_METADATA Decode metadata failed, shutting down decoder: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachine.cpp:372
[Child 330414, MediaDecoderStateMachine #1] WARNING: Decoder=7f5d0376e200 
Decode error: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006) - static 
MP4Metadata::ResultAndByteBuffer mozilla::MP4Metadata::Metadata(ByteStream *): 
Cannot parse metadata: file 
/build/firefox/src/firefox-119.0/dom/media/MediaDecoderStateMachineBase.cpp:166
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockListener video-playing 
state locked-foreground
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::~WakeLockTopic() 
state 0
[Parent 330129: Main Thread]: D/LinuxWakeLock shouldLock 1
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::InhibitScreensaver() state 1
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockListener video-playing 
state unlocked
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::~WakeLockTopic() 
state 0
[Parent 330129: Main Thread]: D/LinuxWakeLock shouldLock 0
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::UninhibitScreensaver() state 1
[Parent 330129: Main Thread]: D/LinuxWakeLock WakeLockTopic::SendUninhibit() 
WakeLockType FreeDesktopPower
[Parent 330129: Main Thread]: D/LinuxWakeLock UninhibitFreeDesktopPower()
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitScreensaver() waiting 0 request id 3
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitScreensaver() proxy created
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitFailed() UnInhibit call failed : 
GDBus.Error:org.xfce.PowerManager.Error.CookieNotFound: Invalid cookie
[Parent 330129: Main Thread]: D/LinuxWakeLock 
WakeLockTopic::DBusUninhibitFailed()
[Socket 330231: Main Thread]: D/LinuxWakeLock WakeLockListener::Shutdown()
```

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/3

------------------------------------------------------------------------
On 2023-11-02T13:38:53+00:00 Stransky wrote:

This testcase works for me, Thanks!

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/4

------------------------------------------------------------------------
On 2023-11-02T20:07:50+00:00 Stransky wrote:

Created attachment 9361707
Bug 1862159 [Linux] Add IsCancelledGError() to detect DBus operation 
cancellation r?emilio

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/5

------------------------------------------------------------------------
On 2023-11-02T20:08:00+00:00 Stransky wrote:

Created attachment 9361708
Bug 1862159 [Linux] Rework wake lock to better handle wake lock states and 
allow to cancel pending DBus operations r?emilio


- Update WAKE_LOCK_LOG to print 'this' which allows to sort operations by lock 
type
- GetOrInsertNew() call always creates a new WakeLockTopic object so in this 
patch call it only if we create a new object.
- Split mWaitingForDBusReply to 
mWaitingForDBusInhibit/mWaitingForDBusUninhibit. It allows to ignore repeated 
requests and also cancel
  opposite requests.
- Use g_cancellable to cancel pending DBus operation if we want different wake 
lock action.

Depends on D192621

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/6

------------------------------------------------------------------------
On 2023-11-02T22:45:47+00:00 Pulsebot-d wrote:

Pushed by stran...@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/a3014ce3c54a
[Linux] Add IsCancelledGError() to detect DBus operation cancellation r=emilio

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/7

------------------------------------------------------------------------
On 2023-11-03T05:22:04+00:00 Smolnar wrote:

https://hg.mozilla.org/mozilla-central/rev/a3014ce3c54a

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/8

------------------------------------------------------------------------
On 2023-11-03T06:53:00+00:00 Thedcoder wrote:

(In reply to Sandor Molnar[:smolnar] from comment #8)
> https://hg.mozilla.org/mozilla-central/rev/a3014ce3c54a

Are you sure that this is fixed? Revision D192622 also seems to be
required and it's still open for merge.

Also would these fixes be deployed in v121? Why not v120?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/9

------------------------------------------------------------------------
On 2023-11-03T07:48:07+00:00 Stransky wrote:

Sorry, my fault. Forget to mark as leave open.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/10

------------------------------------------------------------------------
On 2023-11-07T19:06:28+00:00 Mbarriolinares wrote:

I'm testing firefox-nightly installed from here
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firefox-nightly-
bin

This isn't fixed.

```
# busctl --user monitor org.freedesktop.PowerManagement

‣ Type=method_call  Endian=l  Flags=0  Version=1 Cookie=172  Timestamp="Tue 
2023-11-07 19:04:09.075478 UTC"
  Sender=:1.110  Destination=:1.26  
Path=/org/freedesktop/PowerManagement/Inhibit  
Interface=org.freedesktop.PowerManagement.Inhibit  Member=UnInhibit
  UniqueName=:1.110
  MESSAGE "u" {
          UINT32 2;
  };

‣ Type=error  Endian=l  Flags=1  Version=1 Cookie=383  ReplyCookie=172  
Timestamp="Tue 2023-11-07 19:04:09.075756 UTC"
  Sender=:1.26  Destination=:1.110
  ErrorName=org.xfce.PowerManager.Error.CookieNotFound  ErrorMessage="Invalid 
cookie"
  UniqueName=:1.26
  MESSAGE "s" {
          STRING "Invalid cookie";
  };
```

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/11

------------------------------------------------------------------------
On 2023-11-07T20:19:55+00:00 Stransky wrote:

We're waiting to D192622.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/12

------------------------------------------------------------------------
On 2023-11-08T11:40:51+00:00 Pulsebot-d wrote:

Pushed by stran...@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/7c1e05f847ba
[Linux] Rework wake lock to better handle wake lock states and allow to cancel 
pending DBus operations r=emilio

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/13

------------------------------------------------------------------------
On 2023-11-08T12:43:49+00:00 Sstanca wrote:

Backed out for causing WakeLock related failures. 
* [Backout link]()


* [Push with failures wpt 
failures](https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=success%2Cpending%2Crunning%2Ctestfailed%2Cbusted%2Cexception&fromchange=008d97a8a9a984bfdc4a96e3ce3340b1b4e998ce&searchStr=linux%2C18.04%2Cx64%2Cwebrender%2Copt%2Cweb%2Cplatform%2Ctests%2Cwithout%2Cfission%2Cenabled%2Ctest-linux1804-64-qr%2Fopt-web-platform-tests-nofis%2Cwpt1&selectedTaskRun=ej2i_7W_Tua6-rf0yhKy0Q.0&tochange=100fece899f062e60491f83988a5a76eb5bdba81)
 
* [Failure 
Log](https://treeherder.mozilla.org/logviewer?job_id=435435291&repo=autoland) 
* Failure line: PROCESS-CRASH | 
MOZ_DIAGNOSTIC_ASSERT(g_cancellable_is_cancelled(mCancellable)) [@ 
WakeLockTopic::SwitchToNextWakeLockType] | 
/screen-capture/getdisplaymedia-framerate.https.html 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

* [Push with failures - reftests 
failures](https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=UJMXfz5xQbeS_7lvfhMq4w.0&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception&fromchange=27fd9f6f57eac66fd6d1f83504d83853f480c48a&searchStr=linux%2C18.04%2Cx64%2Cwebrender%2Cdebug%2Creftests%2Ctest-linux1804-64-qr%2Fdebug-crashtest%2Cc&tochange=100fece899f062e60491f83988a5a76eb5bdba81)
 
* [Failure 
Log](https://treeherder.mozilla.org/logviewer?job_id=435435004&repo=autoland) 
* Failure line: Assertion failure: g_cancellable_is_cancelled(mCancellable), at 
/builds/worker/checkouts/gecko/widget/gtk/WakeLockListener.cpp:700

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

* [Push with failures - mochitests 
failures](https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception&fromchange=b055ae43d5fc71bc68dc83d4aca73ea4411b48df&tochange=100fece899f062e60491f83988a5a76eb5bdba81&selectedTaskRun=Oj-Wk0-KTg6awxS24Dvz0Q.0)
 
* [Failure 
Log](https://treeherder.mozilla.org/logviewer?job_id=435433821&repo=autoland) 
* Failure line: Assertion failure: g_cancellable_is_cancelled(mCancellable), at 
/builds/worker/checkouts/gecko/widget/gtk/WakeLockListener.cpp:700

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/14

------------------------------------------------------------------------
On 2023-11-08T12:54:47+00:00 Stransky wrote:

Updated, Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/15

------------------------------------------------------------------------
On 2023-11-08T12:57:56+00:00 Pulsebot-d wrote:

Pushed by stran...@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/63c54b25b36f
[Linux] Rework wake lock to better handle wake lock states and allow to cancel 
pending DBus operations r=emilio

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/16

------------------------------------------------------------------------
On 2023-11-08T15:19:24+00:00 Sstanca wrote:

Backed out for causing bp-nu bustages in WakeLockListener.h.
* [Backout 
link](https://hg.mozilla.org/integration/autoland/rev/c5f4aa50921875786360f0741d15ee62f45caeb8)
* [Push with 
failures](https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=success%2Cpending%2Crunning%2Ctestfailed%2Cbusted%2Cexception&fromchange=b055ae43d5fc71bc68dc83d4aca73ea4411b48df&searchStr=linux%2Cx64%2Cplain%2Cbuild-linux64-non-unified%2Fplain%2Cbp-nu&tochange=95e021abb4cb5fc4710dac7b3e14f6052b024a97&selectedTaskRun=aadsYyKSQ6KuKPeBgY0EZg.0)
 
* [Failure 
Log](https://treeherder.mozilla.org/logviewer?job_id=435454607&repo=autoland) 
* Failure line: 
/builds/worker/checkouts/gecko/widget/gtk/WakeLockListener.h:46:53: error: 
implicit instantiation of undefined template 
'nsRefCountedHashtable<nsStringHashKey, RefPtr<WakeLockTopic>>'

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/17

------------------------------------------------------------------------
On 2023-11-09T08:40:53+00:00 Stransky wrote:

Updated, Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/18

------------------------------------------------------------------------
On 2023-11-09T08:43:28+00:00 Pulsebot-d wrote:

Pushed by stran...@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/61e218fa6f1c
[Linux] Rework wake lock to better handle wake lock states and allow to cancel 
pending DBus operations r=emilio

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/19

------------------------------------------------------------------------
On 2023-11-09T10:48:19+00:00 Stransky wrote:

Created attachment 9362793
Bug 1862159 [Linux] Fix WakeLockListener to build with disabled DBus r?emilio

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/20

------------------------------------------------------------------------
On 2023-11-09T11:30:44+00:00 Pulsebot-d wrote:

Pushed by stran...@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/7d108376e269
[Linux] Fix WakeLockListener to build with disabled DBus r=emilio

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/21

------------------------------------------------------------------------
On 2023-11-09T16:52:35+00:00 Nerli wrote:

https://hg.mozilla.org/mozilla-central/rev/61e218fa6f1c
https://hg.mozilla.org/mozilla-central/rev/7d108376e269

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/22

------------------------------------------------------------------------
On 2023-11-10T17:49:10+00:00 Thedcoder wrote:

Is this supposed to be fixed? I can still reproduce it in Nightly
`121.0a1 (2023-11-10) (64-bit)`

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/23

------------------------------------------------------------------------
On 2023-11-10T18:45:01+00:00 Stransky wrote:

(In reply to Damon from comment #23)
> Is this supposed to be fixed? I can still reproduce it in Nightly `121.0a1 
> (2023-11-10) (64-bit)`

Yes, it should be fixed. Please attach another log of MOZ_LOG="LinuxWakeLock:5".
Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/24

------------------------------------------------------------------------
On 2023-11-10T19:20:28+00:00 Thedcoder wrote:

The steps to reproduce have changed a bit:

1. Open Firefox
2. Open a private window and load a video
3. Close the window abruptly (without pausing/stopping the video, while it's 
still playing)
4. Repeat step 2
5. Confirm that power inhibition is broken

Output:
```
$ MOZ_LOG="LinuxWakeLock:5" firefox-nightly
[GFX1-]: vaapitest: ManageChildProcess failed

[Parent 70035, Main Thread] WARNING: Failed to call GetIdletime(): 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
org.gnome.Mutter.IdleMonitor was not provided by any .service files
: 'glib warning', file 
/build/firefox-nightly/src/mozilla-central/toolkit/xre/nsSigHandlers.cpp:187

** (firefoxnightly:70035): WARNING **: 00:39:29.405: Failed to call
GetIdletime(): GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
The name org.gnome.Mutter.IdleMonitor was not provided by any .service
files

[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::WakeLockTopic() created video-playing
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType Initial
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580]   switched to 
WakeLockType FreeDesktopScreensaver
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state locked-foreground request lock 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::InhibitScreensaver() Inhibited 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopScreensaver
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
InhibitFreeDesktopScreensaver()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitFailed() Inhibit call failed : 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
org.freedesktop.ScreenSaver was not provided by any .service files
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitFailed(1)
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType FreeDesktopScreensaver
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580]   switched to 
WakeLockType FreeDesktopPower
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPower
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
InhibitFreeDesktopPower()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitSucceeded(), mInhibitRequestID 11 mShouldInhibit 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state unlocked request lock 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::UninhibitScreensaver() Inhibited 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
UninhibitFreeDesktopPower()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0 request id 11
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitScreensaver() proxy created
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitSucceeded() mShouldInhibit 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state locked-foreground request lock 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::InhibitScreensaver() Inhibited 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPower
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
InhibitFreeDesktopPower()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusInhibitSucceeded(), mInhibitRequestID 16 mShouldInhibit 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state locked-background request lock 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::UninhibitScreensaver() Inhibited 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
UninhibitFreeDesktopPower()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0 request id 16
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state unlocked request lock 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::UninhibitScreensaver() Inhibited 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
UninhibitFreeDesktopPower()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 1 request id 16
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580]   already waiting 
to uninihibit, return
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitScreensaver() proxy created
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitFailed() UnInhibit call failed : 
GDBus.Error:org.xfce.PowerManager.Error.CookieNotFound: Invalid cookie
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitFailed()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state locked-foreground request lock 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::InhibitScreensaver() Inhibited 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state unlocked request lock 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::UninhibitScreensaver() Inhibited 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPower
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
UninhibitFreeDesktopPower()
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::DBusUninhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0 request id 0
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580]   missing inihibit 
token, quit.
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f30c22fd8e0] WakeLockListener 
topic video-playing state locked-foreground request lock 1
[Parent 70035: Main Thread]: D/LinuxWakeLock [7f308ea77580] 
WakeLockTopic::InhibitScreensaver() Inhibited 1
```

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/25

------------------------------------------------------------------------
On 2024-02-14T00:59:35+00:00 Intrlocutr wrote:

Created attachment 9380085
firefox_no_inhibit

This bug is still present on Firefox 122.0.1, Arch Linux. Relevant package 
versions:
linux 6.7.4.arch1-1
dbus 1.14.10-2
firefox 122.0.1-1

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/27

------------------------------------------------------------------------
On 2024-02-14T01:00:27+00:00 Intrlocutr wrote:

Comment on attachment 9380085
firefox_no_inhibit

I am using i3wm 4.23, no desktop environment.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/28

------------------------------------------------------------------------
On 2024-02-14T01:15:44+00:00 Mbarriolinares wrote:

Can confirm, this bug is still happening.

Archlinux up-to-date. XFCE.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/29

------------------------------------------------------------------------
On 2024-02-21T22:47:17+00:00 Eugene San wrote:

Around 6 months ago, I was experiencing similar issues when Firefox
would randomly stop inhibiting screensaver after some time,
closing/opening tabs or just starting/stopping playback in more than two
tabs (concurrently or sequentially).

Recently, with versions ~120 screensaver/lock inhibition stopped working
completely.

I tested on Ubuntu-Mate 22.04, 23.10, 24.04 and vanilla Ubuntu 24.04 and the 
problem persists.
Firefox packages from Mozilla, Canonical PPA and Snap are all broken.

Here is the log of setting the lock to 1 minute, starting playback, waiting 
till screensaver actiavtes, cancel the the screensaver and stop playback:
```
MOZ_LOG="LinuxWakeLock:5" firefox
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::WakeLockTopic() created video-playing
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType Initial
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00]   switched to 
WakeLockType FreeDesktopScreensaver
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c333831aa30] WakeLockListener 
topic video-playing state locked-foreground request lock 1
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::InhibitScreensaver() Inhibited 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopScreensaver
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
InhibitFreeDesktopScreensaver()
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitFailed() Inhibit call failed : 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
org.freedesktop.ScreenSaver was not provided by any .service files
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitFailed(1)
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType FreeDesktopScreensaver
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00]   switched to 
WakeLockType FreeDesktopPower
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPower
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
InhibitFreeDesktopPower()
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitFailed() Inhibit call failed : 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
org.freedesktop.PowerManagement was not provided by any .service files
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitFailed(1)
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType FreeDesktopPower
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00]   switched to 
WakeLockType FreeDesktopPortal
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPortal
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::InhibitFreeDesktopPortal() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::InhibitFreeDesktopPortal(): inhibited, objpath to unihibit: 
/org/freedesktop/portal/desktop/request/1_111/t
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusInhibitSucceeded(), mInhibitRequestID 0 mShouldInhibit 1
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c333831aa30] WakeLockListener 
topic video-playing state unlocked request lock 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::UninhibitScreensaver() Inhibited 1
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPortal
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::UninhibitFreeDesktopPortal() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0 object path: 
/org/freedesktop/portal/desktop/request/1_111/t
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::DBusUninhibitSucceeded() mShouldInhibit 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::UninhibitFreeDesktopPortal() Inhibit removed
```
And this the log of simple start playback, stop playback
```
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c333831aa30] WakeLockListener 
topic video-playing state locked-foreground request lock 1
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::InhibitScreensaver() Inhibited 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPortal
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::InhibitFreeDesktopPortal() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
WakeLockTopic::InhibitFreeDesktopPortal(): inhibited, objpath to unihibit: 
/org/freedesktop/portal/desktop/request/1_111/t/1041562613
```

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/30

------------------------------------------------------------------------
On 2024-02-21T22:51:04+00:00 Eugene San wrote:

(In reply to Eugene San from comment #29)
> Around 6 months ago, I was experiencing similar issues when Firefox would 
> randomly stop inhibiting screensaver after some time, closing/opening tabs or 
> just starting/stopping playback in more than two tabs (concurrently or 
> sequentially).
> 
> Recently, with versions ~120 screensaver/lock inhibition stopped working 
> completely.
> 
> I tested on Ubuntu-Mate 22.04, 23.10, 24.04 and vanilla Ubuntu 24.04 and the 
> problem persists.
> Firefox packages from Mozilla, Canonical PPA and Snap are all broken.
> 
> Here is the log of setting the lock to 1 minute, starting playback, waiting 
> till screensaver actiavtes, cancel the the screensaver and stop playback:
> ```
> MOZ_LOG="LinuxWakeLock:5" firefox
> libva info: VA-API version 1.19.0
> libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
> libva info: Found init function __vaDriverInit_1_18
> libva info: va_openDriver() returns 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::WakeLockTopic() created video-playing
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SwitchToNextWakeLockType() WakeLockType Initial
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00]   switched to 
> WakeLockType FreeDesktopScreensaver
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c333831aa30] WakeLockListener 
> topic video-playing state locked-foreground request lock 1
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::InhibitScreensaver() Inhibited 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SendInhibit() WakeLockType FreeDesktopScreensaver
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> InhibitFreeDesktopScreensaver()
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
> mWaitingForDBusUninhibit 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitScreensaver() proxy created
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitFailed() Inhibit call failed : 
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
> org.freedesktop.ScreenSaver was not provided by any .service files
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitFailed(1)
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SwitchToNextWakeLockType() WakeLockType FreeDesktopScreensaver
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00]   switched to 
> WakeLockType FreeDesktopPower
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPower
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> InhibitFreeDesktopPower()
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
> mWaitingForDBusUninhibit 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitScreensaver() proxy created
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitFailed() Inhibit call failed : 
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name 
> org.freedesktop.PowerManagement was not provided by any .service files
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitFailed(1)
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SwitchToNextWakeLockType() WakeLockType FreeDesktopPower
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00]   switched to 
> WakeLockType FreeDesktopPortal
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPortal
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::InhibitFreeDesktopPortal() mWaitingForDBusInhibit 0 
> mWaitingForDBusUninhibit 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::InhibitFreeDesktopPortal(): inhibited, objpath to unihibit: 
> /org/freedesktop/portal/desktop/request/1_111/t
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusInhibitSucceeded(), mInhibitRequestID 0 mShouldInhibit 1
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c333831aa30] WakeLockListener 
> topic video-playing state unlocked request lock 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::UninhibitScreensaver() Inhibited 1
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopPortal
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::UninhibitFreeDesktopPortal() mWaitingForDBusInhibit 0 
> mWaitingForDBusUninhibit 0 object path: 
> /org/freedesktop/portal/desktop/request/1_111/t
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::DBusUninhibitSucceeded() mShouldInhibit 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::UninhibitFreeDesktopPortal() Inhibit removed
> ```
> And this the log of simple start playback, stop playback
> ```
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c333831aa30] WakeLockListener 
> topic video-playing state locked-foreground request lock 1
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::InhibitScreensaver() Inhibited 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::SendInhibit() WakeLockType FreeDesktopPortal
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::InhibitFreeDesktopPortal() mWaitingForDBusInhibit 0 
> mWaitingForDBusUninhibit 0
> [Parent 7830: Main Thread]: D/LinuxWakeLock [7c3313712b00] 
> WakeLockTopic::InhibitFreeDesktopPortal(): inhibited, objpath to unihibit: 
> /org/freedesktop/portal/desktop/request/1_111/t/1041562613
> ```

Forgot to add: Other browsers like Chrome, work as expected.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/31

------------------------------------------------------------------------
On 2024-02-22T12:59:40+00:00 Plurtu wrote:

(In reply to Eugene San from comment #29)
> Recently, with versions ~120 screensaver/lock inhibition stopped working 
> completely.

It works for me on vanilla Ubuntu 23.10.

The `video-playing` inhibitor is only set when the video is visible (ie
window is not minimized or fully covered by another window). Wayland is
able to detect covered windows unlike X11 and was recently enabled in
version 121. You can disable Wayland to see the difference:

     MOZ_ENABLE_WAYLAND=0 MOZ_LOG="LinuxWakeLock:5" firefox

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/32

------------------------------------------------------------------------
On 2024-03-03T15:24:48+00:00 O-me-d wrote:

I have the same issue on latest Gentoo, with Firefox 123.0

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/33

------------------------------------------------------------------------
On 2024-03-03T17:55:19+00:00 Eugene San wrote:

(In reply to Kestrel from comment #31)
> (In reply to Eugene San from comment #29)
> > Recently, with versions ~120 screensaver/lock inhibition stopped working 
> > completely.
> 
> It works for me on vanilla Ubuntu 23.10.
> 
> The `video-playing` inhibitor is only set when the video is visible (ie 
> window is not minimized or fully covered by another window). Wayland is able 
> to detect covered windows unlike X11 and was recently enabled in version 121. 
> You can disable Wayland to see the difference:
> 
>      MOZ_ENABLE_WAYLAND=0 MOZ_LOG="LinuxWakeLock:5" firefox

I have not tried Vanilla 23.10 and since other browsers do not have this issue 
I see no reason to blame/exclude any specific distro. Numerous reports support.
Now when I think about it, I tested both X and Wayland variants of Ubuntu so we 
can't blame X or Wayland either.
Maybe your routine/setup/hardware somehow avoids the issue and we should figure 
out how your setup is different from let's say generic install of "Vanilla" 
system in Virtualbox.

Also, why would you assume anyone taking their time to report the issue
here, would test with the video in background or partially covered? It's
a possibility, but common we are mostly gown-ups here.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/34

------------------------------------------------------------------------
On 2024-03-13T21:23:02+00:00 Eugene San wrote:

Update.
Seems like the issue is not affecting KDE Plasma sessions.
I installed Plasma session on the same machine (Ubuntu Mate 23.10) and it works 
with the same Firefox instance without an issue.
Maybe "Media Playback" detection (indicated by the relevant Tray Icon) helps or 
maybe Plasma handling DBUS msgs differently.

I also tried freshly installed Kubuntu 24.04 and OpenSuSe Thumbleweed
with plasma and they both work.

Here is the log:
```
MOZ_ENABLE_WAYLAND=0 MOZ_LOG="LinuxWakeLock:5" firefox
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::WakeLockTopic() created video-playing
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::SwitchToNextWakeLockType() WakeLockType Initial
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650]   switched to 
WakeLockType FreeDesktopScreensaver
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca8721f670] WakeLockListener 
topic video-playing state locked-foreground request lock 1
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::InhibitScreensaver() Inhibited 0
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::SendInhibit() WakeLockType FreeDesktopScreensaver
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
InhibitFreeDesktopScreensaver()
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::DBusInhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::DBusInhibitScreensaver() proxy created
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::DBusInhibitSucceeded(), mInhibitRequestID 6943 mShouldInhibit 1
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca8721f670] WakeLockListener 
topic video-playing state unlocked request lock 0
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::UninhibitScreensaver() Inhibited 1
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::SendUninhibit() WakeLockType FreeDesktopScreensaver
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
UninhibitFreeDesktopScreensaver()
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::DBusUninhibitScreensaver() mWaitingForDBusInhibit 0 
mWaitingForDBusUninhibit 0 request id 6943
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::DBusUninhibitScreensaver() proxy created
[Parent 17406: Main Thread]: D/LinuxWakeLock [78ca7343e650] 
WakeLockTopic::DBusUninhibitSucceeded() mShouldInhibit 0
```

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/35

------------------------------------------------------------------------
On 2024-05-01T21:42:04+00:00 Mbarriolinares wrote:

This is still happening

Firefox 125.0.3 (64-bit)
XFCE xfwm4 4.18.0

```
dbus-send --dest=org.freedesktop.PowerManagement --print-reply=literal 
/org/freedesktop/PowerManagement/Inhibit 
org.freedesktop.PowerManagement.Inhibit.GetInhibitors
```
```
   array [
   ]
```

This returns nothing when firefox is opened for a while. If I restart
firefox, then the inhibit is ok.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/36

------------------------------------------------------------------------
On 2024-05-20T09:34:13+00:00 Gunerius wrote:

Sorry if this is irrelevant, but I have the same problem on Firefox
126.0 for Windows 10. Not expecting any replies, just wanted to mention
it in case it's useful to anyone.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/37

------------------------------------------------------------------------
On 2024-05-22T08:28:33+00:00 Stransky wrote:

(In reply to Øystein Guneriussen from comment #36)
> Sorry if this is irrelevant, but I have the same problem on Firefox 126.0 for 
> Windows 10. Not expecting any replies, just wanted to mention it in case it's 
> useful to anyone.

Please file another bug against Windows - it's different issue there.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/38

------------------------------------------------------------------------
On 2024-06-26T18:32:57+00:00 Mbarriolinares wrote:

This bug is never gonna get fixed right?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/41

------------------------------------------------------------------------
On 2024-06-27T07:12:54+00:00 Stransky wrote:

(In reply to Manu Barrio Linares [:Manu] from comment #38)
> This bug is never gonna get fixed right?

Who knows. There's too many bugs and few developers who works on them. Feel 
free to join and try to solve it. There's a mini-howto:
https://mastransky.wordpress.com/2023/07/04/no-one-fights-alone-a-guide-to-your-first-firefox-patch-on-linux/

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/42

------------------------------------------------------------------------
On 2024-08-08T12:14:14+00:00 Stransky wrote:

Manu, please run Firefox on terminal and attach a log with 
MOZ_LOG="LinuxWakeLock:5" env variable so we can check why Wake lock is not 
applied.
Run as:
```
MOZ_LOG="LinuxWakeLock:5" firefox > log.txt 2>&1
```
and attach the log here.
Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2047262/comments/46


** Changed in: firefox
       Status: Unknown => Confirmed

** Bug watch added: gitlab.xfce.org/xfce/xfce4-power-manager/-/issues #210
   https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/210

** Bug watch added: Mozilla Bugzilla #1848084
   https://bugzilla.mozilla.org/show_bug.cgi?id=1848084

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2047262

Title:
  Firefox stopped inhibiting screensaver on video playback

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/2047262/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to