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)
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 out there running Arch on their Librem 14
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:
#!/bin/sh
PREREQ="udev keymap"
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
# 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
fi
(You can also set another number than 255 of course to reduce the brightness.