Skip to content

Remove the NvPCR drop-ins now that systemd 262.1 is everywhere - #16274

Open
emirb wants to merge 1 commit into
quattrofrom
remove-nvpcr-workaround
Open

emirb wants to merge 1 commit into
quattrofrom
remove-nvpcr-workaround

Conversation

@emirb

@emirb emirb commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

systemd 262 failed systemd-tpm2-setup-early, systemd-pcrproduct and systemd-pcrlogin@ on every boot from a UKI without a signed PCR policy (systemd/systemd#43848). That is every Omarchy UKI. #14820 added drop-ins that accept their exit status 1 until systemd shipped the fix. systemd 262.1 has it (systemd/systemd#43948), and stable, rc and edge serve 262.1-1 on x86_64 and aarch64. The drop-ins now only hide real failures: a TPM that stops answering also exits 1, and the unit reports success.

On an MSI Z690 with Intel PTT, booted with the three drop-ins moved aside:

  • systemd-tpm2-setup-early skipped the four NvPCRs and exited 78, which its own unit accepts;
  • systemd-pcrproduct and systemd-pcrlogin@1000 exited 0 with "not initialized, skipping gracefully";
  • no units failed.

omarchy-settings stops installing the files in omacom/omarchy-pkgs#1472; either PR can merge first.

Refs #15813, #14820

systemd 262 failed systemd-tpm2-setup-early, systemd-pcrproduct and
systemd-pcrlogin@ on every boot from a UKI without a signed PCR policy,
which is every Omarchy UKI (systemd/systemd#43848, #15813).
#14820 accepted their exit status 1 until systemd shipped the fix.

systemd 262.1 ships it (systemd/systemd#43948), and every channel now
serves 262.1-1, on both x86_64 and aarch64. The drop-ins now only hide
real failures: with SuccessExitStatus=1 a TPM that stops answering
looks like a successful unit.

On an MSI Z690 with Intel PTT, systemd 262.1-1 and a Limine UKI, booted
with the three drop-ins moved aside: systemd-tpm2-setup-early skipped
the four NvPCRs and exited 78, which its own SuccessExitStatus accepts.
systemd-pcrproduct and systemd-pcrlogin@1000 logged "not initialized,
skipping gracefully" and exited 0. No unit failed.
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Removes three temporary systemd drop-ins that treated exit status 1 as success.

  • The PCR services follow their own exit-status rules.

Reviews (1) · Last reviewed commit: "Remove the NvPCR drop-ins now that syste..." · Reviewed by Greptile

@omarchybot omarchybot added the bug Something isn't working label Oct 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 72a4b5c. Nothing wrong in the diff. It waits on a TPM machine confirming it, because the worker it ran on has no TPM.

What was checked:

  • Nothing else in the repository references or installs these three drop-ins, so deleting them leaves nothing behind. They reach /usr/lib/systemd/system only through omarchy-settings, so pacman removes them when the package is rebuilt and no migration is needed. The packaging loop in omarchy-settings: stop installing the NvPCR drop-ins omarchy-pkgs#1472 checks that each file exists, so either pull request can merge first.
  • All six Omarchy mirrors, stable, rc and edge on x86_64 and aarch64, serve systemd-262.1-1.
  • In systemd v262.1's source, systemd-tpm2-setup returns EX_CONFIG (78) when the UKI carries no signed PCR policy, and its unit accepts that exit status. systemd-pcrextend --graceful, which runs both systemd-pcrproduct and systemd-pcrlogin@, skips an NvPCR that was never initialized. That matches the exit 78 and the "not initialized, skipping gracefully" lines in the description.
  • On a QEMU worker from the Omarchy ISO (systemd 262.1-1, no TPM), ./test/cli passed on this head. With the three drop-ins moved aside and the machine rebooted, all three units were skipped by their ConditionSecurity=measured-os condition, SuccessExitStatus=1 was gone, and no units failed. Machines without a TPM are unaffected.

Second opinion: Codex Medium and muse-spark-1.3-contributor (via pi, thinking high) read the same change. Neither found a defect in this repository. They may have read this review's notes, so their agreement is not independent. Codex traced the v262.1 exit paths above, and they hold against the source. It also pointed out that a machine whose pre-refresh-pacman hook adds systemd to IgnorePkg and holds it at 262 would get the failed units back with no warning. A systemd>=262.1 dependency in the settings packages would make that explicit. That belongs in omacom/omarchy-pkgs#1472, and adding it is the maintainer's call.

What is not proven yet is a boot with a TPM. @GIDEMA-VPL, you reported this in #15813. If you can, please run the check below on that machine. With systemd 262.1-1 installed, this head is equivalent to removing the three files:

pacman -Q systemd    # 262.1-1 or later
sudo mkdir -p /root/nvpcr-aside
for u in systemd-tpm2-setup-early.service systemd-pcrproduct.service systemd-pcrlogin@.service; do sudo mv "/usr/lib/systemd/system/$u.d/10-omarchy-nvpcr.conf" "/root/nvpcr-aside/$u.conf"; done
sudo systemctl daemon-reload && systemctl reboot

After the reboot:

systemctl --failed
systemctl show -p Result,ExecMainStatus systemd-tpm2-setup-early.service systemd-pcrproduct.service "systemd-pcrlogin@$(id -u).service"

Then put the files back with for u in systemd-tpm2-setup-early.service systemd-pcrproduct.service systemd-pcrlogin@.service; do sudo mv "/root/nvpcr-aside/$u.conf" "/usr/lib/systemd/system/$u.d/10-omarchy-nvpcr.conf"; done, or let the next omarchy-settings update handle them. A reply with that output decides it. Until then this waits on the reporter, and after that on the maintainer.

@emirb

emirb commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Confirmed on a TPM machine: MSI Z690 with Intel PTT, systemd 262.1-1, booted with and without the three drop-ins. systemd-tpm2-setup-early exits 78 (accepted by its own unit), systemd-pcrproduct and systemd-pcrlogin@1000 exit 0 ("not initialized, skipping gracefully"), and systemctl --failed is empty both times.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks, @emirb. Your MSI Z690 boot matches what the worker showed and what systemd v262.1's source says: systemd-tpm2-setup-early exits 78 and its unit accepts that, the two pcrextend units skip gracefully, and nothing fails.

That still leaves verified off. Omabot only gives it to a hardware fix when someone other than the pull request's author confirms it, either the person who reported the bug or a maintainer, and that person has to be confirming an open issue this pull request fixes. #15813 is already closed, so no reporter confirmation can be recorded there. Waiting on @GIDEMA-VPL would get nowhere, so this now waits on the maintainer instead. The head is still 72a4b5c, and the checks in the review above still apply: ./test/cli passed on a QEMU worker with no TPM, the three units were skipped there with no failures, and the second opinion (Codex Medium and muse-spark-1.3-contributor via pi, thinking high) found no defect at this head. The open question is whether your TPM boot is enough evidence for a machine with a TPM. That call belongs to the maintainer, along with the optional systemd>=262.1 dependency in omacom/omarchy-pkgs#1472. Nothing new was run for this reply.

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these drop-ins are what keep systemd-pcr* from failing the boot when the uki has no pcr policy. deleting them with no check that systemd is actually >= 262.1 puts every machine still on 262.0 back on the failing units. gate the removal on the running systemd version.

@omarchybot

Copy link
Copy Markdown
Collaborator

@chessing234, the risk you describe is real, but only for a narrower set of machines, and the fix you suggest can't live in this pull request.

What was checked, against quattro at the unchanged head 72a4b5c:

  • A machine on systemd 262.0 that updates normally gets 262.1 in the same transaction that removes the drop-ins. omarchy-update-system-pkgs runs a full -Syu (lines 13 and 26), omarchy-refresh-pacman runs -Syyuu (line 99), and Omarchy's pacman configs pin nothing. When the first review here checked the Omarchy mirrors, all six served systemd-262.1-1.
  • Two kinds of machine can end up with the new omarchy-settings and the old systemd. One is a machine whose owner holds systemd back with IgnorePkg or a custom repository through the pre-refresh-pacman hook. The other is a developer installing a settings build with omarchy-dev-pkg-test, which runs pacman -U on the package alone (line 136). After the next boot, those machines would show the three units as failed again.
  • A packaged drop-in is a static file, so it can't check which systemd is installed or running. What would cover those machines is a systemd>=262.1 dependency on the settings packages. That belongs in omarchy-settings: stop installing the NvPCR drop-ins omarchy-pkgs#1472, as the first review here said, and whether to add it is the maintainer's call. Nothing in this pull request needs to change for it.

Who checked: Claude Opus 5.5 read the update scripts. Codex Medium reviewed your comment separately and reached the same conclusion, and it found the omarchy-dev-pkg-test path on its own. It may have read this session's notes, so its agreement is not guaranteed to be independent. Nothing was run on a worker for this reply, because the head has not moved.

This still waits on the maintainer: whether the author's TPM boot is enough, and whether #1472 should add the dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants