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"
  }
 
How would a Newbie know he needs to do this REPO change to get a usable set of drivers installed. ?
 
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.
 
I've asked bapt@ privately via email and he said he've fixed the mangled branch issue yesterday (could take days to finish rebuilding and finish propagating to mirrors).

Can anyone using quarterly pkg repo confirm?
 
Can anyone using quarterly pkg repo confirm?
LGTM:
Rich (BB code):
[1-0] # pkg -vv | sed -nE -e '/(^BLA|OSVERSION|ABI|VERSION_MINOR|^BACKUP|DEBUG_LEVEL)/ p' -e '/^Repositories:/,$ p'
DEBUG_LEVEL = 0;
IGNORE_OSVERSION = false;
BACKUP_LIBRARIES = false;
BACKUP_LIBRARY_PATH = "/usr/local/lib/compat/pkg";
ABI = "FreeBSD:14:amd64";
ALTABI = "freebsd:14:x86:64";
OSVERSION = "1403000";
Repositories:
  FreeBSD: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[2-0] # pkg rquery -x '[%R] %o %n %v' '^drm-(510-|515-|61-|66-)?kmod|(^nvidia-(d|k))' | column -t | nl
     1  [FreeBSD]        graphics/drm-515-kmod               drm-515-kmod               5.15.160.1403000_6
     2  [FreeBSD]        graphics/drm-61-kmod                drm-61-kmod                6.1.128.1403000_6
     3  [FreeBSD]        graphics/drm-kmod                   drm-kmod                   20250428
     4  [FreeBSD]        x11/nvidia-driver                   nvidia-driver              580.95.05
     5  [FreeBSD]        x11/nvidia-driver-304               nvidia-driver-304          304.137_11
     6  [FreeBSD]        x11/nvidia-driver-340               nvidia-driver-340          340.108_5
     7  [FreeBSD]        x11/nvidia-driver-390               nvidia-driver-390          390.157_1
     8  [FreeBSD]        x11/nvidia-driver-470               nvidia-driver-470          470.256.02_2
     9  [FreeBSD]        x11/nvidia-driver-devel             nvidia-driver-devel        580.95.05
    10  [FreeBSD]        graphics/nvidia-drm-515-kmod        nvidia-drm-515-kmod        580.95.05.1403000
    11  [FreeBSD]        graphics/nvidia-drm-515-kmod-devel  nvidia-drm-515-kmod-devel  580.95.05.1403000
    12  [FreeBSD]        graphics/nvidia-drm-61-kmod         nvidia-drm-61-kmod         580.95.05.1403000
    13  [FreeBSD]        graphics/nvidia-drm-61-kmod-devel   nvidia-drm-61-kmod-devel   580.95.05.1403000
    14  [FreeBSD]        graphics/nvidia-drm-kmod            nvidia-drm-kmod            580.95.05_1
    15  [FreeBSD]        graphics/nvidia-drm-kmod-devel      nvidia-drm-kmod-devel      580.95.05_1
    16  [FreeBSD]        x11/nvidia-kmod                     nvidia-kmod                580.95.05.1403000
    17  [FreeBSD]        x11/nvidia-kmod-304                 nvidia-kmod-304            304.137.1403000
    18  [FreeBSD]        x11/nvidia-kmod-340                 nvidia-kmod-340            340.108.1403000
    19  [FreeBSD]        x11/nvidia-kmod-390                 nvidia-kmod-390            390.157.1403000
    20  [FreeBSD]        x11/nvidia-kmod-470                 nvidia-kmod-470            470.256.02.1403000
    21  [FreeBSD]        x11/nvidia-kmod-devel               nvidia-kmod-devel          580.95.05.1403000
    22  [FreeBSD-kmods]  graphics/drm-515-kmod               drm-515-kmod               5.15.160.1403000_6
    23  [FreeBSD-kmods]  graphics/drm-61-kmod                drm-61-kmod                6.1.128.1403000_6
    24  [FreeBSD-kmods]  x11/nvidia-kmod                     nvidia-kmod                580.95.05.1403000
[3-0] #

