rumplestilzken / gargoyle_lineageos20

LineageOS 20 TrebleDroid releases for Unihertz devices
69 stars 0 forks source link

An option to turn off the keyboard backlight? #19

Open sgtpep opened 1 year ago

sgtpep commented 1 year ago

Couldn't find any way to turn it off on LineageOS 20.

sgtpep commented 1 year ago

There's 'Disable backlight of hardware buttons if present' under Phh Treble Settings -> Misc features, but it doesn't seem to work.

rumplestilzken commented 1 year ago

Was there a way in stock to do this?

runoono commented 1 year ago

there was a way on stock to do this under display menu iirc on gargoyle you can temporarily turn off the backlight with the command echo 0 > /sys/class/leds/button-backlight/brightness at least until the keyboard backlight times out and the system turns it back on this leads me to think somewhere the system echoes 1 or 255 into that file

rumplestilzken commented 9 months ago

Related to #43

runoono commented 8 months ago

I figured out a way to turn off the backlight, from a root shell punch in echo 0 > /sys/class/leds/button-backlight/brightness && chmod 555 /sys/class/leds/button-backlight/brightness or from termux su -c "echo 0 > /sys/class/leds/button-backlight/brightness && chmod 555 /sys/class/leds/button-backlight/brightness"

to turn it back on you can either chmod 775 /sys/class/leds/button-backlight/brightness and turn the screen on and off or chmod 775 /sys/class/leds/button-backlight/brightness && echo 1 > /sys/class/leds/button-backlight/brightness

the only problem with this approach is that you have to know if you keyboard backlight is on or off, I'll probably write something that looks at file permissions to determine whether the key backlight has been tampered with or not