Trying to run KDE 6 Plasma with Wayland....

… 560.28.03 … could it work to install it directly ?

NVIDIA's download page wrongly states:

tar xzf NVIDIA-FreeBSD-x86_64-560.28.03.tar.gz && cd NVIDIA-FreeBSD-x86_64-560.28.03 && make install

Instead:

tar xzf NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz && cd NVIDIA-FreeBSD-x86_64-560.28.03 && make install

In the README, under Installing the NVIDIA Driver:

… your /boot/loader.conf file will be updated to automatically load the NVIDIA kernel module on boot, …

This is false.

Also, be prepared to take non-pkg approach to removal.

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # make install clean
===> src (install)
===> src/nvidia (install)
install -T release -o root -g wheel -m 444   nvidia.ko /boot/modules/
kldxref /boot/modules
===> src/nvidia-modeset (install)
install -T release -o root -g wheel -m 444   nvidia-modeset.ko /boot/modules/
kldxref /boot/modules
===> lib (install)
===> lib/libGLX_nvidia (install)
===> lib/libnvidia-tls (install)
===> lib/libnvidia-cfg (install)
===> lib/libnvidia-glcore (install)
===> lib/libnvidia-gpucomp (install)
===> lib/libnvidia-gtk2 (install)
===> lib/libnvidia-gtk3 (install)
===> lib/libnvidia-wayland-client (install)
===> lib/libvdpau_nvidia (install)
===> lib/libnvidia-glvkspirv (install)
===> lib/libnvidia-eglcore (install)
===> lib/libnvidia-glsi (install)
===> lib/libEGL_nvidia (install)
===> lib/libGLESv2_nvidia (install)
===> lib/libGLESv1_CM_nvidia (install)
===> lib/libnvidia-egl-wayland (install)
===> lib/libnvidia-ml (install)
===> lib/libnvidia-egl-gbm (install)
===> lib/libnvidia-allocator (install)
ln -sf /usr/local/lib/libnvidia-allocator.so.1 /usr/local/lib/gbm/nvidia-drm_gbm.so
===> x11 (install)
===> x11/driver (install)
===> x11/extension (install)
===> x11/bin (install)
===> x11/man (install)
===> doc (install)
===> nvml (install)
===> nvml/bin (install)
===> nvml/man (install)
===> firmware (install)
===> firmware/gsp_tu10x (install)
install -T release -o root -g wheel -m 444   nvidia_gsp_tu10x_fw.ko /boot/modules/
kldxref /boot/modules
===> firmware/gsp_ga10x (install)
install -T release -o root -g wheel -m 444   nvidia_gsp_ga10x_fw.ko /boot/modules/
kldxref /boot/modules
kld_list:  -> nvidia
kld_list: nvidia -> nvidia nvidia-modeset

Installation of the NVIDIA Accelerated Graphics Driver
560.28.03 for FreeBSD is now complete.  You can now
run the nvidia-xconfig utility to automatically update
your X server configuration file.  Please see the README
for details if you wish to update your X configuration
file manually.

