Turn off keyboard backlight when shutting down Linux
In my Kubuntu the right place is /sys/class/leds/
.
# ls /sys/class/leds/
dell::kbd_backlight input4::capslock input4::numlock input4::scrolllock phy0-led xpad0
Most certainly, if your Metoo Zero backlight is there, it will be something other than dell::kbd_backlight
, so the below commands are just examples.
# ls "/sys/class/leds/dell::kbd_backlight"
brightness device max_brightness power start_triggers stop_timeout subsystem trigger uevent
# cat "/sys/class/leds/dell::kbd_backlight/max_brightness"
2
This number suggests my backlight has three states. I can run (as root):
# echo 0 > "/sys/class/leds/dell::kbd_backlight/brightness"
# echo 1 > "/sys/class/leds/dell::kbd_backlight/brightness"
# echo 2 > "/sys/class/leds/dell::kbd_backlight/brightness"
It turned out the states are: 0
=off, 1
=dimmed, 2
=bright.
If it works for you, make your Linux execute the appropriate command before it shuts down (I believe the way to do it is distribution-dependent).