tpm2-software / tpm2-totp

Attest the trustworthiness of a device against a human using time-based one-time passwords
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
164 stars 37 forks source link

Code isn't displayed in plymouth on Fedora 40 #110

Open teackot opened 3 months ago

teackot commented 3 months ago

The code isn't shown in plymouth on boot on Fedora 40. I couldn't find any relevant info in the logs

How to reproduce

Build and install the project

./bootstrap
./configure
make -j$(nproc)
make -j$(nproc) check
sudo make install

Regenerate initramfs

sudo dracut --regenerate-all --force

Setup totp

sudo tpm2-totp -P - init
<password><Ctrl-D>

Verify that the code is correct

sudo tpm2-totp -t show

Reboot

teackot commented 3 months ago

After a closer inspection:

  1. I should've activated the tpm2-totp dracut module. Now I can see the codes, but only in the console if I press <Esc> in plymouth.
  2. This project uses the label.so file from plymouth-plugin-label. However, it seems to have been split into two files in plymouth 23.356.9: label-freetype.so and label-pango.so (see this commit). Symlinking label-pango.so to label.so solves the problem.

There is also a redundant slash in /lib/dracut/modules.d/70tpm2-totp/module-setup.sh:

inst_library /usr/lib64/plymouth//label.so
grazzolini commented 2 months ago

So, plymouth is using label-freetype.so on their initcpio hooks. So, I think that symlinking label-pango.so to label.so isn't the right approach.