Luks + nvidia driver causing problems

I installed Fedora 42 on an older PC that has a GTX 1070 Ti and a motherboard with semi-UEFI support. When I install the system without LUKS encryption, everything works fine. However, if I install Fedora with LUKS encryption, everything goes smoothly until I install the NVIDIA driver. After installing the driver, I get a black screen at the point where I’m supposed to enter the LUKS passphrase during boot.

As a temporary workaround, I removed Plymouth from the system, and that seems to solve the black screen issue.
However, booting the system without Plymouth is very slow. First, I enter the LUKS passphrase on a non-graphical screen. A few seconds later, the same screen reappears but with a smaller font. After another wait, the graphical login screen finally shows up.
Even after entering my login password, there’s a short black screen before the desktop appears. Once I’m logged in, everything works fine — but the slow boot process is quite frustrating.

Has anyone experienced a similar issue or found a better solution for systems with NVIDIA GPUs, LUKS encryption, and semi-UEFI firmware?

You will need to add nvidia to initramfs image so it’s available early.

They are blacklisted

leigh@leigh-pc:~$ cat  /usr/lib/dracut/dracut.conf.d/99-nvidia-dracut.conf 
# Omit the nvidia driver from the ramdisk, to avoid needing to regenerate
# the ramdisk on updates.
omit_drivers+=" nvidia nvidia-drm nvidia-modeset nvidia-uvm "

You will probably need to delete that file and run

sudo dracut -fvv --add-drivers " nvidia nvidia-drm nvidia-modeset nvidia-uvm "

This also runs the risk of module mismatch for every new nvidia release.