Wake up screen from sleep mode

Hello everyone,

I have running a pi4 with DietPi and the roon web controller extension ver. 1.2.13 connected to a touch screen. Everything works correctly but there is something I can’t get it to work. When there are 5 minutes without playback the screen goes to sleep, but when I go back to playing music the screen is still in sleep. is there any way to get the screen to work again when I go back to playing music? Now, to get it to work, I have to touch the screen, and it’s kind of awkward.

If anyone could guide me I would be very grateful.

Apologies for my lousy English, but I am using a translator.
Thanks

Hi and welcome to Roon‘s forum, David!

There‘s likely no quick fix for your idea, and note that the extension isn‘t maintained any longer either, but …

I‘ve basically a comparable implementation on my DIY Roon metering bridge as shown here, but at least that may get you started on further tinkering to turn the screen back on again on restarting play.
You might have to find the script that checks for zone playing status and then could add issuing a fake HID input that activates the screen again, since said implementation likely just changes the Display Power Management Signaling (or DPMS) setting which can‘t turn the screen back on…

Keep us updated on your progress, please!

Hello,

copying your idea I have managed to get the screen to turn on or off with the external DAC I have connected to the Pi. But I only get it to work if I open an SSH session from the PC.

export DISPLAY=“:0”
DIR=‘/proc/asound/HIFIMANEF400/pcm0p/sub0/status’

while :
do
content=$(cat “$DIR”)
if [[ “$content” != ‘closed’ ]]; then
xset s default && xset s reset
elif [[ “$content” == ‘closed’ ]]; then
xset s 1
fi
sleep 1
done

Now it’s up to me to figure out how to run the script automatically when I turn on the Pi and not have to start an SSH session on the PC.

I have no idea about programming, about Linux!!! So any help will be welcome.

:nerd_face:

EDIT

Okay, next step achieved!

crontab -e

add the line: @reboot /boot/custom.sh

Next step: make it work with my Sonos system. I think this part will be a bit more complicated.

1 Like

Your post got me to play around with the settings again, since I always wanted it to shut down and turn on the screen automatically …
With your approach, my 7" RPi screen wouldn’t wake up again after an hour, so I tweaked it until I found working settings for my set-up …

#!/bin/bash
DIR=‘/proc/asound/Loopback/pcm1p/sub0/status’
while :
do
content=cat $DIR
if [[ “$content” != ‘closed’ ]]; then
xset s reset -dpms
elif [[ “$content” == ‘closed’ ]]; then
xset s blank dpms 1 1 0
fi
sleep 1
done

Maybe that’s helpful for someone, sometime …