===> src (clean)
===> src/nvidia (clean)
===> src/nvidia-modeset (clean)
===> lib (clean)
===> lib/libGLX_nvidia (clean)
===> lib/libnvidia-tls (clean)
===> lib/libnvidia-cfg (clean)
===> lib/libnvidia-glcore (clean)
===> lib/libnvidia-gpucomp (clean)
===> lib/libnvidia-gtk2 (clean)
===> lib/libnvidia-gtk3 (clean)
===> lib/libnvidia-wayland-client (clean)
===> lib/libvdpau_nvidia (clean)
===> lib/libnvidia-glvkspirv (clean)
===> lib/libnvidia-eglcore (clean)
===> lib/libnvidia-glsi (clean)
===> lib/libEGL_nvidia (clean)
===> lib/libGLESv2_nvidia (clean)
===> lib/libGLESv1_CM_nvidia (clean)
===> lib/libnvidia-egl-wayland (clean)
===> lib/libnvidia-ml (clean)
===> lib/libnvidia-egl-gbm (clean)
===> lib/libnvidia-allocator (clean)
===> x11 (clean)
===> x11/driver (clean)
===> x11/extension (clean)
===> x11/bin (clean)
===> x11/man (clean)
===> doc (clean)
===> nvml (clean)
===> nvml/bin (clean)
===> nvml/man (clean)
===> firmware (clean)
===> firmware/gsp_tu10x (clean)
rm -f nvidia_gsp_tu10x_fw.c export_syms machine x86 i386 nvidia_gsp_tu10x_fw.ko nvidia_gsp_tu10x_fw.kld gsp_tu10x.bin.fwo nvidia_gsp_tu10x_fw.o opt_global.h
===> firmware/gsp_ga10x (clean)
rm -f nvidia_gsp_ga10x_fw.c export_syms machine x86 i386 nvidia_gsp_ga10x_fw.ko nvidia_gsp_ga10x_fw.kld gsp_ga10x.bin.fwo nvidia_gsp_ga10x_fw.o opt_global.h
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # freebsd-version -kru ; uname -mvKU
14.1-RELEASE-p2
14.1-RELEASE-p2
14.1-RELEASE-p2
FreeBSD 14.1-RELEASE-p2 releng/14.1-n267684-1eba659e2f68 GENERIC amd64 1401000 1401000
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # less /boot/loader.conf
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # cat /boot/loader.conf
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # sysrc kld_list
kld_list: nvidia nvidia-modeset
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # pkg iinfo nvidia
pkg: No package(s) matching nvidia
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # make deinstall
make: don't know how to make deinstall. Stop

make: stopped in /tmp/NVIDIA-FreeBSD-x86_64-560.28.03
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #
 
NVIDIA's download page wrongly states:

tar xzf NVIDIA-FreeBSD-x86_64-560.28.03.tar.gz && cd NVIDIA-FreeBSD-x86_64-560.28.03 && make install

Instead:

tar xzf NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz && cd NVIDIA-FreeBSD-x86_64-560.28.03 && make install

In the README, under Installing the NVIDIA Driver:



This is false.

Also, be prepared to take non-pkg approach to removal.

Code:
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # make install clean
===> src (install)
===> src/nvidia (install)
install -T release -o root -g wheel -m 444   nvidia.ko /boot/modules/
kldxref /boot/modules
===> src/nvidia-modeset (install)
install -T release -o root -g wheel -m 444   nvidia-modeset.ko /boot/modules/
kldxref /boot/modules
===> lib (install)
===> lib/libGLX_nvidia (install)
===> lib/libnvidia-tls (install)
===> lib/libnvidia-cfg (install)
===> lib/libnvidia-glcore (install)
===> lib/libnvidia-gpucomp (install)
===> lib/libnvidia-gtk2 (install)
===> lib/libnvidia-gtk3 (install)
===> lib/libnvidia-wayland-client (install)
===> lib/libvdpau_nvidia (install)
===> lib/libnvidia-glvkspirv (install)
===> lib/libnvidia-eglcore (install)
===> lib/libnvidia-glsi (install)
===> lib/libEGL_nvidia (install)
===> lib/libGLESv2_nvidia (install)
===> lib/libGLESv1_CM_nvidia (install)
===> lib/libnvidia-egl-wayland (install)
===> lib/libnvidia-ml (install)
===> lib/libnvidia-egl-gbm (install)
===> lib/libnvidia-allocator (install)
ln -sf /usr/local/lib/libnvidia-allocator.so.1 /usr/local/lib/gbm/nvidia-drm_gbm.so
===> x11 (install)
===> x11/driver (install)
===> x11/extension (install)
===> x11/bin (install)
===> x11/man (install)
===> doc (install)
===> nvml (install)
===> nvml/bin (install)
===> nvml/man (install)
===> firmware (install)
===> firmware/gsp_tu10x (install)
install -T release -o root -g wheel -m 444   nvidia_gsp_tu10x_fw.ko /boot/modules/
kldxref /boot/modules
===> firmware/gsp_ga10x (install)
install -T release -o root -g wheel -m 444   nvidia_gsp_ga10x_fw.ko /boot/modules/
kldxref /boot/modules
kld_list:  -> nvidia
kld_list: nvidia -> nvidia nvidia-modeset

