How to install the nvidia-drm-kmod for the driver nvidia 525.78.01 on FreeBSD 14.2

From: Mario Marietto <marietto2008_at_gmail.com>
Date: Sun, 04 May 2025 13:29:56 UTC
Hello to everyone.

I'm trying to run ComfyUI on FreeBSD 14.2 natively,using the miniconda
installer and the appropriate nvidia driver + nvidia-drm-kmod. I would like
to downgrade the nVidia driver shipped by default by the 14.2 (vers.
570.124.04) because I suspect that it does not work with the libc6-shim.
Probably I should reinstall FreeBSD 13.1,where I'm sure that everything may
work good,but it is very old and it went EOL,so the idea here is to use the
14.2 but with some ports that come from the past (like the nvidia 525.78.01
driver,the drm-kmod associated and maybe an old version of the libc6-shim).
So. I have resumed an old post :

https://www.reddit.com/r/freebsd/comments/10ysy6m/how_to_install_on_freebsd_131release_a_different/


and I have installed the nVidia driver 525.78.01 succesfully. But now I
should figure out how to install the nvidia-drm-kmod package or port
associated with it,because the official one shipped with FreeBSD 14.2
(nvidia-drm-kmod-570.124.04) does not work at all. The error that it gives
when I try to kld load it is :

Code:

KLD nvidia-drm.ko: depends on nvidia_modeset - not available or version mismatch
linker_load_file: /boot/modules/nvidia-drm.ko - unsupported file type


So,where can I get the missing piece of software that I need ?

The problem is the resolution of my screen is stuck to 1024x768.


Any nvidia-drm-*-kmod available on the 13.X and 14.X

triggers the nvidia driver 570,but I have installed

nVidia driver 525. So,I would like to know how to

install the proper nvidia-drm-kmod module that match

with the driver nvidia 525.


For example the one below is not good :



# pkg install nvidia-drm-510-kmod

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    nvidia-drm-510-kmod: 570.124.04.1304000_1

Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[1/1] Installing nvidia-drm-510-kmod-570.124.04.1304000_1...
[1/1] Extracting nvidia-drm-510-kmod-570.124.04.1304000_1: 100%
=====
Message from nvidia-drm-510-kmod-570.124.04.1304000_1:

--
Modesetting must be enabled to use nvidia-drm.ko for graphics. This
can be done by setting the modeset sysctl, the equivalent of the
modeset kernel parameter on Linux.

hw.nvidiadrm.modeset=1

This must be set before loading nvdidia-drm.ko, most easily done by
placing the above in /boot/loader.conf.

# kldload nvidia-drm

kldload: an error occurred while loading module nvidia-drm. Please
check dmesg(8) for more details.

DMESG :

KLD nvidia-drm.ko: depends on nvidia_modeset - not available or version mismatch
linker_load_file: /boot/modules/nvidia-drm.ko - unsupported file type


 --
Mario.