Firefox and inhibiting DPMS

Paul Ezvan paul at ezvan.fr
Sun Dec 19 17:51:45 CET 2021


Hello,

I've always had the issue with Xfce and Firefox that the screen would 
suspend while watching a video.

Note that when using Chromium the screen doesn't suspend as expected.

My first assumption was that it is because Firefox is not calling the 
correct DBus API in Xfce as described in 
https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/42

I made a code change in Firefox to fix this which landed in Firefox 95: 
https://hg.mozilla.org/integration/autoland/rev/1a71a4f15928

Now I correctly get from the Power manager applet "Firefox is inhibiting 
power management" (or something like that as my desktop uses the French 
locale), BUT the screen still suspends!

After some investigation, I believe that this is because 
xfce4-power-manager doesn't inhibit DPMS when getting the inhibit 
request, whereas it does it when entering presentation mode. I made a 
small change to inhibit DPMS in this case (patch attached), and this 
fixes the issue for me, the screen doesn't suspend any more while 
watching a video with Firefox.

Does it look like a good approach to fix this issue?

Thanks!
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce/attachments/20211219/66b5571e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Inhibit-DPMS-when-getting-power-inhibit-request.patch
Type: text/x-patch
Size: 1128 bytes
Desc: not available
URL: <https://mail.xfce.org/pipermail/xfce/attachments/20211219/66b5571e/attachment.bin>


More information about the Xfce mailing list