How to modify the panel backlight

Revision as of 13:55, 8 February 2019 by imported>Frq08988
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:ArticleMainWriter Template:ReviewersList Template:ArticleProposedVersion Template:ArticleToBeReviewedByTW


First of all, you need to identify the backlight device linked to your panel thanks to the sysfs:

 ls /sys/class/backlight
5a000000.dsi.0

In the above example, there is a single entry named "5a000000.dsi.0", replaced by "*" in the below command.


To adjust the panel backlight, enter:

 echo 32 > /sys/class/backlight/*/brightness    # set the dsi panel backlight to the value 32

Note: Be sure to use values between 0 and max_brightness

To get the maximum panel backlight value, enter:

 cat /sys/class/backlight/*/max_brightness
255

To get the actual panel backlight value, enter:

 cat /sys/class/backlight/*/actual_brightness
32


Use one of the next commands for quickly test the panel backlight:

 export bl=/sys/class/backlight/5a000000.dsi.0/brightness

 # switch on/off test
 (while true; do echo 0 > $bl; sleep 0.5; echo 255 > $bl; sleep 0.5; done)

 # slow 32-step tests
 (i=0; while true; do i=$(((i+32)%256)); echo $i > $bl; sleep 0.5; done)

 # fast 1-step test
 (i=0; while true; do i=$(((i+1)%256)); echo $i > $bl; done)