Disable screensaver when playing music

Hi All
Sorry if the question has already been asked but is there a way to disable the screen going black when playing music?
(7" Touchscreen). And then going black again after a certain time of inactivity.
Thanks

Plus one!

This would be a nice feature. Keep the screen on while playing music and turn it off after a certain tim of inactivity. Then automatically turn on again if a new playback is started.

+1!

Hi,

I have solved this problem the following way.

  1. Configure mpd to write a state file. Uncomment or add the following line to /etc/mpd.conf
state_file                      "/run/mpd/state"
  1. Set the screensaver to 2 minutes as described in other threads here. Add the following lines to /opt/volumiokiosk.sh

xset +dpms xset s blank xset dpms 0 0 120

  1. Create a shell script like this and save it as /opt/volumiokiosk_screensaver.sh

[code]#!/bin/bash
export DISPLAY=:0

SERVICE=volumio-kiosk.service
STATEFILE=/run/mpd/state
BLANKFILE=/run/mpd/blank

systemctl status $SERVICE > /dev/null 2>&1
if [ $? -ne 0 ]; then
#echo service not running
exit 0
fi

if [ ! -f $STATEFILE ]; then
#echo MPD file missing
exit 0
fi

grep -q “state: play” $STATEFILE
if [ $? -eq 0 ]; then

playing, so disable the screensaver

xset -dpms
xset s off
rm -f $BLANKFILE
elif [ ! -f $BLANKFILE ]; then
xset +dpms
xset s blank
:> $BLANKFILE
fi[/code]

  1. Install cron

  2. Let the script run every minute using cron. Edit the crontag using “crontab -e” and add the following line:

* * * * * /opt/volumiokiosk_screensaver.sh

This works very nice for me. :slight_smile: