To Control the backlight of the Raspberry Pi 7-inch touchscreen display

Using command line

Turn Off

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

Turn On

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

https://github.com/raspberrypi/linux/commit/e9c356a2c18787d356567f24e7879875d7337efc

From Windows IoT

Seems hit and miss at the moment. Some users report it can be done via the display PCB’s 5 pin connector I2C pins, other users report its buggy, can cause touch to stop working and also causes problem with other I2C devices on the same bus. Also there’s no official documentation. A better way it seems is via a GPU mailbox interface feature but as yet we’ve not come across a simple implementation.

https://www.raspberrypi.org/forums/viewtopic.php?t=152495

https://social.msdn.microsoft.com/Forums/en-US/d1b1a79f-e1ec-4879-abd7-82ea523b35e9/brightness-controls-in-iot-rp3-official-touch-screen-backlight?forum=WindowsIoT

To Control the backlight of HDMI displays

Using command line

Turn Off

 vcgencmd display_power 0

Turn On

vcgencmd display_power 1
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *