Help disabling Nouveau for Nvidia drivers to start

Hello,
I installed Fedora Workstation 41 over the weekend and need some help disabling Nouveau for the Nvidia drivers to kick in. My understanding is that I’ve got everything installed correctly but the Nouveau drivers are preventing the Nvidia drivers from starting

Setup: Triple boot with Windows 11, PopOS 24.02 and Fedora 41 with Refind
Refind is the boot manager. Not using Grub
Secure boot is disabled

dee@fedora:~$ mokutil --sb-state
SecureBoot disabled
Graphics:
  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
  Device-2: NVIDIA GP108M [GeForce MX150] driver: nouveau v: kernel

Drivers are installed:

modinfo -F version nvidia
565.77
dee@fedora:~$ journalctl -b -g nvidia
Feb 13 12:13:52 fedora kernel: nouveau 0000:01:00.0: NVIDIA GP108 (138000a1)
Feb 13 17:13:56 fedora kernel: nvidia: loading out-of-tree module taints kernel.
Feb 13 17:13:56 fedora kernel: nvidia: module license 'NVIDIA' taints kernel.
Feb 13 17:13:56 fedora kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Feb 13 17:13:56 fedora kernel: nvidia: module license taints kernel.
Feb 13 17:13:57 fedora systemd[1]: Started nvidia-powerd.service - nvidia-powerd service.
Feb 13 17:13:57 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-powerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? >
Feb 13 17:13:57 fedora /usr/bin/nvidia-powerd[930]: nvidia-powerd version:1.0(build 1)
Feb 13 17:13:57 fedora kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 510
Feb 13 17:13:57 fedora kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Feb 13 17:13:57 fedora kernel: NVRM: This can occur when another driver was loaded and 
                               NVRM: obtained ownership of the NVIDIA device(s).
Feb 13 17:13:57 fedora kernel: NVRM: Try unloading the conflicting kernel module (and/or
                               NVRM: reconfigure your kernel without the conflicting
                               NVRM: driver(s)), then try loading the NVIDIA kernel module
                               NVRM: again.
Feb 13 17:13:57 fedora kernel: NVRM: No NVIDIA devices probed.
Feb 13 17:13:57 fedora kernel: nvidia-nvlink: Unregistered Nvlink Core, major device number 510
Feb 13 17:13:59 fedora kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 510
Feb 13 17:13:59 fedora kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Installed packages
akmod-nvidia.x86_64                       3:565.77-1.fc41 <unknown>
kmod-nvidia-6.11.4-301.fc41.x86_64.x86_64 3:565.77-1.fc41 @commandline
nvidia-gpu-firmware.noarch                20241210-1.fc41 updates
nvidia-modprobe.x86_64                    3:565.77-1.fc41 <unknown>
nvidia-persistenced.x86_64                3:565.77-1.fc41 rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                    3:565.77-1.fc41 <unknown>
xorg-x11-drv-nvidia.x86_64                3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-cuda.x86_64           3:565.77-3.fc41 rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686        3:565.77-3.fc41 rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-libs.i686             3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-libs.x86_64           3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-power.x86_64          3:565.77-3.fc41 <unknown>

