! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Screen dims while playing when playing back video
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Cody 2018-09-08 13:54:24 CEST
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
Comment 1 eyalsoha@gmail.com 2019-06-04 05:13:48 CEST
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.
Comment 2 Simon Steinbeiss editbugs 2019-07-23 23:02:14 CEST
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.
Comment 3 Simon Steinbeiss editbugs 2019-07-25 00:22:46 CEST
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!
Comment 4 eyalsoha@gmail.com 2019-07-26 04:21:01 CEST
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?
Comment 5 Simon Steinbeiss editbugs 2019-07-26 09:08:41 CEST
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.
Comment 6 Git Bot editbugs 2019-07-26 09:10:25 CEST
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
Comment 7 Simon Steinbeiss editbugs 2019-07-26 09:40:12 CEST
Submitted a related bugreport for fixing this in Parole: https://bugzilla.xfce.org/show_bug.cgi?id=15747

Bug #14687

Reported by:
Cody
Reported on: 2018-09-08
Last modified on: 2019-07-26

People

Assignee:
Simon Steinbeiss
CC List:
4 users

Version

Attachments

Patch to fix the bug (823 bytes, patch)
2019-06-04 05:13 CEST , eyalsoha@gmail.com
no flags

Additional information