Installation of the NVIDIA Accelerated Graphics Driver
560.28.03 for FreeBSD is now complete.  You can now
run the nvidia-xconfig utility to automatically update
your X server configuration file.  Please see the README
for details if you wish to update your X configuration
file manually.

===> src (clean)
===> src/nvidia (clean)
===> src/nvidia-modeset (clean)
===> lib (clean)
===> lib/libGLX_nvidia (clean)
===> lib/libnvidia-tls (clean)
===> lib/libnvidia-cfg (clean)
===> lib/libnvidia-glcore (clean)
===> lib/libnvidia-gpucomp (clean)
===> lib/libnvidia-gtk2 (clean)
===> lib/libnvidia-gtk3 (clean)
===> lib/libnvidia-wayland-client (clean)
===> lib/libvdpau_nvidia (clean)
===> lib/libnvidia-glvkspirv (clean)
===> lib/libnvidia-eglcore (clean)
===> lib/libnvidia-glsi (clean)
===> lib/libEGL_nvidia (clean)
===> lib/libGLESv2_nvidia (clean)
===> lib/libGLESv1_CM_nvidia (clean)
===> lib/libnvidia-egl-wayland (clean)
===> lib/libnvidia-ml (clean)
===> lib/libnvidia-egl-gbm (clean)
===> lib/libnvidia-allocator (clean)
===> x11 (clean)
===> x11/driver (clean)
===> x11/extension (clean)
===> x11/bin (clean)
===> x11/man (clean)
===> doc (clean)
===> nvml (clean)
===> nvml/bin (clean)
===> nvml/man (clean)
===> firmware (clean)
===> firmware/gsp_tu10x (clean)
rm -f nvidia_gsp_tu10x_fw.c export_syms machine x86 i386 nvidia_gsp_tu10x_fw.ko nvidia_gsp_tu10x_fw.kld gsp_tu10x.bin.fwo nvidia_gsp_tu10x_fw.o opt_global.h
===> firmware/gsp_ga10x (clean)
rm -f nvidia_gsp_ga10x_fw.c export_syms machine x86 i386 nvidia_gsp_ga10x_fw.ko nvidia_gsp_ga10x_fw.kld gsp_ga10x.bin.fwo nvidia_gsp_ga10x_fw.o opt_global.h
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # freebsd-version -kru ; uname -mvKU
14.1-RELEASE-p2
14.1-RELEASE-p2
14.1-RELEASE-p2
FreeBSD 14.1-RELEASE-p2 releng/14.1-n267684-1eba659e2f68 GENERIC amd64 1401000 1401000
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # less /boot/loader.conf
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # cat /boot/loader.conf
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # sysrc kld_list
kld_list: nvidia nvidia-modeset
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # pkg iinfo nvidia
pkg: No package(s) matching nvidia
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 # make deinstall
make: don't know how to make deinstall. Stop

make: stopped in /tmp/NVIDIA-FreeBSD-x86_64-560.28.03
root@fourteen-pkgbase:/tmp/NVIDIA-FreeBSD-x86_64-560.28.03 #

Can you edit post #226,adding a "line spacing" between a "root@fourteen-pkgbase" and the other ? thanks.
 
I'm inside the VM and I tried to remove the old nvidia driver and install the newest one. I get some errors even if the driver is installed correctly...

Code:
root@marietto:/home/marietto # sudo kldunload nvidia-modeset

kldunload: can't unload file: Device busy

root@marietto:/home/marietto # sudo kldunload nvidia

kldunload: can't unload file: Device busy

root@marietto:/home/marietto # sudo pkg remove -y nvidia-driver nvidia-settings nvidia-xconfig

No packages matched for pattern 'nvidia-xconfig'

Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 3 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
 nvidia-driver: 550.54.14
 nvidia-drm-510-kmod: 550.54.14_1
 nvidia-settings: 535.146.02_1

Number of packages to be removed: 3

The operation will free 288 MiB.
[1/3] Deinstalling nvidia-drm-510-kmod-550.54.14_1...
[1/3] Deleting files for nvidia-drm-510-kmod-550.54.14_1: 100%
[2/3] Deinstalling nvidia-settings-535.146.02_1...
[2/3] Deleting files for nvidia-settings-535.146.02_1: 100%
[3/3] Deinstalling nvidia-driver-550.54.14...
[3/3] Deleting files for nvidia-driver-550.54.14: 100%
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types

