You are not logged in.
Hello!
After recent update the systemd TPM services fail to start on boot. These are the systemd-tpm2-setup{,-early} and the systemd-pcr{product,login} services. All four show the same error ERROR:esys:src/tss2-esys/api/Esys_Load.c:110:Esys_Load() Esys Finish ErrorCode (0x000001df) followed by either Failed to acquire anchor secret: Object is remote or Could not extend NvPCR: Object is remote.
I've seen a few threads related to similar errors but apparently none of the proposed solutions seem to work. These include setting the PCR policies, removing the nvpcr trust anchor or even clearing the TPM.
I am not using TPM for LUKS but it is causing libvirtd to fail which is my main issue. I know the same archwiki page recommends removing the encryption key but unsurprisingly this does not help, as it does not address the underlying issue.
Any ideas to debug are welcome ![]()
Output of systemd-analyze pcrs
NR NAME SHA256
0 platform-code 8d994f0bc5a2f4032ecc0558567961261cf97322741c4bc42f45363a6d15f3ed
1 platform-config f1922520f593fbaf688a5412dd10cb410268eec5298520306657aecbe83d62cf
2 external-code 2419e88f7b54a47565afb8e181a5123191fd7d60303b7ca989af5dc5e4665715
3 external-config 8d22c738fcd1730fb0789cb09c0f72a0012baa3ea867723b26772c9ca0ae6571
4 boot-loader-code 36ed2f313ecb073c7a1d803f7784a1a054099899a1a21b0a1c65c3ff487fb2c5
5 boot-loader-config 4116acbcf75b4743609ac940520ae48d5198eed35fbda70264ef4222900dfaf8
6 host-platform 8d22c738fcd1730fb0789cb09c0f72a0012baa3ea867723b26772c9ca0ae6571
7 secure-boot-policy f35abd9f314f558534a965429ce13ff8025591a719823c8ee49a23f90a221f9d
8 - 0000000000000000000000000000000000000000000000000000000000000000
9 kernel-initrd 50720e99cc183b441fcad206e0ffdb597eb073cc58b60d070bc4684f181ef2a3
10 ima 0000000000000000000000000000000000000000000000000000000000000000
11 kernel-boot f91a54efee77d4338ea5be5b99d1f8f1e39f7a386ee9c110f900df5eab7b8f02
12 kernel-config 2c48e14adb9bb9a77792f92162149ebf7807d6b0c71294df31c6fe6d67ef6332
13 sysexts 3345a4e7857aa5ae65e97702ade84a3755fd6144724779536b5773128676c99c
14 shim-policy 3345a4e7857aa5ae65e97702ade84a3755fd6144724779536b5773128676c99c
15 system-identity b75382d0117e089627160d6056bf982cafd577ecc3cc4100492149357a544452
16 debug 0000000000000000000000000000000000000000000000000000000000000000
17 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
18 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
19 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
20 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
22 - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
23 application-support 0000000000000000000000000000000000000000000000000000000000000000Output of systemd-analyze nvpcrs
NAME NVINDEX PRIORITY VALUE
verity 0x1d10202 300 -
hardware 0x1d10200 500 -
cryptsetup 0x1d10201 700 -
login 0x1d10203 800 -Output of systemd-analyze has-tpm2
yes
+firmware
+driver
+system
+subsystem
+libraries
+libtss2-esys.so.0
+libtss2-rc.so.0Content of /etc/kernel/uki.conf - keys generated with ukify genkey
[PCRSignature:all]
PCRPrivateKey=/etc/systemd/tpm2-pcr-private-key.pem
PCRPublicKey=/etc/systemd/tpm2-pcr-public-key.pem
[PCRSignature:initrd]
Phases=enter-initrd
PCRPrivateKey=/etc/systemd/tpm2-pcr-private-key-initrd.pem
PCRPublicKey=/etc/systemd/tpm2-pcr-public-key-initrd.pemPossibly related output of bootctl status
System:
Firmware: UEFI 2.70 (American Megatrends 5.17)
Firmware Arch: x64
Secure Boot: disabled (setup)
TPM2 Support: yes
Measured UKI: yes
Measured OS: yes
Boot into FW: supported
Platform Lang: en_US.UTF-8
Current Boot Loader:
Product: systemd-boot 261.3-1-arch
Features: ✓ Boot counting
✓ Menu timeout control
✓ One-shot menu timeout control
✓ Default entry control
✓ One-shot entry control
✓ Support for XBOOTLDR partition
✓ Support for passing random seed to OS
✓ Load drop-in drivers
✓ Support Type #1 sort-key field
✓ Support @saved pseudo-entry
✓ Support Type #1 devicetree field
✓ Enroll SecureBoot keys
✓ Retain SHIM protocols
✓ Menu can be disabled
✓ Multi-Profile UKIs are supported
✓ Loader reports network boot URL
✓ Support Type #1 uki field
✓ Support Type #1 uki-url field
✓ Loader reports active TPM2 PCR banks
✓ Loader reports firmware keyboard layout
✓ Loader measures SMBIOS information
Partition: /dev/disk/by-partuuid/ae68becb-a61e-456e-8358-fac8613e8bb3
Loader: └─/boot//EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI
Keyboard Layout: n/a (not reported by firmware)
Current Entry: archlinux-linux.efi
Current Stub:
Product: systemd-stub 261.3-1-arch
Features: ✓ Stub reports loader partition information
✓ Stub reports stub partition information
✓ Stub reports network boot URL
✓ Picks up credentials from boot partition
✓ Picks up system extension images from boot partition
✓ Picks up configuration extension images from boot partition
✓ Measures kernel+command line+sysexts
✓ Support for passing random seed to OS
✓ Pick up .cmdline from addons
✓ Pick up .cmdline from SMBIOS Type 11
✓ Pick up .dtb from addons
✓ Stub understands profile selector
✓ Stub measures SMBIOS information
Partition: /dev/disk/by-partuuid/ae68becb-a61e-456e-8358-fac8613e8bb3
Stub: └─/EFI/Linux/archlinux-linux.efi
Random Seed:
System Token: set
Exists: yesOffline
https://bbs.archlinux.org/viewtopic.php?id=314689 ?
Edit, or https://bbs.archlinux.org/viewtopic.php?id=314936 ?
Last edited by seth (2026-09-17 22:53:18)
Offline
I have already tried removing the trust anchor before posting this and it didn't really help. I'm also using mkinitcpio (not booster) for initramfs and if I checked correctly the PCR signature and systemd service are included already in the image. One recommendation I saw here was to re-enroll the TPM but there is nothing to enroll as I'm not using the TPM for LUKS.
I may also be an idiot but it is somewhat difficult for me to follow how the whole trust chain works wrt systemd and TPM as there is no documentation that explains how all the individual parts of the secure computing infrastructure depend on one another (ie systemd, TPM, initrd and PCR). It is possible that I'm missing something.
Last edited by Foucault (Yesterday 10:28:00)
Offline
Please post your complete system journal for the boot:
sudo journalctl -b | nc termbin.com 9999systemd is supposed to print some useful explanation about what went wrong: https://github.com/systemd/systemd/comm … bee33b856c
Offline
Here it is, although I don't think there is much more than the TPM errors in the first post. Lines ~1470ish and ~1740ish.
Offline
TPM key integrity check failed. Key most likely does not belong to this TPM.
To be sure: https://wiki.archlinux.org/title/Truste … _TPM_reset
You've removed both files, restarted the services and regenerated the initramfs?
Offline
I have indeed removed the nvpcr file /var/lib/systemd/nvpcr/nvpcr-anchor.cred but all tpm2 systemd services still fail to start. Should it be recreated at some point? At the moment there's nothing under /var/lib/systemd/nvpcr.
I also checked that the TPM is not under lockout
Output of tpm2_getcap properties-variable
TPM2_PT_PERMANENT:
ownerAuthSet: 0
endorsementAuthSet: 0
lockoutAuthSet: 0
reserved1: 0
disableClear: 0
inLockout: 0
tpmGeneratedEPS: 1
reserved2: 0
TPM2_PT_STARTUP_CLEAR:
phEnable: 1
shEnable: 1
ehEnable: 1
phEnableNV: 1
reserved1: 0
orderly: 1
TPM2_PT_HR_NV_INDEX: 0x0
TPM2_PT_HR_LOADED: 0x0
TPM2_PT_HR_LOADED_AVAIL: 0x3
TPM2_PT_HR_ACTIVE: 0x0
TPM2_PT_HR_ACTIVE_AVAIL: 0x40
TPM2_PT_HR_TRANSIENT_AVAIL: 0x6
TPM2_PT_HR_PERSISTENT: 0x1
TPM2_PT_HR_PERSISTENT_AVAIL: 0x6
TPM2_PT_NV_COUNTERS: 0x0
TPM2_PT_NV_COUNTERS_AVAIL: 0x19
TPM2_PT_ALGORITHM_SET: 0x0
TPM2_PT_LOADED_CURVES: 0x3
TPM2_PT_LOCKOUT_COUNTER: 0x0
TPM2_PT_MAX_AUTH_FAIL: 0x3
TPM2_PT_LOCKOUT_INTERVAL: 0x3E8
TPM2_PT_LOCKOUT_RECOVERY: 0x3E8
TPM2_PT_NV_WRITE_RECOVERY: 0x0
TPM2_PT_AUDIT_COUNTER_0: 0x0
TPM2_PT_AUDIT_COUNTER_1: 0x0Last edited by Foucault (Yesterday 18:11:11)
Offline
Should it be recreated at some point?
Yes, however https://bbs.archlinux.org/viewtopic.php … 1#p2293101
Offline
As for https://gitlab.archlinux.org/archlinux/ … _items/310 I'd still give that a try as well…
Offline
EDIT: Ignore this. nvPCRs are not extended because of the failure to decrypt nvpcr-anchor.cred with TPM. The system has already exited initramfs at this point in the log.
Not sure if it's relevant, "systemd-analyze nvpcrs" shouldn't be empty. From log:
systemd[1]: TPM PCR NvPCR Initialization Separator skipped, unmet condition check ConditionPathExists=/etc/initrd-releaseOn my system:
❯ sudo lsinitcpio /boot/EFI/Linux/arch-linux.efi | grep etc/initrd-release
etc/initrd-releaseAdditionally, the presence of that file means that the system is in the initrd/exitrd phase.
Last edited by Beemo (Today 11:45:16)
Offline
As for https://gitlab.archlinux.org/archlinux/ … _items/310 I'd still give that a try as well…
I saw this before, but what does it even mean "re-enrolling" the TPM outside the context of LUKS? From my understanding this assumes the TPM gets unlocked at boot before enrolling can happen anyway.
Yes, however https://bbs.archlinux.org/viewtopic.php … 1#p2293101
Some progress! Recreating the credentials with systemd-creds on top of the previously removed libvirtd secrets file allowed libvirtd to start. But unfortunately still the systemd-tpm2-* and systemd-pcr* services fail to start with the same cryptic error (of course I rerun mkinitcpio). In case it's important there is still nothing (re)created under /var/lib/systemd/nvpcr.
Honestly this TPM situation is quite baffling, and probably one the few times I've hit such an "undebugable" wall. I'm willing to ascribe this to "my firmware is somehow borked" but it's quite difficult to know if that's actually the reason. ![]()
Last edited by Foucault (Today 13:20:28)
Offline
Yea it seems it's 2 issues.
How nvpcr-anchor.cred works (and it's going to change & be automatically migrated next ver): https://github.com/systemd/systemd/comm … b97b080848
The credential is protected by the TPM with a PCR policy.
The credential is currently only protected by PCR11.
Turns out I have the issue too, but somehow nvPCRs are still extended.
EDIT: nvm a different error, means "already initialized".
TBH how is this sealed with PCR11 when it changes on every update...
p.s. I love how complex and poorly documented systemd is /s
Last edited by Beemo (Today 15:39:34)
Offline
I suspect https://man.archlinux.org/man/systemd-tpm2-setup.8 kinda expects key to be enrolled for decrypting the root device?
@Beemo, do you use LUKS?
@Foucault, what if you just disable those services?
Offline
@seth Yes I use LUKS
I noticed the log is missing something like below. The log is perhaps from after the anchor was already deleted?
systemd[1]: Received untrusted credentials: nvpcr-anchor.(random string here)(However, how is systemd / TPM complaining about the key if there is nothing to decrypt...)
systemd-tpm2-setup[778]: WARNING:esys:src/tss2-esys/api/Esys_Load.c:314:Esys_Load_Finish() Received TPM Error
systemd-tpm2-setup[778]: ERROR:esys:src/tss2-esys/api/Esys_Load.c:110:Esys_Load() Esys Finish ErrorCode (0x000001df)
systemd-tpm2-setup[778]: TPM key integrity check failed. Key most likely does not belong to this TPM.
systemd-tpm2-setup[778]: Failed to acquire anchor secret: Object is remoteWhat does this say?
$ sudo systemd-creds list --systemLast edited by Beemo (Today 17:29:19)
Offline