Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Backlight

notro edited this page Mar 12, 2015 · 11 revisions

Most drivers use the fbtft backlight support to control backlight.
This is enabled if there is a 'led' gpio present.

These drivers will have backlight power control exposed in the sysfs filesystem.

# Turn off backlight
echo 1 | sudo tee /sys/class/backlight/*/bl_power

# Turn on backlight
echo 0 | sudo tee /sys/class/backlight/*/bl_power

Brightness is currently not supported (need a kernel PWM driver).

Give all users backlight control permissions

/etc/udev/rules.d/backlight-permissions.rules

SUBSYSTEM=="backlight",RUN+="/bin/chmod 666 /sys/class/backlight/%k/brightness /sys/class/backlight/%k/bl_power"

Backlight control outside of FBTFT

Wiring Pi can be used to dim the backlight.

gpio -g mode 18 pwm 
gpio -g pwm 18 1023

References

Clone this wiki locally