Everytime I update packages, I always get an error dracut-install: Failed to find module 'nvidia'

Everytime I do an update to packages, I always get this error

 Scriptlet output:                                                                                                                     
 >> dracut-install: Failed to find module 'nvidia'                                                                                        
 >> dracut[E]: FAILED:  /usr/lib/dracut/dracut-install -D /var/tmp/dracut.d0CeymW/initramfs --kerneldir /usr/lib/modules/6.18.8-200.fc43.x...

Anyone can help me about this?

Edit1:
change “upgrade” to "update packages

Welcome to ask :fedora:

We need a bit more info.

Please post the output of inxi -Fzxx and dnf list --installed \*nvidia\* so we have some way to see what is already configured for both hardware and software.

Additionally we need to know how the upgrade is done and how much time is given between finishing the upgrade and a restart.

Also, this shows that you have added nvidia to the kernel modules that dracut should
install in the initramfs’s.

AFAIK, this is not necessary.

You will always have this message because dracut finishes before akmods is called (and
asynchronously) in /usr/lib/kernel/install.d, during a kernel install.

ls -1 /usr/lib/kernel/install.d
[...]
50-dracut.install
[...]
95-akmodsposttrans.install
[...]
1 Like

This is the output for inxi -Fzxx

╰λ inxi -Fzxx
System:
  Kernel: 6.18.8-200.fc43.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 15.2.1
  Desktop: KDE Plasma v: 6.5.5 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: Fedora Linux 43 (KDE Plasma Desktop Edition)
Machine:
  Type: Laptop System: LENOVO product: 20TA009WPH v: ThinkPad E14 Gen 2
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20TA009WPH v: SDK0J40697 WIN
    serial: <superuser required> part-nu: LENOVO_MT_20TA_BU_Think_FM_ThinkPad
    E14 Gen 2 Firmware: UEFI vendor: LENOVO v: R1EET56W(1.56 )
    date: 06/29/2023
Battery:
  ID-1: BAT0 charge: 36.9 Wh (97.9%) condition: 37.7/45 Wh (83.8%)
    volts: 12.25 min: 11.1 model: Sunwoda 5B10X025 serial: <filter> charging:
    status: not charging control: start: 95% end: 100% cycles: 896
