nvidia drivers not working.

I am posting this from not-my-bsd machine so I will have to figure out how to get logs here.

I have a new computer, with a fresh install of freebsd 15. I have not touched FreeBSD in decades so please give me the newbie step-by-step instructions when possible.

I cannot get my Nvidia driver working. I tried first via the handbook and then I tried desktop-installer package. I just tried rebuilding from the port and now I am unsure what next.

Driver version is 580.126.09 I used the nvidia-driver pkg and port. klstat does show nvidia and nvidia-modeset loaded.

Xorg will start with scfb. If I create 10-monitor and 20-nvidia.conf files it starts to load Nvidia drivers then my system becomes unresponsive, last line in Xorg.log tells me that I can use PRIME render offload.

I tried uninstalling the nvidia packages again and going back to nvidia-drm-kmod (as per the handbook - desktop-installer doesn't use this) and now I am getting a version mismatch -modset is 580.126.09 vs -drm 580.119.02 both of which were pulled by pkg install nvidia-drm-kmod.
  • I am switching pkg back to quarterly, runniing pkg update then upgrade -f. hopefully that will fix the version mismatch. I don't expect this to fix my general problem though.
  • Finished with that and now the mismatch is modeset 580.126.09 and drm 580.95.05 I guess pkg update -f and pkg upgrade -f didn't fix that.
  • Disabling the freebsd-ports-kmods repository fixed the mismatch. rebooting now.
  • 🥵 My system now hangs on boot when it loads the nvidia driver. A new personal low.
Keep in mind there was no mismatch while the system was locking up, so once I fix the mismatch I will still probably have problems with my driver.

I don't know what to do next. Do I try an older driver? Nuke the system and try FreeBSD 14? My system is an amd epyc, my video card is a blackwell pro 4000.
 
PLS Note: ALL NVIDIA Drivers / KMODS / DRM must have the same version.
in my case im at 580.105.08

$ pkg info nvidia*
nvidia-driver-580.105.08
nvidia-drm-66-kmod-580.105.08.1600004
nvidia-drm-kmod-580.105.08
nvidia-kmod-580.105.08.1600007
nvidia-settings-580.105.08
nvidia-xconfig-580.105.08

And you need same DRM version. DRM 66 and DRM 66 Kmod.
$ pkg info drm*
drm-66-kmod-6.6.25.1600007_8

As the NVIDIA drivers is quickly being upgraded from upstream. the FreeBSD Repositories are not keeping up.
specifically the KMOD and BASE repos have not been in sync for many weeks now.
I usually solve this by deleting all the nvidia packages installed from the online repos, and then install a new Ports tree as described in the handbook.
Then :
# sysrc linux_enable="YES"
# kldload linux linux64
# cd /usr/ports/graphics/nvidia-drm-kmod
# make install

This will build and install the following komponents :

nvidia-driver
nvidia-kmod
nvidia-drm-kmod
nvidia-drm-66-kmod
drm-66-kmod.
 
x@myfreebsd:/SSD/home/x $ kldstat | grep drm
Code:
20    1 0xffffffff89a99000    8a190 drm.ko
x@myfreebsd:/SSD/home/x $ kldstat | grep nvidia
 5    1 0xffffffff83848000   1650f8 nvidia-modeset.ko
 6    1 0xffffffff83a00000  6058178 nvidia.ko

Maybe a bit too much, but this works,
Code:
cat b
drm-66-kmod-6.6.25.1500068_5   Direct Rendering Manager GPU drivers
drm-kmod-20250428              Direct Rendering Manager GPU drivers metaport
gpu-firmware-kmod-20241114,1   Firmware modules for the drm-kmod drivers
nvidia-driver-580.95.05        NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-drm-66-kmod-580.95.05.1500068 NVIDIA DRM Kernel Module
nvidia-drm-kmod-580.95.05_1    NVIDIA DRM Kernel Module
nvidia-kmod-580.95.05.1500068  kmod part of NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-580.95.05      Display Control Panel for X NVidia driver
 
Back
Top