Solved NVIDIA driver installation for FreeBSD 15: PKG & KMOD repository version mixup.

Hi

the Default PKG, KMODs REPOS are mixed up and provide non-working set of NVIDIA drivers for a clean from scratch installation .

as shown in the transcript below , the REPOS provide mixed up versions of NVIDIA driver that does not work together.

nvidia-driver: 580.95.05 [FreeBSD-ports]
nvidia-drm-66-kmod: 580.95.05.1500068 [FreeBSD-ports]
nvidia-drm-kmod: 580.95.05_1 [FreeBSD-ports]
nvidia-kmod: 580.105.08.1500068 [FreeBSD-ports-kmods] This KMOD s newer that the other packages .


A unsuspecting new user of FreeBSD will not succeed in setting up a Graphics environment becase the REPOS are incosistent.

--------------------------------------------

root@alderan:~ # uname -a
FreeBSD alderan 15.0-RELEASE FreeBSD 15.0-RELEASE alderan amd64
root@alderan:~ # pciconf -lv | grep -B3 display
vgapci0@pci0:1:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1c30 subvendor=0x10de subdevice=0x11b3
vendor = 'NVIDIA Corporation'
device = 'GP106GL [Quadro P2000]'
class = display
root@alderan:~ # pkg install nvidia-drm-kmod
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
The following 46 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
drm-66-kmod: 6.6.25.1500068_6 [FreeBSD-ports-kmods]
egl-wayland: 1.1.20 [FreeBSD-ports]
freetype2: 2.13.3 [FreeBSD-ports]
hwdata: 0.399,1 [FreeBSD-ports]
libX11: 1.8.12,1 [FreeBSD-ports]
libXau: 1.0.12 [FreeBSD-ports]
libXdamage: 1.1.6 [FreeBSD-ports]
libXdmcp: 1.1.5 [FreeBSD-ports]
libXext: 1.3.6,1 [FreeBSD-ports]
libXfixes: 6.0.1 [FreeBSD-ports]
libXfont2: 2.0.6 [FreeBSD-ports]
libXrandr: 1.5.4 [FreeBSD-ports]
libXrender: 0.9.12 [FreeBSD-ports]
libXv: 1.0.13,1 [FreeBSD-ports]
libXxf86vm: 1.1.6 [FreeBSD-ports]
libdrm: 2.4.123,1 [FreeBSD-ports]
libedit: 3.1.20250104,1 [FreeBSD-ports]
libepoll-shim: 0.0.20240608 [FreeBSD-ports]
libepoxy: 1.5.10 [FreeBSD-ports]
libfontenc: 1.1.8 [FreeBSD-ports]
libglvnd: 1.7.0 [FreeBSD-ports]
libpciaccess: 0.18.1_1 [FreeBSD-ports]
libudev-devd: 0.6.0 [FreeBSD-ports]
libunwind: 20250904 [FreeBSD-ports]
libxcb: 1.17.0 [FreeBSD-ports]
libxcvt: 0.1.3 [FreeBSD-ports]
libxkbfile: 1.1.3 [FreeBSD-ports]
libxml2: 2.14.5 [FreeBSD-ports]
libxshmfence: 1.3.3 [FreeBSD-ports]
llvm19: 19.1.7_1 [FreeBSD-ports]
lua53: 5.3.6_1 [FreeBSD-ports]
mesa-dri: 24.1.7_9 [FreeBSD-ports]
mesa-libs: 24.1.7_1 [FreeBSD-ports]
nvidia-driver: 580.95.05 [FreeBSD-ports]
nvidia-drm-66-kmod: 580.95.05.1500068 [FreeBSD-ports]
nvidia-drm-kmod: 580.95.05_1 [FreeBSD-ports]
nvidia-kmod: 580.105.08.1500068 [FreeBSD-ports-kmods]