CPU:
  Info: quad core model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
    arch: Tiger Lake rev: 1 cache: L1: 320 KiB L2: 5 MiB L3: 12 MiB
  Speed (MHz): avg: 400 min/max: 400/4700 cores: 1: 400 2: 400 3: 400 4: 400
    5: 400 6: 400 7: 400 8: 400 bogomips: 44851
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Lenovo
    driver: i915 v: kernel arch: Xe ports: active: HDMI-A-1,eDP-1
    empty: DP-1, DP-2, DP-3, DP-4 bus-ID: 00:02.0 chip-ID: 8086:9a49
  Device-2: NVIDIA TU117M [GeForce MX450] vendor: Lenovo driver: nvidia
    v: 580.119.02 arch: Turing pcie: speed: 2.5 GT/s lanes: 4 bus-ID: 05:00.0
    chip-ID: 10de:1f97
  Device-3: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-8:3 chip-ID: 04f2:b725
  Display: wayland server: Xwayland v: 24.1.9 compositor: kwin_wayland
    driver: gpu: i915 d-rect: 3840x2160 display-ID: 0
  Monitor-1: HDMI-A-1 pos: primary,top-left model: Dell SE2222H
    res: 1920x1080 hz: 60 dpi: 102 diag: 545mm (21.5")
  Monitor-2: eDP-1 pos: bottom-r model: AU Optronics 0x403d res: 1920x1080
    hz: 60 dpi: 158 diag: 355mm (14")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 2 drv: iris
    device: 3 drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia wayland:
    drv: iris x11: drv: iris inactive: device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 25.3.4 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel Iris Xe Graphics (TGL GT2)
    device-ID: 8086:9a49 display-ID: :0.0
  API: Vulkan v: 1.4.328 surfaces: N/A device: 0 type: integrated-gpu
    driver: mesa intel device-ID: 8086:9a49 device: 1 type: discrete-gpu
    driver: nvidia device-ID: 10de:1f97 device: 2 type: cpu
    driver: mesa llvmpipe device-ID: 10005:0000
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor gpu: nvidia-settings,nvidia-smi
    wl: wayland-info x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3 chip-ID: 8086:a0c8
  API: ALSA v: k6.18.8-200.fc43.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.4.10 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 00:14.3
    chip-ID: 8086:a0f0
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 4000 bus-ID: 04:00.0 chip-ID: 10ec:8168
  IF: enp4s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-10:6 chip-ID: 8087:0026
  Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
Drives:
  Local Storage: total: 476.94 GiB used: 28.79 GiB (6.0%)
  ID-1: /dev/nvme0n1 vendor: Lenovo model: UMIS RPJTJ512MEE1OWX
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 36.9 C
Partition:
  ID-1: / size: 474.34 GiB used: 27.91 GiB (5.9%) fs: btrfs dev: /dev/dm-0
    mapped: luks-1fc37704-122b-46b1-ae49-bc71d059daed
  ID-2: /boot size: 1.9 GiB used: 887.1 MiB (45.6%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 19.3 MiB (3.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 474.34 GiB used: 27.91 GiB (5.9%) fs: btrfs
    dev: /dev/dm-0 mapped: luks-1fc37704-122b-46b1-ae49-bc71d059daed
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 60.0 C mobo: N/A
  Fan Speeds (rpm): fan-1: 3200 fan-2: 3200
Info:
  Memory: total: 32 GiB note: est. available: 31.04 GiB used: 4.13 GiB (13.3%)
  Processes: 324 Power: uptime: 2m wakeups: 0 Init: systemd v: 258
    default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm Compilers: gcc: 15.2.1
    Shell: Bash v: 5.3.0 running-in: konsole inxi: 3.3.40

and this one is for dnf list --installed \*nvidia*\

╭─ sample at fedora in ~
╰λ dnf list --installed \*nvidia\*
Installed packages
akmod-nvidia.x86_64                       3:580.119.02-1.fc43 rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.18.5-200.fc43.x86_64.x86_64 3:580.119.02-1.fc43 @commandline
kmod-nvidia-6.18.7-200.fc43.x86_64.x86_64 3:580.119.02-1.fc43 @commandline
kmod-nvidia-6.18.8-200.fc43.x86_64.x86_64 3:580.119.02-1.fc43 @commandline
nvidia-gpu-firmware.noarch                20260110-1.fc43     updates
nvidia-modprobe.x86_64                    3:580.119.02-1.fc43 rpmfusion-nonfree-updates
nvidia-persistenced.x86_64                3:580.119.02-1.fc43 rpmfusion-nonfree-updates
nvidia-settings.x86_64                    3:580.119.02-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                3:580.119.02-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64           3:580.119.02-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:580.119.02-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:580.119.02-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64           3:580.119.02-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64          3:580.119.02-1.fc43 rpmfusion-nonfree-updates

Sorry, I forgot to include a bit more word, this shows every time I update the packages or maybe any update that requires a dracut regenrate img file?

So I just update with sudo dnf upgrade --refresh.

Also, an additional information when I was installing nvidia, I use this guide https://github.com/Comprehensive-Wall28/Nvidia-Fedora-Guide

Oohh, I see, so I need to remove the .conf where I added the nvidia in dract.conf.d

This issue in that Github repo suggests you aren’t the only user having issues with those instructions.

All that looks good, but the firmware (bios) is 2 1/2 years old. Lenovo may have an updated firmware and if so then it may be wise to upgrade the bios firmware.

Otherwise the comment by @francismontagnac above seems likely.
The nvidia modules are not necessary to be included in the initramfs file and when a kernel is upgraded the system must build a new module version for that new kernel so his comment is very fitting. The module in the initramfs file must match the kernel version and it would not be available until after dracut completes.

I suspect that you may have modified one of the files in /etc/dracut.conf.d/ so dracut is trying to include the nvidia modules but cannot.

Possible because the nvidia modules are built after dracut is run.

Yes, I added a conf file inside /etc/dracut.conf.d/, now I already remove it.

If would be nice if you could confirm (or not) that you can properly reboot, ie: that you
do not get a black screen when you are normally asked for the luks passphrase (or simply
that you are able to give the luks passphrase during the graphical boot (plymouth)), and
that you still have rhgb in the kernel parematers.

Can you thus:

  • paste here the output of cat /proc/cmdline
  • regenerate the initramfs if not already done with: dracut -f
  • paste here the output of:
    • lsinitrd /boot/initramfs-$(uname -r).img | grep -E -i 'nouveau.ko|nvidia.ko'
  • reboot (this kernel is: 6.18.8-200.fc43.x86_64)

Thanks.

If the reboot fails, reboot again, but edit the linux line of grub: suppress rhgb

I retrieve this accepted change for F42: Changes/PlymouthUseSimpledrm - Fedora Project Wiki
But:

grep UseSimpledrm /usr/share/plymouth/plymouthd.defaults
UseSimpledrmNoLuks=1

UseSimpledrmNoLuks instead of UseSimpledrm

The changelog of plymouth (plymouth-24.004.60-22.fc43.x86_64) shows:

* Thu Jul 03 2025 Hans de Goede <hansg@kernel.org> - 24.004.60-19
- Don't use simpledrm together with LUKS (rhbz#2359283, rhbz#2339072)

2339072 – Plymouth shows black screen before FDE password prompt when setting plymouth.use-simpledrm on Nvidia Optimus system (FDE == Full Disk Encryption)

What has changed is that before the modeset would happen (and the screen would go black) before the disk-unlock screen shows and now the disk-unlock screen shows earlier (as intended) and then the modeset happens while it is showing causing the screen to go black.

In addition, I guess that this bug is not related to having a dual GPU system, but only to the “primary” GPU.

This bug was seen also on a intel/AMD dual GPU.

The system used in this topic is an intel/nvidia dual GPU, the “primary” (connected to the displays) being intel:

inxi:

  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Lenovo
    driver: i915 v: kernel arch: Xe ports: active: HDMI-A-1,eDP-1
    empty: DP-1, DP-2, DP-3, DP-4 bus-ID: 00:02.0 chip-ID: 8086:9a49
  Device-2: NVIDIA TU117M [GeForce MX450] vendor: Lenovo driver: nvidia
    v: 580.119.02 arch: Turing pcie: speed: 2.5 GT/s lanes: 4 bus-ID: 05:00.0
    chip-ID: 10de:1f97

I think thus that if the plymouth version is at least 24.004.60-19 you will not have a black screen before the FDE password.

For other systems having an nvidia “primary” GPU, plymouth.use-simpledrm should be set, or add the nvidia modules to the initramfs.

In any case, suppressing rhgb wins :slight_smile:

Related topic: Making dracut run after akmods? - #16 by ksvist

Thanks for assessing the situation, seems like you got it spot on. I just installed the nvidia drivers using the Comprehensive-Wall28 Guide without modifying the dracut config or the boot params. I am on plymouth 24.004.60-24 with an Nvidia A1000 and Intel Iris GPU and did not get a black screen

I am still able to reboot without any issues.

output for cat /proc/cmdline

BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.18.8-200.fc43.x86_64 root=UUID=3e9c0ee3-5960-4e88-b376-9e5cd7fe5bc8 ro rootflags=subvol=root rd.luks.uuid=luks-1fc37704-122b-46b1-ae49-bc71d059daed rhgb quiet rd.driver.blacklist=nouveau,nova_core modprobe.blacklist=nouveau,nova_core

output for lsinitrd /boot/initramfs-$(uname -r).img | grep -E -i 'nouveau.ko|nvidia.ko'

-rw-r--r--   1 root     root      1154080 Oct 14 08:00 usr/lib/modules/6.18.8-200.fc43.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko.xz
-rw-r--r--   1 root     root         9636 Oct 14 08:00 usr/lib/modules/6.18.8-200.fc43.x86_64/kernel/drivers/usb/typec/altmodes/typec_nvidia.ko.xz

Thanks, but can you confirm that you are using luks (FDE) and with rhgb in /proc/cmdline ?

It would be nice also to check, when using luks and rhgb and if the “primary”
GPU driver is i915, that blacklisting i915 for dracut and forcing plymouth to use
simpledrm works.

Edit: This works, but at the price of loosing graphical performance. See next post. Don’t try that.

inxi -Gzxx should show something like:

Graphics:
  Device-1: Intel ... driver: i915 # Possibly on the next line

Then:

  • edit /etc/default/grub, add to the GRUB_CMDLINE_LINUX variable:
    • rd.driver.blacklist=i915 plymouth.use-simpledrm
  • execute: grub2-mkconfig -o /boot/grub2/grub.cfg
  • reboot

Check also if you see briefly the unlock screen when you logout.

Ref: Add UseSimpledrmNoLuks config file keyword:

  1. The i915 driver uses the firmware framebuffer as fallback when userspace has not installed a fb to scan out from. This happens e.g. on logout between the user-session and the display-manager. Drawing the unlock screen on the simpledrm fb results in it briefly showing when logging out, which looks quite ugly.

Yes, I use LUKS FDE. I did not edit the boot options after installing fedora workstation, but checked just now: GRUB shows that rhgb is set. I did unset it temporarily and got the FDE prompt in textmode as part of the boot messages. Not sure if this is visible when the bootup messages are hidden, i.e., one does not invoke the GRUB UI on boot.

After reverting it to use rhgb, I checked that device-1 uses the i915 driver and then tried your changes. Even with i915 blacklisted and plymouth set to simple, I get the graphical FDE password prompt and everything works normally. Only the graphical performance was massively reduced until I reverted the GRUB entry and rebooted again.

I logged out with and without your changes and both times got directly to the login screen. I hope these findings support your hypothesis

Thanks to have done this test.

This is thus a no-go.
I was hoping the i915 module to be loaded when switching to the effective root: apparently not.