I have a Dell Inspiron 5570 (5000 series) and for some obscure reason in my default linux instalation the default keyboard backlight timeout is something like 1 second. Doesn't make any sense, what benefit does a keyboard backlight have if I can only see it in the dark only when I'm already typing?
Took a couple of wrong paths searching for a solution until I found how to manually tweak that value. Keyboard backlights
configuration files are located under /sys/class/leds
and for a Dell laptop the magic file is
/sys/class/leds/dell::kbd_backlight/stop_timeout
.
There's no option to disable the timeout completely so I've created a systemd service that sets the timeout to 30 minutes
(just an arbitrary large value) each time graphical.target
is reached.
[Unit]
Description=Extend keyboard backlight timeout
[Service]
Type=oneshot
ExecStart=/usr/bin/env bash -c "echo 30m > /sys/class/leds/dell::kbd_backlight/stop_timeout"
[Install]
WantedBy=graphical.target