Screen dims while a video is playing in VLC

Bug #1772325 reported by Extremeadin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Xfce4 Power Manager
Fix Released
Medium
xfce4-power-manager (Debian)
New
Unknown
xfce4-power-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

While playing a video with VLC when my laptop is using the battery, the screen will dim after a couple of minutes. I was expecting it not to dim while a video was playing. It should be noted that the screen does not go blank or lock, so that seems to be working correctly. I'm not sure if this is a bug with the power manager or another package.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: xfce4-power-manager 1.6.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun May 20 17:56:50 2018
InstallationDate: Installed on 2018-05-19 (1 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: xfce4-power-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Extremeadin (extremeadin) wrote :
Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Does that only happen with VLC?

Changed in xfce4-power-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Extremeadin (extremeadin) wrote :

No, I just checked using Parole and it still dimmed.

I don't know it is relevant, but I found another bug report with the same symptoms (dims while video plays, but other power management features work) in Linux Mint in Cinnamon: https://bugs.launchpad.net/linuxmint/+bug/1332316

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Okay. I guess it is worth to check the power manager debug output then:

killall xfce4-power-manager; xfce4-power-manager --no-daemon --debug

Run this command, wait until the screen is dimmed and attach the terminal output to this report.

Revision history for this message
Extremeadin (extremeadin) wrote :

Here it is. Near the end of the log is where the display dimmed.

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Sadly, that does not tell us much. The power manager does the screen dimming, but it should not in this scenario.

At this point I can only suggest to open a report on the Xfce bug tracker.

https://bugzilla.xfce.org/

Changed in xfce4-power-manager (Ubuntu):
status: Incomplete → New
Revision history for this message
Extremeadin (extremeadin) wrote :

Thanks for the help, I'll look into this.

Changed in xfce4-power-manager (Debian):
status: Unknown → New
Revision history for this message
In , Extremeadin (extremeadin) wrote :

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

Revision history for this message
Extremeadin (extremeadin) wrote :

I filed a bug report on the XFCE bug tracker:

https://bugzilla.xfce.org/show_bug.cgi?id=14687

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Thanks.

Changed in xfce4-power-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Eyal Soha (eyal0) wrote :

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.

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

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.

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

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!

Revision history for this message
In , Eyal Soha (eyal0) wrote :

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?

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

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.

Revision history for this message
In , Gitbot (gitbot) wrote :

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

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

Submitted a related bugreport for fixing this in Parole: https://bugzilla.xfce.org/show_bug.cgi?id=15747

Changed in xfce4-power-manager:
status: Confirmed → Fix Released
Revision history for this message
Sean Davis (bluesabre) wrote :

Reportedly fixed in xfce4-power-manager 1.6.4.

Changed in xfce4-power-manager (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.