Trying to understand errors from tpm2-tools
Solution 1:
I got the same errors when setting up TPM on ubuntu 20.04. My situation was that my previous OS was Windows 10 with TPM setup for bitlocker for all drives.
For me, the solution was to reset the TPM using
$ echo 5 > /sys/class/tpm/tpm0/ppi/request
$ reboot
Then, the TPM was reset and commands worked as expected.
EDIT: According to one of the comments in the link in the OP: https://run.tournament.org.il/ubuntu-20-04-and-tpm2-encrypted-system-disk/, the TPM is locked to a certain combination of bootloader and hardware by Windows 10 bitlocker (i.e. Windows 10 has ownership of the TPM). So, if one is using a new OS, the TPM needs be reset to be used.