TPM error 0x0902 every 10 seconds

[email protected] Sun, 13 Oct 2024 00:17:31 -0700
Newsgroups dev.linux.lists.tpm2
Message-ID <[email protected]>
Hi all,

    I'm new to having a TPM and trying to understand how to interact
with it and what I can do with it.  I last installed Debian with LUKS
full disk encryption 13 years ago, can you believe my laptop lasted so
long?  I cloned the disk to an SSD at some point, and now that SSD is
rotting away, hundreds of unreadable sectors had to be overwritten and
still fsck.ext4 got my system running at least a dozen times while I
transitioned to my "new" laptop, only 8 years old refurbished 4th Gen.
X1 Carbon.  What an upgrade!  Thanks to a helpful Reddit user and
several scripts, I got Debian installed again with LUKS FDE and Secure
Boot, and upgraded to testing/trixie release.

    Now trying to interact with the TPM, and some initial commands seem
to execute fine, like `tpm2_getcap properties-fixed`, `tpm2_getcap
algorithms`, and `tpm2_getrandom  --hex 16`.  But now I've noticed, in
the system journal, this error message printed every 10 seconds:

tpm tpm0: tpm2_load_context: failed with a TPM error 0x0902

I couldn't find much written about this out there, or am too new to all
this to understand or make any use of what I could find.  I even tried
asking ChatGPT and it had me try the following:

  * Stop/Disable tpm2-abrmd.service
  * Update grub config with: GRUB_CMDLINE_LINUX_DEFAULT="tpm_tis.force=0"
  * `tpm2_flushcontext --transient`, `tpm2_flushcontext --session`,
    `tpm2_flushcontext --loaded-session`, `tpm2_clear`, `tpm2_changeauth
    -c owner <pw>`, `tpm2_changeauth -c endorsement <pw>`,
    `tpm2_changeauth -c lockout <pw>`

    I think the `tpm_tis.force=0` option works, but as soon as I run a
tpm2 command, the module is loaded and then the 0x0902 error every 10
seconds starts up again.

    Hope you could help me figure out the problem.

Best Regards