How to blacklist nouveau after installing real nvidia drivers?

I’ve recently installed Rocky 9.1 on a system with an Nvidia 750ti card. I then installed the Nvidia drivers from rpmfusion, so now I ASSUME I need to blacklist nouveau. (haven’t rebooted yet, in case something blows up due to conflicting video drivers.)

back, on my old system, when I installed nvidia drivers from elrepo, then did the blacklisting for me, but AFAIK the rpmfusion ones don’t. Or at least I find no mention of it anywhere.

Guidance sought, Thanks in advance!

Fred

sorry, typo:

“then did the” ==> “they did the”

The nvidia drivers from rpmfusion should automatically blacklist it. You can verify /etc/default/grub and/or /boot/grub2/grubenv.

Thanks for the confirmation!

A little while after posting that I did look at the grub files, and saw the necessary information there, so I rebooted and voila! it seems to be working fine now.

Thanks again for the reply.

Fred

Where does this myth that rpmfusion requires any additional manual steps comes from ?

RPM Fusion project maintainer here. There is no need for any additional blacklist when using RPM Fusion nvidia packaged driver !

We use blacklist with kernel cmdline options, so that that very much the only technique that doesn’t require you to rebuild the initramfs or any other unsafe operation.

Also RPM Fusion packaged driver allows to fallback to nouveau in the case anything goes wrong with your installation. But if using Rocky kernel, there is nothing to fear…

Hope this helps.

There are many old “HowTos” out there. Newbies tend to pick the oldest one for a distro that is not even theirs.
Perhaps also from here or here
:slight_smile:

and I am a newbie only in the senses that (1) I am new to Rocky, but have used Centos for literally decades, and (2) I have always used the elrepo nvidia drivers in the past, not the ones from rpmfusion. So I simply DID NOT KNOW (and could not find documentation regarding) that rpmfusion’s Nvidia packages did the deed for me. (it makes sense that it would, but in lieu of knowledge it seemed appropriate to inquire.)

Fred

Can you post what the grub should contain that is correct? GRUB_CMDLINE_LINUX=“resume=/dev/mapper/rl_tidiabetes-swap rd.lvm.lv=rl_tidiabete
s/root rd.lvm.lv=rl_tidiabetes/swap rhgb quiet”
Mygub looks like this after Nvidia blacklist and it still complains.

on my fedora workstation with the nvidia run package , i use the following

GRUB_CMDLINE_LINUX=“rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1”

but thats not the only way to blacklist the nouveau driver, it can be done in /etc/modprobe.d/

with

cat /etc/modprobe.d/nvidia-installer-disable-nouveau.conf

blacklist nouveau
options nouveau modeset=0

just make sure you are aware how to use the various means to access your pc with the graphics driver down.

i personally dont use the rpmfusion drivers on fedora because ive had too many kernel updates from fedora that are incompatible or out of step with the rpmfusion drivers and find that ive no desktop after the update.

but thats my choice,

regards peter

Both RPM Fusion and NVidia’s CUDA-repo do have NVidia’s proprietary driver as RPM.

RPM Fusion has also some legacy drivers:

# dnf -q --enablerepo=rpmfusion-nonfree-updates list \*kmod-nvidia\*
Installed Packages
akmod-nvidia-470xx.x86_64                    3:470.182.03-1.el9    @rpmfusion-nonfree-updates
kmod-nvidia-470xx-5.14.0-162.el9_1.x86_64    3:470.182.03-1.el9    @@commandline             
kmod-nvidia-470xx-5.14.0-284.el9_2.x86_64    3:470.182.03-1.el9    @@commandline             
Available Packages
akmod-nvidia.x86_64                          3:525.116.04-1.el9    rpmfusion-nonfree-updates 
akmod-nvidia-340xx.x86_64                    1:340.108-25.el9      rpmfusion-nonfree-updates 
akmod-nvidia-470xx.x86_64                    3:470.199.02-1.el9    rpmfusion-nonfree-updates 
akmod-nvidia-open.x86_64                     3:525.78.01-1.el9     rpmfusion-nonfree-updates 
kmod-nvidia.x86_64                           3:525.116.04-1.el9    rpmfusion-nonfree-updates 
kmod-nvidia-340xx.x86_64                     1:340.108-25.el9      rpmfusion-nonfree-updates 
kmod-nvidia-340xx-5.14.0-162.el9_1.x86_64    1:340.108-25.el9      rpmfusion-nonfree-updates 
kmod-nvidia-470xx.x86_64                     3:470.199.02-1.el9    rpmfusion-nonfree-updates 
kmod-nvidia-470xx-5.14.0-284.el9_2.x86_64    3:470.199.02-1.el9    rpmfusion-nonfree-updates 
kmod-nvidia-5.14.0-284.el9_2.x86_64          3:525.116.04-1.el9    rpmfusion-nonfree-updates 
kmod-nvidia-open.x86_64                      3:525.78.01-1.el9     rpmfusion-nonfree-updates 
kmod-nvidia-open-5.14.0-162.el9_1.x86_64     3:525.78.01-1.el9     rpmfusion-nonfree-updates

