Nvidia Driver question on LINUX compat.

Im testing Alfonso Siciliano's "desktop" KDE environment installation script.

I find that the nvidia.ko driver loads the linux.ko driver but not the linux64.ko driver
regardless if the ' enable_linux="YES" ' statment exist or not in /etc/rc.conf.
the Linux OPTION in the NVIDIA driver is "ON" in the package supplied from the REPO, as expected.


# pkg info nvidia-kmod-580.119.02.1500068_1
nvidia-kmod-580.119.02.1500068_1
Name : nvidia-kmod
Version : 580.119.02.1500068_1
Installed on : Wed Feb 11 07:58:28 2026 CET
Origin : x11/nvidia-kmod
Architecture : FreeBSD:15:amd64
Prefix : /usr/local
Categories : kld x11
Licenses : NVIDIA
Maintainer : x11@FreeBSD.org
WWW : https://www.nvidia.com/object/unix.html
Comment : kmod part of NVidia graphics card binary drivers for hardware OpenGL rendering
Options :
ACPI_PM : on
LINUX : on
WBINVD : off


With linux_enable=YES in rc.conf module linux64.ko is loaded as well.

Why is NVIDIA driver only loading 32-bit linux module ?


Secondly : the Pkg-message file for the nvidia-kmod driver seems to be outdated with
info that is nolonger correct .

why does it tell us to add linux_enable="YES" to /etc/rc.conf if its autoloaded ?
It has old info on nvidia-modeset which now has been replaced by nvidia-drm.

# sysrc kld_list+=nvidia-drm


Regards
 
I find that the nvidia.ko driver loads the linux.ko driver but not the linux64.ko driver
regardless if the ' enable_linux="YES" ' statment exist or not in /etc/rc.conf.
My understanding is that:
  • linux_enable="YES" (yours should be a typo) does not only loading matching linux*.ko (linux64.ko for amd64 and linux.ko for i386) but does more for Linuxulator to work. See /etc/rc.d/linux for details.
  • For amd64, linux_enable="YES" kldloads linux64.ko and any others needed for Linuxulator but not automatically pulled in by linux64.ko, excluding linux.ko.
  • x11/nvidia-driver-470 and non-legacy x11/nvidia-driver{-devel} has 32bit compat libraries, and if enabled LINUX option (default), the compat libraries need linux.ko, too.

It has old info on nvidia-modeset which now has been replaced by nvidia-drm.
You're completely mis-understanding here!
nvidia-drm.ko doesn't replace anything in nvidia.ko and nvidia-modeset.ko.

Just adds another interface (DRM with "generic" KMS) and code required for it.
nvidia-drm.ko mutually require nvidia-modeset.ko, which provides nvidia-specific KMS functionality, to work. So automatically kldload nvidia-modeset.ko as a dependency.

And nvidia-modeset.ko mutually requires nvidia.ko, which provides legacy X11 interface (UMS, in contrast with KMS) and codes that actually drives GPU, to work. So automatically kldload nvidia.ko as a dependency.

Yes, only nvidia.ko is the actual GPU driver kernel module.
 
Ok . so we have

kldlist = nvidia-drm which inturn loads nvidia-modset which inturn loads nvidia.ko .

this is fine.

What should be the goal of the KDE desktop script as far as NVIDIA part is concerned ?
should we aim for a full setup ? Including DRM , Including Linux , /compat/linux/proc & sys , setup /etc/fstab , the whole emulators/linux-base-rl9 and x11/linux-nvidia-libs ?

Or should the KDE desktop-installer script only aim to install the drivers according to the instructions in the handbook.

this is basically a philosophical question.....

Bare basics , or full everything setup. ?
 
Hi drsnx60 and T-Aoki
Thanks for the report and sorry for the delayed response, I probably didn't have forum notifications enabled, they should be active now.

What should be the goal of the KDE desktop script as far as NVIDIA part is concerned ?
should we aim for a full setup ? Including DRM , Including Linux , /compat/linux/proc & sys , setup /etc/fstab , the whole emulators/linux-base-rl9 and x11/linux-nvidia-libs ?

Or should the KDE desktop-installer script only aim to install the drivers according to the instructions in the handbook.

I just updated the script to add the packages and configurations required by the Call for testing to the mailing list (link1 and link2):

nvidia-drm-kmod nvidia-settings nvidia-xconfig nvidia-texture-tools linux-nvidia-libs
sysrc kld_list+="nvidia-drm" ;
sysrc linux_enable="YES" ;
echo "linprocfs /proc linprocfs rw 0 0" >> /etc/fstab ;
echo "linsysfs /compat/linux/sys linsysfs rw 0 0" >> /etc/fstab ;
echo hw.nvidiadrm.modeset=\"1\" >> /boot/loader.conf


Unfortunately, I don't currently have a recent NVIDIA card. Please let me know if I've made any mistakes or if I need to add anything else.
Thanks in advance.
 
emulators/linux-base-lr9 is needed to make a fully operational Linux environment
but its possible it will be pulled in by installing x11/linux-nvidia-libs
 
Yes, linux-base-lr9 is installed like a dependence by linux-nvidia-libs. Just to bu sure on my CURRENT laptop:


# pkg install linux-nvidia-libs
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 20 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
linux-nvidia-libs: 580.126.18 [FreeBSD-ports]
linux-rl9-elfutils-libelf: 0.193 [FreeBSD-ports]
linux-rl9-elfutils-libs: 0.193 [FreeBSD-ports]
linux-rl9-expat: 2.5.0_7 [FreeBSD-ports]
linux-rl9-fontconfig: 2.14.0_2 [FreeBSD-ports]
linux-rl9-freetype: 2.10.4_3 [FreeBSD-ports]
linux-rl9-graphite2: 1.3.14_1 [FreeBSD-ports]
linux-rl9-harfbuzz: 2.7.4_2 [FreeBSD-ports]
linux-rl9-imageformats-libs: 1_1 [FreeBSD-ports]
linux-rl9-libgcrypt: 1.10.0_2 [FreeBSD-ports]
linux-rl9-libgpg-error: 1.42_1 [FreeBSD-ports]
linux-rl9-libjxl: 0.7.2 [FreeBSD-ports]
linux-rl9-libxml2: 2.9.13_8 [FreeBSD-ports]
linux-rl9-lz4: 1.9.3_1 [FreeBSD-ports]
linux-rl9-nspr: 4.36.0 [FreeBSD-ports]
linux-rl9-nss: 3.112.0 [FreeBSD-ports]
linux-rl9-python39: 3.9.23 [FreeBSD-ports]
linux-rl9-systemd-libs: 252_12 [FreeBSD-ports]
linux-rl9-xorg-libs: 7.7_5 [FreeBSD-ports]
linux_base-rl9: 9.7 [FreeBSD-ports]

Number of packages to be installed: 20

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

Proceed with this action? [y/N]:


Probably the dependency tree is linux-nvidia-libs -> linux-rl9-xorg-libs -> a lot of deps including linux_base-rl9. Anyway I haven't looked into it further.
 
Hi drsnx60 and T-Aoki
Thanks for the report and sorry for the delayed response, I probably didn't have forum notifications enabled, they should be active now.



I just updated the script to add the packages and configurations required by the Call for testing to the mailing list (link1 and link2):

nvidia-drm-kmod nvidia-settings nvidia-xconfig nvidia-texture-tools linux-nvidia-libs
sysrc kld_list+="nvidia-drm" ;
sysrc linux_enable="YES" ;
echo "linprocfs /proc linprocfs rw 0 0" >> /etc/fstab ;
echo "linsysfs /compat/linux/sys linsysfs rw 0 0" >> /etc/fstab ;
echo hw.nvidiadrm.modeset=\"1\" >> /boot/loader.conf


