Put touch screen to sleep after 10 minutes with RPI3 and Chromium in kiosk mode.

Hello, I am running the official raspberry 7 inch touch screen with this project, coming from the balena repo. I cannot seem to find any parameters to have the touch screen sleep after a given amount of time. Any advice on how to do that?

Thank you!

Hi,

It seems that this isn’t supported currently.
This sounds useful though.
I’ve opened an issue for tracking this request in the balenaBlocks repo and passed this to respective team:
See: https://github.com/balenablocks/browser/issues/30

We will also give you a note once this gets implemented.

Kind refards,
Thodoris

@thgreasi thanks!

Hello Tommaso,
we discussed adding this directly as a balenablocks/browser feature, but ultimately decided against it as this feature needs to be aware of the hardware attached and the intention of the application.
We do however have a similar feature in one of our projects (balena-dash), that project uses a scheduler service to define a set window in which the touch screen is asleep, hopefully that can serve as inspiration on how to implement the behaviour you want in your own application.

@nazrhom I looked at the balena blocks project, and solved the issue by changing the last few lines of start.sh to allow xset screensaver mode. To have the screen sleep after 10 seconds, change

echo "xset s off -dpms" >> /home/chromium/xstart.sh

to

echo "xset s on" >> /home/chromium/xstart.sh
echo "xset s 10 10" >> /home/chromium/xstart.sh

Tested on 7 inch touch screen for RPI3b+ and seems to work fine.