root@marietto:/home/marietto/Desktop # cd
NVIDIA-FreeBSD-x86_64-560.28.03/

FreeBSD-x86_64-560.28.03 # make

ok

root@marietto:/home/marietto/Desktop/NVIDIA-FreeBSD-x86_64-560.28.03 # make install

===> src (install)
===> src/nvidia (install)
install -T release -o root -g wheel -m 444   nvidia.ko /boot/modules/
kldxref /boot/modules
===> src/nvidia-modeset (install)
install -T release -o root -g wheel -m 444   nvidia-modeset.ko /boot/modules/
kldxref /boot/modules
===> lib (install)
find: /compat/linux/usr/X11R6/lib: No such file or directory
find: /compat/linux/usr/X11R6/lib: No such file or directory
find: /compat/linux/usr/X11R6/lib: No such file or directory

Istantanea_2024-08-06_16-01-36.png
 
Update :

Below you can see that the new nvidia driver does not provide the module nvidia-drm.ko even if the driver 560 can be used (it happens inside the vm),while my host that run the old driver,can load it. Without this module,kde6 will not work for sure.

Istantanea_2024-08-06_16-11-40.png


Istantanea_2024-08-06_16-12-30.png


Istantanea_2024-08-06_16-21-23.png
 
I already have 550.54.14 and I see the bug. So,I'm looking for informations about how to upgrade it to 560. Or better,about how can I produce the nvidia-drm.ko module because I've installed the 560 and it is working.
 
As you're already doing very complicated (GPU passthrough and so on), I thought you already know what/how to do this basic, really basic thing.

Puuting it aside,
  • you need REALLY ONE OF graphics/nvidia-drm-*-kmod port installed for /boot/modules/nvidia-drm.ko,
  • graphics/nvidia-drm-kmod chooses the one which best fits with your base FreeBSD version at fresh installation,
  • graphics/nvidia-drm-*-kmod doenn't build with legacy drivers,
  • graphics/nvidia-drm-*-kmod must be in sync with x11/nvidia-driver and installed/running kernel.
Keep the above in mind, you can (basically) override the version of x11/nvidia-driver (and x11/linux-nvidia-libs) to be built (via ports) by setting DISTVERSION variable and adding -DNO_CHECKSUM option like make DISTVERSION=560.28.03 -DNO_CHECKSUM.
But for graphics/nvidia-drm-*-kmod ports, this overriding with DISTVERSION variable actually does not work with some reason that neither ashafer and I could determine why.
The only way is to edit x11/nvidia-driver/Makefile.version file. Option -DNO_CHECKSUM is still needed.

This works for 560.28.03 (and will even newer) beta driver, UNLESS YOU ARE USING GPUs Turing OR NEWER ARCHITECTURES. 560 series of drivers added 2 new kernel modules for GSP firmware and need a patch to install them. I've already instrduced it in another thread.

And another note. If you are going to build graphics/nvidia-drm-[515|61]-kmod on stable/14 or 14.1, patch on PR 279539 is mandatory (unfortunately, not yet landed on ports tree).

And the final note. I'm neither nvidia insider, committer nor ports maintainer. Just filing PRs for update when I found something required but no one seems to be working on at the moment, of course only when it is possible for me.
 
Keep the above in mind, you can (basically) override the version of x11/nvidia-driver (and x11/linux-nvidia-libs) to be built (via ports) by setting DISTVERSION variable and adding -DNO_CHECKSUM option like make DISTVERSION=560.28.03 -DNO_CHECKSUM.
But for graphics/nvidia-drm-*-kmod ports, this overriding with DISTVERSION variable actually does not work with some reason that neither ashafer and I could determine why.
The only way is to edit x11/nvidia-driver/Makefile.version file. Option -DNO_CHECKSUM is still needed.


Istantanea_2024-08-06_23-16-53.png
 
Code:
# cd /usr/ports/x11/nvidia-driver

# nano Makefile
DISTVERSION?= 560.28.03