pixman: 0.46.2 [FreeBSD-ports]
png: 1.6.52 [FreeBSD-ports]
spirv-llvm-translator-llvm19: 19.1.12 [FreeBSD-ports]
spirv-tools: 2025.4 [FreeBSD-ports]
wayland: 1.24.0_2 [FreeBSD-ports]
xkbcomp: 1.4.7 [FreeBSD-ports]
xkeyboard-config: 2.41_4 [FreeBSD-ports]
xorg-server: 21.1.20,1 [FreeBSD-ports]
xorgproto: 2024.1 [FreeBSD-ports]

Number of packages to be installed: 46

The process will require 2 GiB more space.
537 MiB to be downloaded.

Proceed with this action? [y/N]:

------------------------------------------------------------
 
To get a consistent set of NVIDIA driver from the REPOS is requiered to uses the "latest" PKG repository.
then a usable set of packages and KMOD is proposed


nvidia-driver: 580.105.08 [FreeBSD-ports]
nvidia-drm-66-kmod: 580.105.08.1500068 [FreeBSD-ports]
nvidia-drm-kmod: 580.105.08 [FreeBSD-ports]
nvidia-kmod: 580.105.08.1500068 [FreeBSD-ports]
 
Now its like this:
Code:
 # pkg repos
FreeBSD-ports: { 
    url             : "pkg+[URL]https://pkg.freebsd.org/FreeBSD:15:amd64/latest[/URL]",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-ports-kmods: { 
    url             : "pkg+[URL]https://pkg.freebsd.org/FreeBSD:15:amd64/kmods_quarterly_0[/URL]",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-base: { 
    url             : "pkg+[URL]https://pkg.freebsd.org/FreeBSD:15:amd64/base_release_0[/URL]",
    enabled         : no,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkgbase-15"
  }
 
Your "FreeBSD-ports" is using latest, and your "FreeBSD-ports-kmods" is using quarterly. That's certainly going to cause a discrepancy.

That said, there should be no need for the kmods repository right now. There is no transition from one minor version to another, there's no 15.-1 and no 15.2. So it should be fine to get the drivers from the FreeBSD-ports repository alone.
 
Yes that also possible , This is caused , i assume by a New Driver being released from Nvidia after the FreeBSD-ports repo was last built last quarter.
but is still causes non-functional graphics card as a result.
 
So after the KMODs repo has been disabled ,

# cat /etc/pkg/FreeBSD.conf

.
.
FreeBSD-ports-kmods: {
url: "pkg+https://pkg.freebsd.org/${ABI}/kmods_quarterly_${VERSION_MINOR}",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: no

Consistent set of drivers is proposed :

# pkg install nvidia-drm-kmod

.
.
nnvidia-driver: 580.95.05 [FreeBSD-ports]
nvidia-drm-66-kmod: 580.95.05.1500068 [FreeBSD-ports]
nvidia-drm-kmod: 580.95.05_1 [FreeBSD-ports]
nvidia-kmod: 580.95.05.1500068 [FreeBSD-ports]
 
FreeBSD[-ports]-kmods repo seems to be mangled with the ports tree to use for building.
Reports can be seen, i.e., on Matrix, too.

Fortunately, no supported major releases have multiple minor versions for now. So the workaround would be to force FreeBSD[-ports] repo with -r option of pkg. For any releases/stables prior to 15.0 should use FreeBSD, 15.0 (RELEASE and stable/15) and main (aka Current) should use FreeBSD-ports.
 
FreeBSD[-ports]-kmods repo seems to be mangled with the ports tree to use for building.
Reports can be seen, i.e., on Matrix, too.
Have you seen any official response about this "mangled" situation?
As far as you know, are those, who are maintaining the remote build runs, aware of this?
 
I had the same problem, had to downgrade from 580.105.08 to 580.95.05

 
Just for info, same here : mismatch error. I'm using ports on nvidia-driver and nvidia-drm-61-kmod to bypass, since they are up to date. Tested pkg yesterday, quarterly are still the wrong ones.
A newbie will have some problems if compiling a port is something unknown, but running dmesg gives a clear error that makes it "easy" to know what's wrong.
 
Back
Top