Librem 14/Arch: initramfs hook to turn keyboard on during boot


I was kind of annoyed the keyboard back light always turned off during boot, making typing my LUKS password painful at night. So I’ve created a tiny mkcpioinit hook you can insert just before encrypt.

Note: this is for Librem 14 on Arch Linux, not PureOS. You also need the version of PureBoot/Coreboot that is not still exposing System76 HID (basically you must have /sys/class/leds/librem_ec:* available on your system)

More details in the README in the repo.


This is amazing! Was annoying me too, thanks for providing this.

1 Like

happy to meet another night owl :slight_smile:

BTW, this is now in the AUR (alongside with the EC ACPI DKMS, should you need it)

1 Like

Oh nice! That was you that added the EC acpi dkms to AUR, I hadn’t made the connection until now. Thank you for that too, you saved me a few headaches there with the battery not charging lol. Happy to know there is a fellow :owl: out there running Arch on their Librem 14 :smiley:

1 Like

Thank you for writing about this, I though the same when I had to enter my LUKS passphrase in the dark the first time. I am using PureOS and also wanted to turn on the keyboard light during boot.

As far as I understand Debian and thus PureOS uses initramfs-tools instead of mkcpioinit, I adapted your idea as follows (by making local changes – maybe a real Debian package would be nicer…)

Create a file /etc/initramfs-tools/scripts/init-top/l14kbdlight with this content:


PREREQ="udev keymap"
        echo "$PREREQ"
case $1 in
# get pre-requisites
        exit 0

# Turn on the keyboard lights on Librem 14:
if [ -e /sys/class/leds/librem_ec:kbd_backlight/brightness ]; then
    echo 255 > /sys/class/leds/librem_ec:kbd_backlight/brightness
    exit 0

(You can also set another number than 255 of course to reduce the brightness.

Run this command:

sudo chmod +x /etc/initramfs-tools/scripts/init-top/l14kbdlight
sudo update-initramfs -u

And reboot :slight_smile:

More information: man initramfs-tools