I’ve setup a https://magicmirror.builders to have some information handy when leaving my apartment. I’m using a https://www.raspberrypi.org/ with the official https://www.raspberrypi.org/products/raspberry-pi-touch-display/.
However I don’t want to have the display backlight turned on all the time. Especially at night the backlight is rather annoying. In Addition I don’t see why I should use up energy when nobody is looking at the screen.
Turning the backlight on and off
After some research I fond that turning the display on and off can be achieved by writing 0 or 1 to a special file:
$ sudo sh -c 'echo "1" > /sys/class/backlight/rpi_backlight/bl_power' # Turn backlight off $ sudo sh -c 'echo "0" > /sys/class/backlight/rpi_backlight/bl_power' # Turn backlight on