I don't see anybody interested in actually fixing this. I'll try to add a g_timeout_add_seconds timer of 60 seconds when `mUninhibitAttempts` reach zero. After the timer, I will reset `mUninhibitAttempts` and try again. Also I'll remove the `sWakeLockType = Unsupported` logic, I see no benefit in not just "trying again after n seconds".
I have a fairly good CPU (Amd Ryzen 7 8700G + 32GB RAM) for build and testing, still this is my second time hacking the firefox source code. I'll appreciate any help So my plan is: 1. Removing "Unsupported" state. 2. Introducing a "cooldown timer" when uninhibiting fails multiple times and add a retry logic. 3. I'll try to scope it specifically for video playback, or generally by topic. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to firefox in Ubuntu. https://bugs.launchpad.net/bugs/2047262 Title: Firefox stopped inhibiting screensaver on video playback Status in Mozilla Firefox: Fix Released Status in firefox package in Ubuntu: Confirmed Bug description: Update (02/2024): With Firefox 122 on Ubuntu-Mate 23.10, screensaver/powermanager inhibition is completely broken even with Mozilla's .deb package. After a fresh start of firefox, screen saver is blocked properly when playing video but after opening/un-suspending a few tabs with video, inhibition stops working. I was unable to come up with reproducible scenario but after a few hours of browsing it usually stops working. Restarting firefox fixes the problem. The bug first appeared around August and affects both .deb and snap packages. Tested on Ubuntu-Mate 22.04.3, Xorg, both Pulseaudio and Pipewire (if that's relevant). I don't see any relevant msgs in xsession-errors or system logs. To manage notifications about this bug go to: https://bugs.launchpad.net/firefox/+bug/2047262/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

