Hey there,
After booting nixos 25.05 or 25.11 (on my Thinkpad T480) I can run bootctl and use nixos-rebuild just fine. But: Im using hibernate, as this is my daily driver, quite a lot and after one hibernation and wakeup cycle, bootctl fails with:
$ bootctl status
Assertion ‘n <= st.st_size + 1’ failed at src/basic/efivars.c:104, function efi_get_variable(). Aborting.
And nixos-rebuild switch/boot fails with:
Assertion ‘n <= st.st_size + 1’ failed at src/basic/efivars.c:104, function efi_get_variable(). Aborting.
Traceback (most recent call last):File “/nix/store/dqhq2k0sqrjrdkzip2a0j3cx7w1kzfbx-systemd-boot/bin/systemd-boot”, line 452, in main()
File “/nix/store/dqhq2k0sqrjrdkzip2a0j3cx7w1kzfbx-systemd-boot/bin/systemd-boot”, line 435, in maininstall_bootloader(args)
File “/nix/store/dqhq2k0sqrjrdkzip2a0j3cx7w1kzfbx-systemd-boot/bin/systemd-boot”, line 339, in install_bootloaderinstalled_out = run(
[f"{SYSTEMD}/bin/bootctl", f"–esp-path={EFI_SYS_MOUNT_POINT}", “status”],
stdout=subprocess.PIPE,).stdout
File “/nix/store/dqhq2k0sqrjrdkzip2a0j3cx7w1kzfbx-systemd-boot/bin/systemd-boot”, line 58, in runreturn subprocess.run(cmd, check=True, text=True, stdout=stdout)
File “/nix/store/jj6jldlw37r8yy9kc1smrax9dhnjm2x4-python3-3.13.9/lib/python3.13/subprocess.py”, line 577, in runraise CalledProcessError(retcode, process.args,output=stdout, stderr=stderr)subprocess.CalledProcessError: Command ‘[’/nix/store/2jfxgvg1fqabjp65aqdrk50ljfmkd6pl-systemd-258.2/bin/bootctl’, ‘–esp-path=/boot/efi’, ‘status’]’ died with <Signals.SIGABRT: 6>.
After rebooting I can configure systemd-boot just fine as long as i don’t hibernate.
This wasn’t a problem with 24.05 and 24.11, so something changed.
I tried to find/debug this on my own, but I’m quite stuck by now. Had this issue since Oktober I guess.
Thanks in Advance!