How to solve "ima: error communicating to tpm chip" messages during boot

Solution 1:

It is simple: just enable TPM from the BIOS setup.

To change the BIOS settings you can hit F2 during boot before Ubuntu starts. Please be sure not to change anything else if your computer is working properly.

Solution 2:

If you couldn't find TPM, it appears as Intel Platform Trust Technology in the Security section of the BIOS. I had to disable that setting in order to get rid of that error.