The xorg-x11-drv-nvidia* package has postinstall scriplet that should add the rd.driver.blacklist=nouveau to kernel command-line:

# rpm -q --scripts xorg-x11-drv-nvidia-470xx-470.182.03-1.el9.x86_64
preinstall scriptlet (using /bin/sh):
if [ "$1" -eq "1" ]; then
  if [ -x /usr/bin/nvidia-uninstall ]; then
    /usr/bin/nvidia-uninstall -s && rm -f /usr/bin/nvidia-uninstall &>/dev/null || :
  fi
fi
postinstall scriptlet (using /bin/sh):
if [ "$1" -eq "1" ]; then
  /usr/sbin/grubby --update-kernel=ALL --remove-args='nomodeset' --args='rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1' &>/dev/null
  sed -i -e 's/GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 /g' /etc/default/grub
  if [ -f /etc/gdm/custom.conf ]; then
    sed -i -e 's/#WaylandEnable=.*/WaylandEnable=false/' /etc/gdm/custom.conf
  fi
fi || :
preuninstall scriptlet (using /bin/sh):
if [ "$1" -eq "0" ]; then
  /usr/sbin/grubby --update-kernel=ALL --remove-args='rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1' &>/dev/null
  sed -i -e 's/rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 //g' /etc/default/grub
  if [ -f /etc/gdm/custom.conf ]; then
    sed -i -e 's/WaylandEnable=.*/#WaylandEnable=false/' /etc/gdm/custom.conf
  fi
  # Backup and disable previously used xorg.conf
  [ -f /etc/X11/xorg.conf ] && mv /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia_uninstalled &>/dev/null
fi ||:

The install from RPM Fusion is two explicit packages: xorg-x11-drv-nvidia-470xx akmod-nvidia-470xx


The CUDA repository has only “non-legacy streams”:

# dnf -q --enablerepo=cuda-rhel9-x86_64 --disablerepo=rpmfusion* module list nvidia-driver
cuda-rhel9-x86_64
Name                 Stream                Profiles                       Summary                                   
nvidia-driver        latest                default [d], fm, ks, src       Nvidia driver for latest branch           
nvidia-driver        latest-dkms [d]       default [d], fm, ks            Nvidia driver for latest-dkms branch      
nvidia-driver        open-dkms             default [d], fm, ks, src       Nvidia driver for open-dkms branch        
nvidia-driver        515                   default [d], fm, ks, src       Nvidia driver for 515 branch              
nvidia-driver        515-dkms              default [d], fm, ks            Nvidia driver for 515-dkms branch         
nvidia-driver        515-open              default [d], fm, ks, src       Nvidia driver for 515-open branch         
nvidia-driver        520                   default [d], fm, ks, src       Nvidia driver for 520 branch              
nvidia-driver        520-dkms              default [d], fm, ks            Nvidia driver for 520-dkms branch         
nvidia-driver        520-open              default [d], fm, ks, src       Nvidia driver for 520-open branch         
nvidia-driver        525                   default [d], fm, ks, src       Nvidia driver for 525 branch              
nvidia-driver        525-dkms [e]          default [d], fm, ks            Nvidia driver for 525-dkms branch         
nvidia-driver        525-open              default [d], fm, ks, src       Nvidia driver for 525-open branch         
nvidia-driver        530                   default [d], fm, ks, src       Nvidia driver for 530 branch              
nvidia-driver        530-dkms              default [d], fm, ks            Nvidia driver for 530-dkms branch         
nvidia-driver        530-open              default [d], fm, ks, src       Nvidia driver for 530-open branch         
nvidia-driver        535                   default [d], fm, ks, src       Nvidia driver for 535 branch              
nvidia-driver        535-dkms              default [d], fm, ks            Nvidia driver for 535-dkms branch         
nvidia-driver        535-open              default [d], fm, ks, src       Nvidia driver for 535-open branch         

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Their packages, like RPM Fusion and ELRepo (which does not build NVidia for el9), do update kernel commandline.

Bottomline: both RPM builds should blacklist Nouveau. I’d remove and reinstall the driver packages.


The NVidia 750ti was a Maxwell generation card and the non-legacy driver should work. I have couple Maxwells with the “525-dkms” driver. You can therefore test both RPM Fusion and NVidia’s own build.


True. First, EL is much more “stable” than Fedora (as in smaller changes, even in point releases), so EL is “easier”.

The repos do have those “akmod” / “dkms” versions, where said tools supposedly can “rebuild” kernel module for new kernel versions. (Within limits of what the NVidia’s proprietary blobs allow.) The non-akmod/dkms version users have to wait until new kmod RPM is released for the new kernel version.