Edit: On FreeBSD-15.0-RELEASE, this looks like:
Rich (BB code):
[1-0] # pkg -vv | sed -nE -e '/(^BLA|OSVERSION|ABI|VERSION_MINOR|^BACKUP|DEBUG_LEVEL)/ p' -e '/^Repositories:/,$ p'
DEBUG_LEVEL = 0;
IGNORE_OSVERSION = false;
BACKUP_LIBRARIES = true;
BACKUP_LIBRARY_PATH = "/usr/local/lib/compat/pkg";
ABI = "FreeBSD:15:amd64";
ALTABI = "freebsd:15:x86:64";
OSVERSION = "1500068";
Repositories:
  FreeBSD-ports: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/quarterly",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  FreeBSD-ports-kmods: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_quarterly_0",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  FreeBSD-base: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_0",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkgbase-15"
  }
[2-0] # pkg rquery -x '[%R] %o %n %v' '^drm-(510-|515-|61-|66-)?kmod|(^nvidia-(d|k))' | column -t | nl
     1  [FreeBSD-ports]        graphics/drm-61-kmod               drm-61-kmod               6.1.128.1500068_6
     2  [FreeBSD-ports]        graphics/drm-66-kmod               drm-66-kmod               6.6.25.1500068_5
     3  [FreeBSD-ports]        graphics/drm-kmod                  drm-kmod                  20250428
     4  [FreeBSD-ports]        x11/nvidia-driver                  nvidia-driver             580.95.05
     5  [FreeBSD-ports]        x11/nvidia-driver-304              nvidia-driver-304         304.137_11
     6  [FreeBSD-ports]        x11/nvidia-driver-340              nvidia-driver-340         340.108_5
     7  [FreeBSD-ports]        x11/nvidia-driver-390              nvidia-driver-390         390.157_1
     8  [FreeBSD-ports]        x11/nvidia-driver-470              nvidia-driver-470         470.256.02_2
     9  [FreeBSD-ports]        x11/nvidia-driver-devel            nvidia-driver-devel       580.95.05
    10  [FreeBSD-ports]        graphics/nvidia-drm-61-kmod        nvidia-drm-61-kmod        580.95.05.1500068
    11  [FreeBSD-ports]        graphics/nvidia-drm-61-kmod-devel  nvidia-drm-61-kmod-devel  580.95.05.1500068
    12  [FreeBSD-ports]        graphics/nvidia-drm-66-kmod        nvidia-drm-66-kmod        580.95.05.1500068
    13  [FreeBSD-ports]        graphics/nvidia-drm-66-kmod-devel  nvidia-drm-66-kmod-devel  580.95.05.1500068
    14  [FreeBSD-ports]        graphics/nvidia-drm-kmod           nvidia-drm-kmod           580.95.05_1
    15  [FreeBSD-ports]        graphics/nvidia-drm-kmod-devel     nvidia-drm-kmod-devel     580.95.05_1
    16  [FreeBSD-ports]        x11/nvidia-kmod                    nvidia-kmod               580.95.05.1500068
    17  [FreeBSD-ports]        x11/nvidia-kmod-304                nvidia-kmod-304           304.137.1500068
    18  [FreeBSD-ports]        x11/nvidia-kmod-340                nvidia-kmod-340           340.108.1500068
    19  [FreeBSD-ports]        x11/nvidia-kmod-390                nvidia-kmod-390           390.157.1500068
    20  [FreeBSD-ports]        x11/nvidia-kmod-470                nvidia-kmod-470           470.256.02.1500068
    21  [FreeBSD-ports]        x11/nvidia-kmod-devel              nvidia-kmod-devel         580.95.05.1500068
    22  [FreeBSD-ports-kmods]  graphics/drm-61-kmod               drm-61-kmod               6.1.128.1500068_6
    23  [FreeBSD-ports-kmods]  graphics/drm-66-kmod               drm-66-kmod               6.6.25.1500068_5
    24  [FreeBSD-ports-kmods]  x11/nvidia-kmod                    nvidia-kmod               580.95.05.1500068
[3-0] #
 
Last edited:
Back
Top