Registered User mNo edit summary |
Registered User mNo edit summary Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
<noinclude> | |||
{{ApplicableFor | {{ApplicableFor | ||
|MPUs list=STM32MP13x, STM32MP15x, STM32MP25x | |MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
|MPUs checklist=STM32MP13x, STM32MP15x, STM32MP25x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
}} | }} | ||
</noinclude> | |||
First identify the backlight device linked to your panel, thanks to the sysfs: | First identify the backlight device linked to your panel, thanks to the sysfs: | ||
{{ | {{board$}}ls /sys/class/backlight | ||
5a000000.dsi.0 | 5a000000.dsi.0 | ||
Line 13: | Line 14: | ||
To adjust the panel backlight, enter the following command: | To adjust the panel backlight, enter the following command: | ||
{{ | {{board$}}echo '''32''' > /sys/class/backlight/*/'''brightness''' # set the dsi panel backlight to the value '''32''' | ||
Note: Only values between 0 and '''max_brightness''' must be used. | Note: Only values between 0 and '''max_brightness''' must be used. | ||
To get the maximum panel backlight value, enter: | To get the maximum panel backlight value, enter: | ||
{{ | {{board$}}cat /sys/class/backlight/*/'''max_brightness''' | ||
255 | 255 | ||
{{Info | If the '''max_brightness''' value is 1, the backlight can only be switched on and off. If the '''max_brightness''' value is above 1, the backlight has several levels on luminosity (pwm-based backlight for instance).}} | {{Info | If the '''max_brightness''' value is 1, the backlight can only be switched on and off. If the '''max_brightness''' value is above 1, the backlight has several levels on luminosity (pwm-based backlight for instance).}} | ||
To get the actual panel backlight value, enter: | To get the actual panel backlight value, enter: | ||
{{ | {{board$}}cat /sys/class/backlight/*/'''actual_brightness''' | ||
32 | 32 | ||
Use one of the following commands to quickly test the panel backlight: | Use one of the following commands to quickly test the panel backlight: | ||
{{ | {{board$}}export bl=/sys/class/backlight/5a000000.dsi.0/brightness | ||
{{ | {{board$}}export max=/sys/class/backlight/5a000000.dsi.0/max_brightness | ||
{{ | {{board$}}# switch on/off test | ||
{{ | {{board$}}(while true; do echo 0 > $bl; sleep 0.5; echo $max > $bl; sleep 0.5; done) | ||
{{ | {{board$}}# slow 32-step tests (only for pwm-based backlights) | ||
{{ | {{board$}}(i=0; while true; do i=$(((i+32)%256)); echo $i > $bl; sleep 0.5; done) | ||
{{ | {{board$}}# fast 1-step test (only for pwm-based backlights) | ||
{{ | {{board$}}(i=0; while true; do i=$(((i+1)%256)); echo $i > $bl; done) | ||
{{Info | Be sure the panel is running (power on) before modifying its backlight.}} | {{Info | Be sure the panel is running (power on) before modifying its backlight.}} |
Latest revision as of 09:41, 8 October 2024
First 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", which is replaced by "*" in the below command.
To adjust the panel backlight, enter the following command:
echo 32 > /sys/class/backlight/*/brightness # set the dsi panel backlight to the value 32
Note: Only values between 0 and max_brightness must be used.
To get the maximum panel backlight value, enter:
cat /sys/class/backlight/*/max_brightness
255
![]() |
If the max_brightness value is 1, the backlight can only be switched on and off. If the max_brightness value is above 1, the backlight has several levels on luminosity (pwm-based backlight for instance). |
To get the actual panel backlight value, enter:
cat /sys/class/backlight/*/actual_brightness
32
Use one of the following commands to quickly test the panel backlight:
export bl=/sys/class/backlight/5a000000.dsi.0/brightness
export max=/sys/class/backlight/5a000000.dsi.0/max_brightness
# switch on/off test
(while true; do echo 0 > $bl; sleep 0.5; echo $max > $bl; sleep 0.5; done)
# slow 32-step tests (only for pwm-based backlights)
(i=0; while true; do i=$(((i+32)%256)); echo $i > $bl; sleep 0.5; done)
# fast 1-step test (only for pwm-based backlights)
(i=0; while true; do i=$(((i+1)%256)); echo $i > $bl; done)
![]() |
Be sure the panel is running (power on) before modifying its backlight. |