Basically, a collection of notes on building and running libreboot on t480. Hope it helps sb avoid a few pitfalls I’ve personally encountered. Corrections/other ways to do stuff are welcome.
- If you’re building libreboot from source like I did, you may want to replace repo URLs with mirrors in
config/git/grub
, as gnu repos are slow AF; - To boot your system, you’ll need it to either be bootable via legacy bios (libreboot uses seabios by default), or, more realistically, have grub bootloader. On NixOS, I’ve changed the bootloader config to:
boot.loader.grub = {
enable = true;
device = "nodev"; # generate grub.cfg without installing grub itself
theme = lib.mkForce null;
font = lib.mkForce null;
splashImage = lib.mkForce null;
};
Notice the disabled theming/fonts/background image: in my case, libreboot’s grub would only show the blank screen 'til I disabled them, so you may want to trim your config to only menu entries or something. Then when booting, you simply press ESC, choose grub, and select either loading the OS or searching for bootloader configs on NVMe.
- If you didn’t do [2], and are unable to boot your system, you may have some trouble with seabios not seeing your live USB you’re bringing to fix that. In this case, try again a few times: as far as I can tell, that happens when you press ESC too early.
- Having seabios auto-start grub:
echo '/rom@img/grub2' > bootorder && cbfstool libreboot.rom add -f bootorder -n bootorder -t raw
(slightly modified command from here). Dumping and re-flashing libreboot without an external programmer is done withflashprog -p internal
and requiresiomem=relaxed
in kernel cmdline; - Annoying stuff: FnLock turns on when booting or waking up from sleep; unsure on how to disable this as
nvramtool
refuses to work (mb a skill issue). Also, disconnecting the external battery while the laptop is powered on seems to cause a reboot. - Libreboot’s grub can be themed: see this for how it’s currently done (although, note, that we need
config/grub/xhci/config/payload
and notconfig/grub/default/config/payload
) and this for an example of how it can look. - Battery stuff, probably related to the Embedded Controller’s firmware: charge thresholds don’t seem to work (and the corresponding files are missing),
/sys/class/power_supply/BAT1/energy_{now,_full{,_design}}
are nowcharge_full{,_design}
, new optioncurrent_now
[Edit] 2 more bugs:
- Charge cycles are always 0 [mb an issue with my batteries, tho];
- The laptop constantly tries to power on if it dies due to depleted battery.
[Edit 2]:
- charge measurements don’t play well with cosmic-epoch on nixos in my particular case: the percentage doesn’t seem to get updated, but looks somewhat correct upon reboots;
- Reduced backlight brightness range:
/sys/class/backlight/acpi_video0/max_brightness
is now 15, and not ~1515 as it was before.
Makes sense, since it’s apparently not even merged into coreboot yet (at least it wasn’t yesterday).