Repository navigation
Stop broken TPM PCR units from forcibly rebooting - #12106
chessing234 wants to merge 4 commits into
Conversation
Upstream systemd-pcrphase and systemd-pcrfs units use FailureAction=reboot-force. On machines where the TPM is present but unresponsive, that turns a failed measurement into a login reboot loop. Ship FailureAction=none drop-ins and reload systemd on update. Fixes omacom#8190
etc/** ships in omarchy-settings straight to /etc, so the drop-ins are already in place when migrations run and $OMARCHY_PATH/etc never exists: the copy loop could not fire, and if it had it would have left unowned files at paths the package owns. What the package cannot do is reload the manager, since pacman's daemon-reload hook watches only usr/lib/systemd/system. The test now exercises that reload and its reboot-required fallback instead of the dead branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
omarchy-settings, which ships these drop-ins, also ships /usr/lib/systemd/system/plocate-updatedb.service.d/10-omarchy.conf, so every upgrade of it fires pacman's daemon-reload hook in the same transaction. The migration only added a sudo prompt for every user. The test now requires FailureAction=none to sit under [Unit], since systemd ignores it in any other section and the old greps passed that case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed and run on an Omarchy worker VM, with a second opinion from Codex Medium. The fix is right and I pushed two commits to tighten it. It now waits on a test from someone with the affected hardware. What was checked
Pushed to this branch
Codex Medium found the redundant reload and the test gap. Its second round on the final head found nothing open. It can read this session's working notes, so its agreement is not guaranteed to be independent. What it waits on A worker has no broken TPM, so this proves the mechanism, not the fix on a T470. @KalenJosifovski, could you test it on the machine from #8190? With the Security Chip still disabled: git clone https://github.com/Chessing234/omarchy.git && cd omarchy
git checkout d4f0f26ab408242cc3ef8f3abd2e77045efa913c
for d in etc/systemd/system/systemd-pcr*.service.d; do sudo install -Dm644 "$d/10-omarchy-no-force-reboot.conf" "/$d/10-omarchy-no-force-reboot.conf"; done
sudo systemctl daemon-reloadThen turn the Security Chip back on in the BIOS, boot and log in. If it stays up, please post the output of This would not fix everything in #5087. Those reports also include a TPM that hangs on NvPCR operations instead of failing, which a |
[Medium impact] The PR appears safe to merge; removing the test does not break the shell test runner. SummaryAdds five systemd drop-ins that set
Reviews (2) · Last reviewed commit: "Drop the PCR drop-in readback test" · Reviewed by Greptile |
|
Hi @chessing234 thanks for this! I reproduced on the 4.5.0rc1 install (systemd 262) in QEMU with a swtpm TPM on tpm-tis, before and after this head (d4f0f26):
Of the units that carry FailureAction=reboot-force on 262, the ones that run on our busybox initramfs are pcrphase-sysinit, pcrphase and pcrmachine, and this covers all three. The rest are initrd-only or tied to factory-reset.target. Not covered by this: a TPM that hangs rather than fails, as on the ST33 ThinkPads in #5087. A vTPM can’t model that, so it still needs a test on that hardware. Two small things: FYI - the description still says systemd is reloaded on update; d4f0f26 dropped that. pacman’s daemon-reload hook only watches usr/lib/systemd/system/*, so these /etc drop-ins take effect from the next boot. That’s fine for the boot loop, but the first power-off after updating can still reboot once. |
It only reads back the five files this change adds, which the base branch's AGENTS.md rules out for a small declarative change: the only breakage it catches is someone editing those lines. Booting with a failing PCR unit is the check that matters, and it was run on a VM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re-checked after @emirb's notes, on an Omarchy worker VM running systemd 262.1, with a second opinion from Codex Medium and muse-wonder (pi, thinking high). The fix holds on 262.1. I pushed one commit that drops the test, as suggested. One thing is left for the author: the description. What was checked
Pushed to this branch
Second opinion Codex Medium found nothing open and agreed the test should go. muse-wonder asked to restore the test, citing As emirb said, this does not reach a TPM that hangs instead of failing, as in some of the #5087 reports. What it waits on @chessing234, the description is out of date. It says systemd is reloaded on update and points to the test, and neither is in the diff now. Please update it to describe the five drop-ins as they stand. After that the maintainer decides. The drop-ins drop the forced reboot on every machine, not only those with a broken TPM. That changes nothing today because nothing seals to these PCRs, but it is a measured-boot setting. |
|
updated the description. it's the five failureaction=none drop-ins. no reload step and no test file. |
|
Thanks @chessing234. The description now matches the diff: five What was checked this time
One note on issues #8190 was closed as a duplicate of #5087, so What it waits on The maintainer. The change is verified. What remains is whether to drop the forced reboot on every machine, not just ones with a broken TPM. Nothing in Omarchy seals to these PCRs today, but it is a measured-boot setting. |
Summary
systemd-pcrphase.service,systemd-pcrphase-sysinit.service,systemd-pcrmachine.service,systemd-pcrfs-root.service, andsystemd-pcrfs@.servicesetFailureAction=reboot-force. On ThinkPads and similar hardware where the TPM is present but unresponsive, a failed PCR extend becomes a login → reboot loop (ThinkPad T470 boot loop when TPM is visible but unresponsive #8190).FailureAction=nonedrop-ins for those five units. They apply on every machine, not only one with a broken TPM. Nothing in the diff reloads systemd.Fixes #8190
Test plan