Automatic LCD backlight OFF after a specified time


#1

Anybody know how to set automatic LCD backlight off after a specified time?
I run Nymea on Raspberry Pi 3B+, with Debian Stretch, combined with an original Raspberry 7" display.

The solution described here (with the xscreensaver app) does not work.


#2

Hmm… I’m using it as described in that hackster article. However, I made a mistake in that article when I first wrote it as someone pointed out a couple of days ago. I’ve updated the scripts to do so. Maybe it’s that?

If not, I’d need more info to help you get this working. Try executing the commands manually to turn backlight on/off:

To turn backlight on:

echo 0 | sudo tee /sys/class/backlight/rpi_backlight/bl_power

and to turn it off:

echo 1 | sudo tee /sys/class/backlight/rpi_backlight/bl_power

Does that work? If it does, try executing the wrapper scripts ( screenon.sh/screenoff.sh) as in that post and figure out the step where it breaks.