I’ve looked at a few posts here and tried a few troubleshooting steps though I’m sure I’m missing something.

  1. Looked at the RPM Fusion guide
  2. Secure boot has been disabled for a while
  3. Rebuilt the kernel and waited long enough to reboot
  4. Added rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 to /etc/kernel/cmdline`
  5. Couldn’t add the line from 4 to /proc/cmdline. Got an I/O error when trying to save the file

Not sure what else to do.

please show us the output of cat /etc/default/grub and lsmod | grep -E 'nvidia|nouveau'

Also, you really really need to update the system. According to that listing for the nvidia packages it only shows the modules were built for the 6.11.4-301 kernel which was the kernel provided on the f41 release ISO. Fedora is now using the 6.12.11 kernel and soon will be updating even that.

sudo dnf upgrade --refresh in a terminal window will update everything to the latest available packages.

1 Like

Looks like there’s nothing to update?

dee@fedora:~$ sudo dnf upgrade --refresh
Updating and loading repositories:
 RPM Fusion for Fedora 41 - Nonfree - NVIDIA Driver                                                     100% |  10.0 KiB/s |   6.5 KiB |  00m01s
 Fedora 41 - x86_64                                                                                     100% | 159.6 KiB/s |  30.6 KiB |  00m00s
 Copr repo for PyCharm owned by phracek                                                                 100% |   6.6 KiB/s |   2.1 KiB |  00m00s
 google-chrome                                                                                          100% |   7.5 KiB/s |   1.3 KiB |  00m00s
 Fedora 41 - x86_64 - Updates                                                                           100% | 186.7 KiB/s |  28.8 KiB |  00m00s
 RPM Fusion for Fedora 41 - Nonfree                                                                     100% |  18.1 KiB/s |   6.8 KiB |  00m00s
 RPM Fusion for Fedora 41 - Nonfree - Updates                                                           100% |  85.0 KiB/s |   6.3 KiB |  00m00s
 Fedora 41 openh264 (From Cisco) - x86_64                                                               100% |   8.7 KiB/s | 989.0   B |  00m00s
Repositories loaded.
Nothing to do.

Would this still be applicable if I’m using rEFInd?

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
dee@fedora:~$ lsmod | grep -E 'nvidia|nouveau'
nouveau              3923968  1
drm_ttm_helper         16384  1 nouveau
gpu_sched              65536  1 nouveau
drm_gpuvm              45056  1 nouveau
drm_exec               12288  2 drm_gpuvm,nouveau
i2c_algo_bit           20480  2 i915,nouveau
ttm                   114688  3 drm_ttm_helper,i915,nouveau
drm_display_helper    290816  2 i915,nouveau
mxm_wmi                12288  1 nouveau
video                  81920  4 asus_wmi,asus_nb_wmi,i915,nouveau
wmi                    36864  5 video,asus_wmi,wmi_bmof,mxm_wmi,nouveau

The kernel command line is applicable regardless of the boot loader used. I have not used refind so do not know what interactions there are.

The fact that the kernel is up to date but the matching kmod-nvidia-NNN package is not there is probably part of the problem.

Try reinstalling all nvidia packages with sudo dnf reinstall \*nvidia\*

After that completes then try rebuilding the kernel mods with sudo kmods --force --rebuild and check that the driver is properly built for the installed kernel. That should properly complete and give an OK then a reboot should load the driver.

If you actually had to add the blacklist lines to the /etc/kernel/cmdline file then it would appear that for some reason the command line was not properly updated with the driver installation.
You can ensure that everything is properly updated with those options by running
sudo grubby --args="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau" --update-kernel=ALL I know it updates /boot/grub2/grub.cfg, /etc/kernel/cmdline, and /etc/default/grub as well as the .conf files under /boot/loader/entries. I am unsure how that translates to booting with refind, but the kernel cmdline should still work for that along with the entries in the .conf files…

It is possible that kmods is not properly completing since grub is not being used so watch the output when running the kmods command to see if it reports an error.

1 Like

Arch Linux often has excellent documantation – see: Passing Kernel Parameters with REFInd

1 Like

We don’t support the use of this option (due to fedora kernel devs preverting it’s use) for the rpmfusion driver, it is enabled already internally.

1 Like

I reinstalled the drivers, rebuilt the kernel (no errors) and was still defaulting to nouveau.

Success after adding rd.driver.blacklist=nouveau modprobe.blacklist=nouveau to refind_linux.conf

dee@fedora:~$ journalctl -b -g nvidia
Feb 14 16:40:50 fedora kernel: nvidia: loading out-of-tree module taints kernel.
Feb 14 16:40:50 fedora kernel: nvidia: module license 'NVIDIA' taints kernel.
Feb 14 16:40:50 fedora kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Feb 14 16:40:50 fedora kernel: nvidia: module license taints kernel.
Feb 14 16:40:51 fedora systemd[1]: Started nvidia-powerd.service - nvidia-powerd service.
Feb 14 16:40:51 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-powerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 14 16:40:51 fedora /usr/bin/nvidia-powerd[928]: nvidia-powerd version:1.0(build 1)
Feb 14 16:40:51 fedora kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 510
Feb 14 16:40:51 fedora kernel: nvidia 0000:01:00.0: enabling device (0006 -> 0007)
Feb 14 16:40:51 fedora kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  565.77  Wed Nov 27 23:33:08 UTC 2024
Feb 14 16:40:52 fedora kernel: nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
Feb 14 16:40:52 fedora kernel: nvidia-uvm: Loaded the UVM driver, major device number 508.
Feb 14 16:40:52 fedora kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  565.77  Wed Nov 27 22:53:48 UTC 2024
Feb 14 16:40:52 fedora kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Feb 14 16:40:53 fedora kernel: [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 0
Feb 14 16:40:53 fedora kernel: nvidia 0000:01:00.0: [drm] No compatible format found
Feb 14 16:40:53 fedora kernel: nvidia 0000:01:00.0: [drm] Cannot find any crtc or sizes
Feb 14 16:40:53 fedora systemd[1]: nvidia-powerd.service: Deactivated successfully.
Feb 14 16:40:53 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-powerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 14 16:40:53 fedora systemd[1]: nvidia-powerd.service: Consumed 1.598s CPU time, 112M memory peak.
Feb 14 16:40:53 fedora systemd[1]: nvidia-fallback.service - Fallback to nouveau as nvidia did not load was skipped because of an unmet condition check (ConditionPathExists=!/sys/module/nvidia).
Feb 14 16:40:59 fedora gnome-shell[1364]: Added device '/dev/dri/card0' (nvidia-drm) using atomic mode setting.
Feb 14 16:41:30 fedora gnome-shell[2195]: Added device '/dev/dri/card0' (nvidia-drm) using atomic mode setting.
Feb 14 16:41:31 fedora systemd[2026]: Started app-gnome-nvidia\x2dsettings\x2duser-2432.scope - Application launched by gnome-session-binary.
dee@fedora:~$ lsmod | grep -iE 'nouveau|nvidia'
nvidia_drm            147456  5
nvidia_modeset       1671168  3 nvidia_drm
nvidia_uvm           3989504  2
nvidia              77516800  46 nvidia_uvm,nvidia_modeset
drm_ttm_helper         16384  1 nvidia_drm
video                  81920  4 asus_wmi,asus_nb_wmi,i915,nvidia_modeset

Thank you very much for the assistance :slight_smile: