How to install the nvidia-drm-kmod for the driver nvidia 525.78.01 on FreeBSD 14.2 to be able to run ComfyUI.

// pkg install linux-c7-devtools

so,now the reason became clear : the shim is compatible only with the linux-c7-devtools...I suspect the reason of the failing is that it should be upgraded to be compatible with linux-rl9 ; because linux-rl9 should be installed to support the new versions of the nvidia drivers and of the CUDA libraries (I'm not a programmer,so I think that it could be more or less like what I said).

It's a game over,at least until Alexey will upgrade the shim.
 
then you need to install the linux-r9-devtools

the shim is compatible only with the linux-c7-devtools.

no i dont think thats the issue,
i switched the linuxulator to both rocky and ubuntu and built the dummy-uvm.so and it still didnt work
 
This is the error to fix for me now :

Code:
/compat/linux/usr/include/stddef.h:54:10: fatal error: 'sys/_types.h' file not found
 
there are just too many parts that can easily break on freebsd for this to be usable
even if you managed to get it working, doing an update either on freebsd or linux is liable to break everything

then your back to square one

you'll spend more time constantly fixing stuff than actually using comfy-ui
 
It's a game over,at least until Alexey will upgrade the shim.

thats the whole point you are missing

you are depending on one person to keep the shim working
and if it stops working then everything breaks

eg

the shim has stopped working the linuxulator using rocky linux,
the latest nvidia driver, the latest cuda driver, the latest release of freebsd

or i updated ubuntu and the shim stopped working
 
I tried different permutations and it didn't work,so I created a post on the pytorch forum :

 
T-Aoki , please give a look below :

Code:
root@marietto:/compat/linux # nv-sglrun nvidia-smi

/usr/local/lib/libc6-shim/libc6.so: shim init
Failed to initialize NVML: Driver/library version mismatch

NVML library version: 535.154

@marietto:/compat/linux # nvidia-smi

Thu May  8 14:54:13 2025       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.06              Driver Version: 545.23.06    CUDA Version: N/A      |


marietto:/compat # ./start-noble-bash-no-jail

marietto@marietto:/$ nvidia-smi

Thu May  8 14:55:45 2025       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.06              Driver Version: 545.23.06    CUDA Version: 12.3     |

For some reason,when I make the installation of a new nvidia driver,a part of the old one is not updated...that could be the reason why greater versions of the nvidia driver is never detected by pytorch+cu...or...for some reason the files of the 535 driver are installed by default in some way and they stick there forever ?

And it's not a coincidence that the residual part is 535,just the last driver version that works.
 
T-Aoki , please give a look below :

Code:
root@marietto:/compat/linux # nv-sglrun nvidia-smi

/usr/local/lib/libc6-shim/libc6.so: shim init
Failed to initialize NVML: Driver/library version mismatch

NVML library version: 535.154

@marietto:/compat/linux # nvidia-smi

Thu May  8 14:54:13 2025      
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.06              Driver Version: 545.23.06    CUDA Version: N/A      |


marietto:/compat # ./start-noble-bash-no-jail

marietto@marietto:/$ nvidia-smi

Thu May  8 14:55:45 2025      
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.06              Driver Version: 545.23.06    CUDA Version: 12.3     |

For some reason,when I make the installation of a new nvidia driver,a part of the old one is not updated...that could be the reason why greater versions of the nvidia driver is never detected by pytorch+cu...or...for some reason the files of the 535 driver are installed by default in some way and they stick there forever ?

And it's not a coincidence that the residual part is 535,just the last driver version that works.
I cannot know exactly what's happening in your environment (as I don't have environment that 100% match, not only hardware but including installing/upgrading history of softwares / firmwares), but some predictions are possible.

Possibilities would be, as I can imagine of right now:
  • Deinstall of previous version was somehow incomplete (interrupted, crashed, ...) and later installs are done overthere.
  • Deinstall and reinstall are all went fine for x11/nvidia-driver and x11/linux-nvidia-libs, but anything depending upon them (libc6-shim here?) are not rebuilt against them. And old libraries are preserved in /usr/local/lib/compat/pkg/ and for example, libc6-shim still requires the preserved ones.
Quite unfortunately, recent softwares in ports often installs their libraries in their own subdirectories under /usr/local/lib/ and these appears later than /usr/local/lib/compat/pkg/ in library search path, thus, preserved ones are missingly loaded and linked.

The "workaround" for the latter is to remove (or move to elseware that aren't searched) preserved libraries which are causing mis-behaviours.

Fixing this could be non-trivial and shall be done in base, not ports.
Place for preserved libraries (/usr/local/lib/compat/pkg/ with historical reason) shall be always at the end of the library search path, but I'm not sure there's way to do so "always sanely all over the system at the exactly same time". If the library search path is somehow cached by something outside base, how can we assure all of them are promised to be updated all at once?

/usr/local/lib/compat/pkg/ used to work perfectly fine when it was first introduced (IIRC, by almost at the first import of ports-mgmt/portupgrade, at the time, the category ports-mgmt was not existed and maybe sysutils was used), as all libraries from ports are installed directly under /usr/local/lib/.
 
Back
Top