Unable to install Nvidia driver on RL8.9: ERROR: Unable to load the kernel module 'nvidia.ko'

RL 8.9

lspci | grep -i nv

02:01.0 VGA compatible controller: NVIDIA Corporation GA102GL [A40] (rev a1)


ERROR: Unable to load the kernel module ‘nvidia.ko’. This happens most frequently when this kernel module was built against the
wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target
kernel, or if another driver, such as nouveau, is present and prevents the NVIDIA kernel module from obtaining ownership of
the NVIDIA device(s), or no NVIDIA device installed in this system is supported by this NVIDIA Linux graphics driver

     Please see the log entries 'Kernel module load error' and 'Kernel messages' at the end of the file
     '/var/log/nvidia-installer.log' for more information.

cd /etc/modprobe.d

cat nvidia.conf

blacklist nouveau

cat disable-nouveau.conf

blacklist nouveau\noptions nouveau modeset=0

dracut -f initramfs-$(uname -r).img $(uname -r)

It is not recommended to use the .run installer. Please review the following topic: Nvidia Drivers on Rocky Linux

I followed the procedure here:

and am still getting this:


NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Looks like nouveau is still loading? Which is a problem.

lsmod | grep -i nouv

nouveau 2478080 0
mxm_wmi 16384 1 nouveau
wmi 32768 2 mxm_wmi,nouveau
i2c_algo_bit 16384 1 nouveau
drm_display_helper 155648 1 nouveau
video 53248 1 nouveau
drm_ttm_helper 16384 2 vmwgfx,nouveau
ttm 81920 3 vmwgfx,drm_ttm_helper,nouveau
drm_kms_helper 184320 5 vmwgfx,drm_display_helper,nouveau
drm 602112 8 vmwgfx,drm_kms_helper,drm_display_helper,drm_ttm_helper,ttm,nouveau

lsmod | grep -i Nvidia

This shows nothing loading.

dkms status

lspci | grep NVID
02:01.0 VGA compatible controller: NVIDIA Corporation GA102GL [A40] (rev a1)