[vlc-devel] [PATCH] Add dpms module to switch it off while playing
remi at remlab.net
Fri Oct 25 22:27:36 CEST 2013
Le vendredi 25 octobre 2013 22:10:00 Olivier Brunel a écrit :
> On 10/25/13 21:42, Rémi Denis-Courmont wrote:
> > Le vendredi 25 octobre 2013 21:01:06 Olivier Brunel a écrit :
> >> On 10/25/13 20:51, Rémi Denis-Courmont wrote:
> >>> Hello,
> >>> The DPMS extension of X11 is meant for the desktop power management
> >>> component to use, not for normal applications. Changing DPMS settings
> >>> via
> >>> xset, Xlib or XCB would clobber the desktop settings, which is obviously
> >>> *not* acceptable.
> >>> Normally, the desktop should automatically disarm and rearm DPMS when
> >>> the
> >>> screensaver is inhibited and uninhibited respectively. If it does not,
> >>> then it is a the bug in the desktop environment. There are no ways to
> >>> fix
> >>> this problem in VLC for lack of a proper API.
> >> Well, as I said the right thing to do would have been to call
> >> xdg-screensaver,
> > That is what VLC already does - if D-Bus probing fails. And better yet,
> > LibVLC also does it; it does not depend on the VLC playlist.
> Right, but VLC also keeps things suspended while paused, which as I said
> was my main motivation for writing this.
> When e.g. I pause something and go AFK for some time, I expect
> DPMS/screensaver to be back on and eventually quick in.
I agree it should but it does not regardless of your patch. This needs fixing
in the core, not in plugins.
> >> but for that I would have needed to send it the window
> >> ID, which I don't know how to get from VLC.
> > That is not true. xdg-screensaver has two modes. Only one of them,
> > suspend/resume, requires a window ID. The reset mode does not, and that is
> Yeah, that's what I meant: to use suspend/resume I'd have needed a
> window ID.
> > what VLC uses. In fact, reset turns out to be more reliable as
> > suspend/resume had a propensity to leave dangling processes around.
> Possible, but as as Rafaël said - and as I experienced - that doesn't
> prevent monitors from turning off, so not really a perfect solution.
The D-Bus interface works just fine here. It is supposed to manage all
screensavers, hardware or software. xdg-screensaver is just a crappy/legacy
fallback that I did not yet dare remove.
> >> And since (in my specific setup) that call would pretty much call xset,
> > Your specific setup is not the setup of other people. This patch is not
> > acceptable as is and that is the end of it.
> Of course not, I don't deny that & never expected the patch to be merged
> as is, but surely it can be discussed/improved...
For pause handling, changes are needed in ES and video outputs.
For DPMS, I think the problem lies with your desktop environment. It really
should implement a D-Bus interface, preferrably the KDE/FDO one.
More information about the vlc-devel