How to have NVIDIA GPU work on both monitors during boot process after every kernel update

Hello there!

I used to place a file inside /etc/dracut.conf.d to have my laptop to show on both monitors the boot process and mainly the LUKS password prompt, without it it just shows on the integrated monitor. And I also had to run Dracut manually with --force every NVIDIA driver or kernel upgrade. I used more Negativo17 drivers, but I’m on RPMFusion for two month+.

I used this

❯ bat nvidia-dracut-modules.conf
    add_drivers+=" nvidia nvidia_modeset nvidia_drm "
   install_items+=" /etc/modprobe.d/nvidia-modeset.conf "

But after a while this one for early loading is what I end up using

❯ cat nvidia-dracut-force.conf
# https://wiki.archlinux.org/title/Dracut#Early_kernel_module_loading
force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "

What I want to know is if one of this method, or if there is another one, to do such thing without my intervention every update/upgrade.

I’m not using the proprietary drivers anymore so I can’t test this, but you can automate this (dracut rebuild) with a dnf trigger, so probably to trigger on either kernel update and/or nvidia update?
See e.g. Reddit - Dive into anything
Reddit - Dive into anything

The trigger definitely exists since it runs dracut on every update/upgrade.
What I failed to ask is: can I trust that it won’t ignore those files anymore without making me edit configuration files beyond those and/or run dracut manually for that?

Not sure, I hope someone with more experience with dracut can answer that. If you want to be 100% sure, adding a trigger with a post-upgrade command would be a conservative approach.