Reason for incorrect BIOS time in Librem 13v4

Hi everyone,

I have been using a Librem 13v4 with Librem Key for around 3 years. My current operating system is Qubes OS 4.0.

Now when booting, I received the following error message

gpg: key ... was created ... days in the future (time warp or clock problem)
gpg: Can't check signature: Bad public key
Failed default boot

I managed to fix the issue (incorrect BIOS system time of 1.1.1970) by forcing unsafe boot, setting the system time manually ( date -s '2014-12-25 12:34:56') and setting the BIOS time to the system time (hwclock --systohc). However, I would not like this to be the regular fix as it means that tampering cannot be detected.

To properly fix the issue, I was wondering if the problem is that the Bios battery is getting weak. I have used the laptop for around 3 years around 3 hours per week and almost always plugged in. Does anyone have similar experiences? Is there any documentation how to replace the BIOS battery for this laptop?

1 Like

Maybe - but sometimes devices that are intrinsically powered by battery (phones / laptops) do not have a BIOS battery. So your first question might be: does it even have a BIOS battery?

I believe in this case that the answer is β€œyes” - it does have a BIOS battery - and an exhausted BIOS battery is a likely explanation.

In particular … 3 hours per week is very light usage. So it spends almost all of its time powered off. So, depending on how it is engineered, that could mean that the hardware clock spends almost all of its time running off the BIOS battery. (As a corollary to that implied question, have you looked at the health of your main system battery?)

Your second question would be: What battery code is it? (so you know what to buy as a replacement)

All three questions (is there one? what battery code? how to replace?) would appear to be gaps in the documentation so you should ask at support@puri.sm and also request documentation improvements.

1 Like

Thanks for the reply! I contacted the Purism Support and will provide an update here as soon as I get more information.

In the meantime, I also found the following workaround to avoid using unsafe boot.

  1. Boot into the recovery shell (that happens automatically if the gpg verification fails as above).
  2. Run date -s '2022-07-23 12:00:00' (using the current time and date) and then hwclock --systohc.
  3. Reboot (e.g., run reboot in the recovery shell). Now the verification should pass.

I received a reply from the Purism support

Hello,

You can see the CMOS battery on these images here: https://wiki.puri.sm/hw/L13/v3

The model is: CR1620

You can simply detach it, remove it from the yellow plastic encasement and replace (just use the same model). Should not be hard, you can later return it to the encasement.

Let us know if you need further help.

Kind regards,

I already replaced the battery and have no issues with the incorrect bios time any more.

Unfortunately, I did not find a suitable replacement battery that comes with a plastic encasing and cable. So instead I peeled off the plastic encasing from the old battery and put the old cable on the new battery fixating it with insulation tape (the plastic encasing could not be reused any more). I found this YouTube video helpful for this, I did not use the heat shrink sleeving but only insulation tape though. This was a bit cumbersome, but the battery seems to be working fine now.