# make -DNO_CHECKSUM
# make install
OK

# cd /usr/ports/x11/linux-nvidia-libs

# nano Makefile
DISTVERSION?= 560.28.03

# make -DNO_CHECKSUM
# make install
OK

# cd /usr/ports/x11/nvidia-driver/

# nano Makefile.version
NVIDIA_DISTVERSION = 560.28.03

# make -DNO_CHECKSUM
# make install
OK
 
No.
Look deeeeeeply in your screen shot.
With some reason, gsed seems attempted to be fetched with invalid (same as which you're attempting to fetch for x11/nvidia-driver) version.

Make looking the whole log (this case, only last part are shown in screen shot, though) from the command you invoked through the end your habit.
I can't see from which directory you invoked what command line.
So cannot determine what's the problem.

For me, with intentionally deleted distfile of x11/nvidia-driver 560.28.03,
Code:
/usr/ports/x11/nvidia-driver# make DISTVERSION=560.28.03 -DNO_CHECKSUM fetch
===>  License NVIDIA accepted by the user
===>   nvidia-driver-560.28.03 depends on file: /usr/local/sbin/pkg - found
=> NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://jp.download.nvidia.com/XFree86/FreeBSD-x86_64/560.28.03/NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz
NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz                 186 MB 4328 kBps    44s
===> Fetching all distfiles required by nvidia-driver-560.28.03 for building
/usr/ports/x11/nvidia-driver#
Fetch finished successfully.
 
# cd /usr/ports/x11/nvidia-driver

# nano Makefile
DISTVERSION?= 560.28.03

# make -DNO_CHECKSUM
# make install
OK
You need restoring original Makefile if its whole content is just the above.

DISTVERSION should be set on command line (or editing x11/nvidia-driver/Makefike.version, NOT x11/nvidia-driver/Makefike) as I described my previous post. Note that in x11/nvidia-driver/Makefike.version, the variable name is NVIDIA_DISTVERSION.
This is not to directly affect with legacy drivers.
This overriding mechanism is basically to share the same x11/nvidia-driver/Makefile with itself and legacy drivers. We can just abuse it to try newer drivers.
 
Refresh the webpage and give a look at the procedure followed on post #237. I've got no errors,so probably I did everything correctly. Now the problem is that it hasn't created any nvidia-drm.ko file.

--> And another note. If you are going to build graphics/nvidia-drm-[515|61]-kmod on stable/14 or 14.1, patch on PR 279539 is mandatory (unfortunately, not yet landed on ports tree).

Now I'm going to compile the port graphics/nvidia-drm-61-kmod. I'm using FreeBSD-14.1-RELEASE-p2,do I need the patch ? You said that it is for stable,but I'm running RELEASE ;)
 
Now I'm going to compile the port graphics/nvidia-drm-61-kmod. I'm using FreeBSD-14.1-RELEASE-p2,do I need the patch ? You said that it is for stable,but I'm running RELEASE
Yes. You need the patch.
I've written stable/14 AND 14.1. 14.1 means 14.1-Release[-p*], as there is no stable/14.1 branch. From stable/14 branch, releng/14.1 branch was branched. 14.1-Release and following -p* patch releases are built using releng/14.1 branch.
 
Unfortunately it went bad...

View attachment 19914
First of all, don't attempt to try make makesum. This case, it would be harmless, but for some ports like x11/nvidia-driver which have slave ports and distinfo contains informations for itself and all slave ports, it completely breaks ALL informations EXCEPT the one which you are attempting.
Option -DNO_CHECKSUM for make is for ignoring distinfo.

And is your ports tree up-to-date (at least commit 307f75413336d33a6570616e5e2af3b659e2951d or newer) main branch?
If not, or you are on quarterly (currently 2024Q3), you need another patch on Phablicator Differential Revision D45400. You can display it by clicking Actions button, choosing Download Raw Diff menu item, then, you can save page with your browser.
The above-mentioned commit is which it landed on ports main branch.
Not yet merged into 2024Q4 (unlikely).
 
This is the original file to patch :

original.png


This is how the file looks after that I have applied the patch :

patched.png


and this is the error I get :

error.png
 
Back
Top