Enable keyboard backlight for boot menu & login screen on ASUS ROG Zephyrus G14 (should also work with other laptops with some adjustments). Tested with Fedora 39 on ASUS ROG Zephyrus G14 GA402RK.
To enable the keyboard backlight for the boot menu, keyboard backlight needs to be turned on on shutdown.
This can be accomplished by placing a executable into /usr/lib/systemd/system-shutdown/
(see https://www.freedesktop.org/software/systemd/man/latest/systemd-halt.service.html).
You need to have root rights to perform the following actions (use sudo
):
- Put the
keyboard-backlight.shutdown
script into/usr/lib/systemd/system-shutdown/
. - Find the
brightness
file:ls -lah /sys/class/leds/asus::kbd_backlight
- Copy the target of the link, it should be something starting with
../../devices/pci
. - Replace
%PATH_TO_BRIGHTNESS_FILE%
with the copied link, however make sure you have an absolute path:/sys/devices/
instead of../../devices/
.
- Make the script executable:
chmod -v +x keyboard-backlight.shutdown
. - Test the script (disable keyboard backlight before):
./keyboard-backlight.shutdown
To enable the keyboard backlight for the login screen, it needs to be turned on on boot.
This can be accomplished by using /etc/rc.d/rc.local
(or /etc/rc.local
depending on Linux distribution) (see https://www.freedesktop.org/software/systemd/man/latest/rc-local.service.html).
- Copy the content of the working
keyboard-backlight.shutdown
script into/etc/rc.d/rc.local
.