I recently received the official Raspberry Pi 7 inch Touchscreen. It works fine so far, but I would like to control the brightness and switch off/on the backlight.
I tried xbacklight
, it is not working. /sys/class/backlight
is empty. I didn't find a clue in /sys/devices/
.
3 Answers
There apparently have been 2 versions of the 7" touchcreen. The 1.0 versions did not support adjusting the backlight brightness, but the 1.1 versions do, and you can do it by setting a value from 0 to 255 like this:
sudo sh -c "echo 80 > /sys/class/backlight/rpi_backlight/brightness"
There's a lengthy thread here that discusses this feature: https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=120968
-
This doesn't answer the question. The user said, "
/sys/class/backlight
is empty". Oct 30, 2018 at 15:14 -
If you read the linked thread, I think the reason for /sys/class/backlight being empty is either you have the older 1.0 touchscreen, or you need to update the Pi's firmware to get the touchscreen support Oct 31, 2018 at 2:57
I have found that as of 01/12/17 the method Kevin mentioned in his answer to echo
to bl_power
to turn the backlight on/off does not always work consistently.
As the question linked describes, an alternative to turning the backlight off via bl_power
is setting the brightness to 0 in the brightness file which does the same thing in my experience.
Also, in order to not have to use sudo sh -c
create the file /etc/udev/rules.d/backlight-permissions.rules
and add this line:
SUBSYSTEM=="backlight",RUN+="/bin/chmod 666 /sys/class/backlight/%k/brightness /sys/class/backlight/%k/bl_power"
I also had the same problem in the end i sent it back as it broke within a 2 weeks the problem is due to the on board graphics driver raspberry say there are going to release it i class the screen as a unfinished prototype they should not have released it without backlight support or even a dim switch would do it does start to hurt eyes u could vnc to an android tablet as a altenitive
sudo apt-get update && sudo apt-get upgrade
was executed.