Page 1 of 1

vlc executes "xdg-screensaver reset" periodically instead of "xdg-screensaver suspend ..." to disable the screensaver

Posted: 19 Jul 2015 15:59
by vinc17
On a machine without a bloated screensaver (just standard DPMS features), according to strace, vlc executes "xdg-screensaver reset" every 30 seconds to disable the screensaver, which blinks the screen every 30 seconds on my machine (this is a poor implementation, however "xdg-screensaver reset" isn't meant to be executed periodically). It would be probably better to disable the screensaver only once with "xdg-screensaver suspend WindowID", and re-enabling it with "xdg-screensaver resume WindowID" when need be.

Note: the minimal screensaver xscreensaver doesn't solve the problem, as confirmed by thread VLC and xscreensaver problem.

Re: vlc executes "xdg-screensaver reset" periodically instead of "xdg-screensaver suspend ..." to disable the screensave

Posted: 20 Jul 2015 09:40
by Rémi Denis-Courmont
This is a bug somewhere between xdg-screensaver and your X11 driver. Nothing VLC can do about.

VLC used to call suspend/resume, but the implementation in xdg-screensaver is completely unusable and broken. We will not do this back again.

Re: vlc executes "xdg-screensaver reset" periodically instead of "xdg-screensaver suspend ..." to disable the screensave

Posted: 20 Jul 2015 10:29
by vinc17
Anyway, executing "xdg-screensaver reset" is a hack (it has never been there to disable the screensaver), which doesn't even work when the blank time is less than 30 seconds. MPlayer can disable the screensaver without any problem (it doesn't even use "xdg-screensaver suspend" because I don't see any screen blinking any time).

Re: vlc executes "xdg-screensaver reset" periodically instead of "xdg-screensaver suspend ..." to disable the screensave

Posted: 20 Jul 2015 11:22
by Rémi Denis-Courmont
Executing "xdg-screensaver suspend" is a hack too. Fact is that neither can "reset" nor "suspend" can ever work properly. It is not an accident that VLC prefers D-Bus screensaver interfaces.

The problem you describe is clearly a bug either in xdg-utils or in your display driver. That MPlayer uses a different strategy that does not trigger the bug is irrelevant. For that matter ,VLC could configure DPMS directly, but that would be stupid: it would interfere with desktop environment and leaves DPMS disabled if VLC crashes or gets killed.