The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 00:07:39

tux_99
Member
Registered: 2025-06-17
Posts: 136  

Xscreensaver kicking in when a video is playing with mpv or mplayer

My setup: Devuan Excalibur with XFCE

When I use the XFCE-screensaver and a video is playing using mplayer or mpv or even within firefox (for example a youtube video) the screensaver does not activate while the video is playing, and this is the desired behaviour.

If I disable the XFCE-screensaver and instead use Xscreensaver from the Devuan repo, the screensaver kicks in at the configured idle time even when a video is playing so basically it ignores the communication from mplayer/mpv/firefox to prevent it from kicking in.

The man-page of Xscreensaver says:

PLAYING VIDEOS
       Likewise, if you have systemd(1) or elogind(8), then all of the popular  video  players  and
       web browsers will prevent XScreenSaver from blanking the screen while video is playing.

       Both of these features require that xscreensaver-systemd(6) be able connect to D-Bus.

xscreensaver-systemd is being started automatically by xscreensaver and I have elogind-daemon running (although I cannot tell whether it's able to connect to the D-Bus).

So to me it looks like it should work but maybe the Devuan elogind is not passing on the dbus messages or is somehow interfering in the process?

Has anyone succeeded in using Xscreensaver on Devuan with the screensaver not kicking in while videos are playing?


Either the users control the program – or the program controls the users” Richard Stallman

Offline

#2 Yesterday 07:35:45

kapqa
Member
Registered: 2019-01-02
Posts: 755  

Re: Xscreensaver kicking in when a video is playing with mpv or mplayer

not sure if this is the right repo,

but used something like this in the past to achieve the effect of disabling suspend during playback of video via mpv

https://git.sr.ht/~anteater/mpv-inhibit-suspend

it is not for disabling screensaver, but could have the same effect. now on kde there it can be effected easily in tray, just activate @presentation mode<
similarly, on mate, i use sometimes @caffeine to inhibit sleep bevaviour.

[color]---[/color]
OH sorry i did not read your question properly, please disregard my post.

Last edited by kapqa (Yesterday 10:36:11)

Offline

#3 Yesterday 13:39:21

swanson
Member
Registered: 2020-04-22
Posts: 160  

Re: Xscreensaver kicking in when a video is playing with mpv or mplayer

Here's a script I use for just that:

#!/bin/sh

sleep 600
while true #runs forever
do
	a=`cut -d ' ' -f 3 /proc/loadavg` #set a = load avg.
	if [ $(echo "$a > 0.25" | bc) -ne 0 ]; then #If load avg. is less than .25
		xdotool key F2 > /dev/null 2>&1
	else #If it's greater than .25
		sleep 600 #Wait ten minutes (600 seconds) and try again
	fi
done

Start it at login. It requires Xdotool only. It needs some tweaking for your usecase. Load average might be different (or to taste)

Last edited by swanson (Yesterday 13:43:38)

Offline

#4 Yesterday 13:46:02

tux_99
Member
Registered: 2025-06-17
Posts: 136  

Re: Xscreensaver kicking in when a video is playing with mpv or mplayer

Thanks, but I 'm not looking for a workaround (there should not be any need for one as it's supposed to work without one just like it does with XFCE-screensaver), I'm trying to figure out why XScreenSaver is not working correctly with the Devuan elogind and mplayer/mpv/firefox.

There seems to be a bug either in XScreenSaver or the Devuan elogind that causes this problem (or I'm missing some crucial config option), but I lack the skills to debug this (unless someone can give me some hints on how to debug this).

Last edited by tux_99 (Yesterday 13:47:30)


Either the users control the program – or the program controls the users” Richard Stallman

Offline

Board footer