Unfortunately, I don't currently have a recent NVIDIA card. Please let me know if I've made any mistakes or if I need to add anything else.
Thanks in advance.
Not yet read your updated script, but assuming the listed pkgs are to be installed:
  • nvidia-xconfig wouldn't be needed if your script provides xorg.conf (monolithic or splitted), as it's for generating monolithic xorg.conf.
  • linux-nvidia-libs wouldn't be needed unless users need to run Linux apps depending on NVIDIA driver libraries, so can be optional.
  • graphics/nvidia-texture-tools is a third party project and not a part of driver sets. So it would be better letting user to choose whether to install or not.
  • linprocfs and linsysfs are not mandatory for NVIDIA driver sets for FreeBSD, as no kmods of this driver sets exposes nothing via linprocfs nor linsysfs (Linux versions of kernel modules would do, but they doesn't work on FreeBSD.)
And graphics/nvidia-drm-*-kmod (installs /boot/modules/nvidia-drm.ko) are only for non-legacy versions for now, so legacy versions need different configs.
Note that once x11/nvidia-{driver|kmod} switches to 590 series or later in the future, new legacy branch -580 is planned to be introduced. And graphics/nvidia-drm-*-kmod would have -580, too, unless rejected on review.
 
echo "linprocfs /proc linprocfs rw 0 0" >> /etc/fstab ;
echo "linsysfs /compat/linux/sys linsysfs rw 0 0" >> /etc/fstab ;
Not needed. They are automagically mounted when linux_enable="YES" (linux_mounts_enable defaults to "YES"):
/etc/rc.d/linux:
Code:
        if checkyesno linux_mounts_enable; then
                linux_mount linprocfs "${_emul_path}/proc" -o nocover
                linux_mount linsysfs "${_emul_path}/sys" -o nocover
                linux_mount devfs "${_emul_path}/dev" -o nocover
                linux_mount fdescfs "${_emul_path}/dev/fd" -o nocover,linrdlnk
                linux_mount tmpfs "${_emul_path}/dev/shm" -o nocover,mode=1777
        fi

/etc/defaults/rc.conf:
Code:
linux_enable="NO"       # Linux binary compatibility loaded at startup (or NO).
linux_mounts_enable="YES" # If linux_enable is set to YES, mount Linux-specific
                        # filesystems at startup.
 
Not yet read your updated script, but assuming the listed pkgs are to be installed:
  • nvidia-xconfig wouldn't be needed if your script provides xorg.conf (monolithic or splitted), as it's for generating monolithic xorg.conf.
  • linux-nvidia-libs wouldn't be needed unless users need to run Linux apps depending on NVIDIA driver libraries, so can be optional.
  • graphics/nvidia-texture-tools is a third party project and not a part of driver sets. So it would be better letting user to choose whether to install or not.
  • linprocfs and linsysfs are not mandatory for NVIDIA driver sets for FreeBSD, as no kmods of this driver sets exposes nothing via linprocfs nor linsysfs (Linux versions of kernel modules would do, but they doesn't work on FreeBSD.)
And graphics/nvidia-drm-*-kmod (installs /boot/modules/nvidia-drm.ko) are only for non-legacy versions for now, so legacy versions need different configs.
Note that once x11/nvidia-{driver|kmod} switches to 590 series or later in the future, new legacy branch -580 is planned to be introduced. And graphics/nvidia-drm-*-kmod would have -580, too, unless rejected on review.
HI,

Agree that there are decisions required on what functionality the installation script is to provide.
Its philosophical decision.
As the "desktop" script is intended to be used by the novice & beginner FreeBSD user, to enable the user to get a KDE desktop up and running,
we cant assume that that user is knowledgeable enough to discern what extra features may be needed.
the Killer APP that needs "linux-nvidia-libs " is astro/google-earth.
so I expect the LINUX side of Nvidia-Graphics needs to be operational . Setting up linprocfs and linsysfs is for completing the linux environment.

Most of the time Auto configuration of Nvidia card works now.
nvidia-xconfig will not do anything unless the user actually need to use it. ( explaining the splitted Nvidia configs to novice user would be a challenge )

The point about the 590 drivers have merit for the "desktop" script. If FreeBSD 5.1 release coincides with 590 drivers release , this needs to be allowed for in the script .

Regards
 
the Killer APP that needs "linux-nvidia-libs " is astro/google-earth.
Currently exisitng port is astro/google-earth-pro, but it doesn't depend on x11/linux-nvidia-libs* by default, and no options are provided.
Does it auto-detect Linux NVIDIA libraries if installed?

And Linuxulator requires additional disk spaces, thus, it's not clear that user's resources allow Linuxulator to be installed in conjunction with already-huge KDE plasma or not.
If (automatically or manually) chosen GPU is cached, asking whether the user want Linux emulation (Linuxulator) or not and install x11/linux-nvidia-libs corresponding to native counterparts if the user prefer installing Linuxulator could help in some resource-restricted cases.

nvidia-xconfig will not do anything unless the user actually need to use it. ( explaining the splitted Nvidia configs to novice user would be a challenge )
Exactly.

And for 590 and later, the largest impact would be that a bunch of old GPUs (pre-Turing generations of architecuture) are dropped from supported GPUs.
So -580 legacy version is needed once master ports switch to 590 or later.
(Currently -devel variant alone is 590 series and warnings are in UPDATING dated 20260103.)
Note that 580 series is still the Production Branch and not yet considered as "Legacy Branch".
 
Currently exisitng port is astro/google-earth-pro, but it doesn't depend on x11/linux-nvidia-libs* by default, and no options are provided.
Does it auto-detect Linux NVIDIA libraries if installed?

And Linuxulator requires additional disk spaces, thus, it's not clear that user's resources allow Linuxulator to be installed in conjunction with already-huge KDE plasma or not.
If (automatically or manually) chosen GPU is cached, asking whether the user want Linux emulation (Linuxulator) or not and install x11/linux-nvidia-libs corresponding to native counterparts if the user prefer installing Linuxulator could help in some resource-restricted cases.
In my experience , GPU accelerated images is not operational if linux-nvidia-libs is not installed.
the program runs but uses CPU to draw Images /3D- buildings
Walking the streets of New York becomes impossible.
 
Ok, I will solve the problem by adding a question to the user with nvidia: "Do you want to install extra useful packages to configure the GPU and to run tools that require compatibility with linux (example google-earth-pro)?" (Actually, I was planning to add the add-ons to the script in the future, but that's fine, I can add something now as well.)

drsnx60 I did a quick check, I seem google-earth-pro depends on packages with Linux compatibility, but linux-nvidia-libs isn't a dependency. However, this is not a problem. For the moment, I will keep linux-nvidia-libs in the list of extra packages to install.

Could you please confirm definitively whether google-earth-pro only works when linux-nvidia-libs is installed? If possible, try running it once with linux-nvidia-libs uninstalled, and then again after installing linux-nvidia-libs, and let me know the result.

If linux-nvidia-libs turns out to be necessary, could you also share a few details about your system? In particular:
  • your NVIDIA GPU model
  • FreeBSD version
  • the installed NVIDIA driver (probably 580)

This will help me add a comment to the script so other developers can check it as well, and hopefully we can find the best solution.

Thanks in advance.
 
I suspect I saw whats going on a short while ago.
If you install google-earth-pro before linux-nvidia-libs the OPENGL calls are handled by the :
linux-rl9-libglvnd driver and not the NVIDIA driver.
See:
https://www.freshports.org/graphics/linux-rl9-libglvnd/

There is actually a message during google-earth-pro installation complaining that linux-rl9-libglvnd conflicts
with linux-nvidia-libs. But the installation continues after a short pause.

Anyway , you dont want the " vendor-neutral GL emulator " if you have a real NVIDIA Hardware on the machine.

So Linux-Nvidia-Libs needs to be installed first.

Presently I have several NVidia Boards that all are supported by the 580 driver.
Quadro1000 Mobile, Quadro P2000, Quadro RTX 4000, RTX 4000 ADA, Geforce RXT3060 , Geforce RTX4060
all in different machines. I dont have any ancient Nvidia boards , although the Pascal and Turing ones probably will be antiquated by the upcoming 590 drivers.
 
We can see below whats going on.

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


Staging for linux-rl9-libglvnd-1.3.4_1
===> linux-rl9-libglvnd-1.3.4_1 depends on package: linux-rl9-xorg-libs>=7.7 - found
===> Generating temporary packing list
(cd /usr/ports/graphics/linux-rl9-libglvnd/work/linux-rl9-libglvnd-1.3.4_1 && /usr/bin/find * -not -path 'usr/lib/.build-id*' | /usr/bin/cpio -dumpl --qu
iet /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux)
[ ! -e /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/bin -o -L /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/bin ] || (
cd /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux && /usr/bin/find bin | /usr/bin/cpio -dumpl --quiet usr && /bin/rm -f -r bin)
[ ! -e /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/lib -o -L /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/lib ] || (
cd /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux && /usr/bin/find lib | /usr/bin/cpio -dumpl --quiet usr && /bin/rm -f -r lib)
[ ! -e /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/lib64 -o -L /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/lib64 ] |
| (cd /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux && /usr/bin/find lib64 | /usr/bin/cpio -dumpl --quiet usr && /bin/rm -f -r lib64)
[ ! -e /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/sbin -o -L /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/sbin ] ||
(cd /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux && /usr/bin/find sbin | /usr/bin/cpio -dumpl --quiet usr && /bin/rm -f -r sbin)
[ ! -e /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/usr/share/icons -o -L /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linu
x/usr/share/icons ] || (cd /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/usr/share && /usr/bin/find icons | /usr/bin/cpio -dumpl --quie
t /usr/ports/graphics/linux-rl9-libglvnd/work/stage/usr/local/share && /bin/rm -f -r icons)
/bin/rmdir /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/usr/lib /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/usr/lib64
|| true
rmdir: /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/usr/lib: Directory not empty
rmdir: /usr/ports/graphics/linux-rl9-libglvnd/work/stage/compat/linux/usr/lib64: Directory not empty
====> Compressing man pages (compress-man)
===> Installing for linux-rl9-libglvnd-1.3.4_1

===> linux-rl9-libglvnd-1.3.4_1 conflicts with installed package(s):
linux-nvidia-libs-580.126.18
linux-nvidia-libs-580.126.18


They install files into the same place.
You may want to stop build with Ctrl + C.
===> Checking if linux-rl9-libglvnd is already installed
===> Registering installation for linux-rl9-libglvnd-1.3.4_1 as automatic
Installing linux-rl9-libglvnd-1.3.4_1...
===> linux-rl9-dri-25.0.7_1 depends on package: linux-rl9-libglvnd>0 - found
===> Returning to build of linux-rl9-dri-25.0.7_1
===> linux-rl9-dri-25.0.7_1 depends on package: linux-rl9-llvm>0 - not found
 
Started the day with testing Google-earth-pro with and without linux-nvidia-libs.

Test Hardware : SHuttle SH570r6 desktop. I7-11700K cpu , Geforce RTX3060 GPU. 64 GB RAM.
FreeBSD 15.0-STABLE stable/15-n282599-9712b5e4b58b sh570r6 amd64


With linux-nvidia-libs I have a CPU load of less then 10 % , GPU load between 20-50 %

then, deinstalled linux-nvidia-libs & restarting google-earth.

Without linux-nvidia-libs the CPU load is 70-80 % and the Desktop Fan is doing highspeed and making considerable noise,
I still see GPU load 20-40% but the display from google-earth-pro is sluggish to non responsive to input.

After Reinstalling the linux-nvidia-libs and restarting google-earth the program performs normally again and CPU load is low.

its clear that the linux-nvidia-libs allows google-earth-pro to utilize the computer in a much better way.
 
A Port Config OPTION for graphics/linux-rl9-dri to install x11/linux-nvida-libs ( off by default) would give the system administrator the chance to take the decision to install x11/linux-nvidia-libs , depending on the circumstance if a Nvidia Card exists in the Computer.
 
Yesterday , I did a test run of the KDE-Desktop installer .
The NVIDIA related directives was correctly placed in /boot/loader.conf end /etc/rc.conf , and SDDM was launched on next reboot. All Good.

For the Linux environment installation. I realised that its not possible to install emulators/linux-base-rl9 without first loading the linux kernel drivers. ( eg " kldload linux linux64 " command needs to be issued before adding the packages. )
 
Back
Top