While playing back a video file in either VLC or Parole, my laptop screen will dim to a lower brightness level. The screen does not go blank, so the other power management functions are correctly inhibited. Steps to reproduce: 1. On a laptop that supports screen dimming while idle, ensure the that power manager is set to dim the screen after a certain period of time. 2. Play a video in a media player that supports inhibiting power management functions (i.e. VLC or Parole) Actual Results: The screen dims after the specified period of time. Expected Results: The screen will not dim after the specified period of time while a video is playing as the power management functions should be inhibited. OS Information: Xubuntu 18.04. Note: I originally submitted this bug report on the Xubuntu bug tracker, but I was asked to submit it here. Reference: https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1772325 https://bugs.launchpad.net/debian/+source/xfce4-power-manager/+bug/1772325
Created attachment 8612 Patch to fix the bug I tested this by setting the dimming delay very small and waiting, both with and without a video playing. It works as expected.
The patch looks ok. The only thing to keep in mind is that this doesn't just change the behavior of screen dimming but also of suspend-on-inactivity, which is configured in the "System" tab. So if you configure your laptop/PC to suspend after 30mins of idletime it will in this case also *not* suspend if something - e.g. a video - inhibits it.
I finally got around to testing the patch and it doesn't work for me for some reason. While having screensaver inhibition enabled in both VLC and Parole I still got screen dimming. @eyalsoha: Can you give more details about the setting when testing the patch? Thanks!
Sure. It works for me. I patched in the code that I attached, ran make, then I copied the new xfce4-power-manager into /usr/bin as root. Then I went into the power manager settings and in the display tab I set "Brightness reduction" "Reduce after" to just 10 seconds. Then I shut and save the settings and just wait 10 seconds. The screen dims. Then I open YouTube in Chrome and start a video. When I click on the battery icon now, there is a list that says that chrome is inhibiting. Then I wait way more than 10 seconds and there is no screen dimming. Are you sure that you installed the patch correctly? You could put printfs around the patched code and then kill the power manager and re-run it like this: xfce4-power-manager --debug --debug --debug --no-daemon Then you'll be able to see your printf's in the output. What did you try that failed?
Thanks for the clarification - that's exactly what I expected. So Chrome/Chromium inhibits power management, not just the screensaver, therefore the dimming doesn't occur. Both VLC and Parole inhibit the screensaver, not power management, therefore dimming still occurs (even after your patch). So while this doesn't address the OP's bug directly it may be all we can do within the power manager directly. I would suggest we implement the power manager inhibition in Parole and the OP submits an issue against VLC.
Eyal Soha referenced this bugreport in commit 46f429282fc852ab8639e8af9aca6c96b8b96bda Make inhibition affect dimming and inactivity action (Bug #14687) https://git.xfce.org/xfce/xfce4-power-manager/commit?id=46f429282fc852ab8639e8af9aca6c96b8b96bda
Submitted a related bugreport for fixing this in Parole: https://bugzilla.xfce.org/show_bug.cgi?id=15747