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

I've compiled the nvidia-drm-515-kmod instead of the nvidia-drm-61-kmod and it has been accepted.

Istantanea_2024-08-11_16-13-05.png
 
everything is ok ? Do I need to apply your new patch ? It seems that nvidia-drm.ko does not support 14.1-RELEASE,but it works on the 14.0.
No need to apply my new patch, as the result indicates all 3 modules are of 560.28.03. My new (correct) patch fixes the issue for pre-560 series of drivers only. To be honest, I've missingly uploaded from wrong directory where I've backed up the previous patch before fixing the issue.

And both 560.28.03 and updated 560.31.02 drivers are running fine on stable/14, commit 644d81447118. Updated driver to 560.31.02 after confirming 560.28.03 is OK. Loading nvidia-drm.ko via kld_list variable in /etc/rc.conf (nvidia-modeset.ko, nvidia.ko and other dependencies are automatically pulled in) and having hw.nvidiadrm.modeset=1 in /boot/loader.conf.

And note that graphics/nvidia-drm-61-kmod should not run on 14.0-Release, but should run on 14.1-Release, as I've noted before.

Another note is that linker.hints should be regenerated on boot, as /etc/default/rc.conf has kldxref_enable="YES" and /etc/rc.d/kldxref does the job.
 
I've compiled the nvidia-drm-515-kmod instead of the nvidia-drm-61-kmod and it has been accepted.

View attachment 20008
Metaports graphics/drm-kmod and graphics/nvidia-drm-kmod chooses basically the newest supported version for running base. So for 14.1, 61 is selected. This is because newer version of (non-nvidia) DRM driver has usually wider range of supported CPUs (iGPUs). So if your CPU is properly supported by 515, it would work, theoretically.
 
Metaports graphics/drm-kmod and graphics/nvidia-drm-kmod chooses basically the newest supported version for running base. So for 14.1, 61 is selected. This is because newer version of (non-nvidia) DRM driver has usually wider range of supported CPUs (iGPUs). So if your CPU is properly supported by 515, it would work, theoretically.

There is no definitive evidence that drm-61 will work on 14.1 unless someone tries your procedure on that system.
 
There is no definitive evidence that drm-61 will work on 14.1 unless someone tries your procedure on that system.
It is just working here, not Wayland, though.
xorg+Mate+Compiz, on the hardware I've posted link to probe on this thread.
Code:
% pkg version -v | rg 'nvidia'
linux-nvidia-libs-560.31.02        =   up-to-date with index
nvidia-driver-560.31.02            =   up-to-date with index
nvidia-drm-61-kmod-560.31.02_1     =   up-to-date with index
nvidia-drm-kmod-550.107.02         >   succeeds index (index has 550.54.14)
nvidia-settings-535.146.02_1       =   up-to-date with index
nvidia-xconfig-525.116.04          =   up-to-date with index
% pkg version -v | rg 'drm'   
drm-61-kmod-6.1.92                 =   up-to-date with index
libdrm-2.4.122,1                   =   up-to-date with index
linux-c7-libdrm-2.4.97             =   up-to-date with index
nvidia-drm-61-kmod-560.31.02_1     =   up-to-date with index
nvidia-drm-kmod-550.107.02         >   succeeds index (index has 550.54.14)

This is exactly what I'm writing this post.
Again, it IS working.
Note that I've not always upgrade graphics/nvidia-drm-kmod metaport, as the port itself does not install driver components at all, so it is left at 550.107.02, when I tried deletion and reinstallation of nvidia-drm*-kmod ports. graphics/drm-kmod port is not installed, because graphics/nvidia-drm-61-kmod directly pulls in graphics/drm-61-kmod as its dependency.
(Of course, all kmods are built locally here.)

So what is remaining is someone to try with Wayland.

If it become clear to be OK, the remainder would be KDE6 side, or your environment is on VM, or GPU model specific.

Maybe there would be nothing more what I can do for you, until I consider KDE6 worth and safe to try. It would be when default KDE is switched from KDE5 to KDE6. Or I could find complete or better alternative of compiz Mag plugin, which would motivate me to try Wayland again.
 
...Anyway I didn't want a sooo big picture.

---> Maybe there would be nothing more what I can do for you...

please don't tell that you are doing something for ME. I think it's more correct to tell that WE are doing something to help also the other users. I'm included for sure,but are included also a LOT of different users will get benefit from our hard work. It's not just something between you and me only. Do you agree that this interpretation is more correct ?
 
So what is remaining is someone to try with Wayland.
Wayland is rather fragmented

You have several different compositors ( there are others but these are the main ones )

Gnome
KDE
wlroots

and to complicate things further window managers that use wlroots can implement different wayland protocols

for example labwc implements some wayland protocols that dwl doesnt ( like foreign top level management )

so testing wayland using wlroots may not mean that kde and wayland will work
because kde will implement different wayland protocols than window managers using wlroots
 
---> So what is remaining is someone to try with Wayland.

this statement seems to be false. What's remaining is also to try with FreeBSD 14.1. You tried with 14.0 BUT I haven't used it at all.
 
might be easier if you break it down in parts

1 - freebsd version

what version of freebsd are you running

14
14.1
14.1 p3

2 - nvidia-driver version

whats the nvidia driver version

nvidia-driver-550.54.14

3 - nvidia-drm version

whats the nvidia drm version

nvidia-drm-515-kmod-550.54.14_1

4 - nvidia card

what nvidia card are you using and are there any issue with the driver

my output

Code:
pkg version -v | rg 'nvidia'

Code:
libva-nvidia-driver-0.0.12         =   up-to-date with port
linux-nvidia-libs-550.54.14        =   up-to-date with port
nvidia-driver-550.54.14            =   up-to-date with port
nvidia-drm-515-kmod-550.54.14_1    =   up-to-date with port
nvidia-settings-535.146.02_1       =   up-to-date with port

Code:
wlroots-0.17.4                 Modular Wayland compositor library

i have only been using Wayland since i switched back to Freebsd 8 months ago

these are the wayland wlroots compositor i have managed to get to work

dwl
wayfire
labwc
hikari
river

one of the settings recommend for KDE is adding the following to /boot/loader.conf

Code:
hw.nvidiadrm.modeset="1"

however that setting doesnt work with dwl
which brings me back to the point of different wayland desktops and window manager using different settings

running Freebsd 14.1 p3
 
then there are the issue getting kde and nvidia to work

1 -what is the command you use to start kde

you have to start kde from a tty because the gui login screen doesnt work with wayland

so what is the correct command to start
dbus
consolekit
startplasma-wayland

Code:
exec dbus-launch --exit-with-session ck-launch-session startplasma-wayland

2 - qt6 and wayland packages

what are the qt6 packages needed

Code:
qt6-wayland-6.7.2              Qt6 wrapper for Wayland

Code:
egl-wayland-1.1.13             EGLStream-based Wayland external platform

3 - hw.nvidiadrm.modeset

Code:
/boot/loader.conf

Code:
hw.nvidiadrm.modeset="1"

4 - environmental variables


Code:
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia

Code:
export QT_QPA_PLATFORMTHEME=qt6ct
export QT_QPA_PLATFORM=wayland

export LIBSEAT_BACKEND=consolekit2

lots of different permutations to test

i have run qt based applications in an ubuntu jail and displayed the window on the Freebsd host
by setting the following in the ~/.zshenv file in the Ubuntu jail

Code:
export QT_QPA_PLATFORM=wayland

my hunch is the running KDE using Wayland is either to do with the way kde is started using the dbus, consolekit and the startplasma-wayland script
or that an environmental variable that needs to be set for Nvidia

might be an idea to post the contents of the startplasma-script to see if that where the issue is
 
then there are the issue getting kde and nvidia to work

1 -what is the command you use to start kde

you have to start kde from a tty because the gui login screen doesnt work with wayland

so what is the correct command to start
dbus
consolekit
startplasma-wayland

Code:
exec dbus-launch --exit-with-session ck-launch-session startplasma-wayland

2 - qt6 and wayland packages

what are the qt6 packages needed

Code:
qt6-wayland-6.7.2              Qt6 wrapper for Wayland

Code:
egl-wayland-1.1.13             EGLStream-based Wayland external platform

3 - hw.nvidiadrm.modeset

Code:
/boot/loader.conf

Code:
hw.nvidiadrm.modeset="1"

4 - environmental variables


Code:
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia

Code:
export QT_QPA_PLATFORMTHEME=qt6ct
export QT_QPA_PLATFORM=wayland

export LIBSEAT_BACKEND=consolekit2

lots of different permutations to test

i have run qt based applications in an ubuntu jail and displayed the window on the Freebsd host
by setting the following in the ~/.zshenv file in the Ubuntu jail

Code:
export QT_QPA_PLATFORM=wayland

my hunch is the running KDE using Wayland is either to do with the way kde is started using the dbus, consolekit and the startplasma-wayland script
or that an environmental variable that needs to be set for Nvidia

might be an idea to post the contents of the startplasma-script to see if that where the issue is

Man. I've already been able to make work KDE6 and Wayland. I know what are the working parameters. I'm sure that it will work even with an nvidia GPU. Maybe some minor adjustements will be needed. Im pretty sure that it does not work because the bug that I have shown more times. I have even started a discussion on the nvidia forum,exposing that bug,but no one replied. Even on the FreeBSD / KDE ML,no one told anything :

 
Man. I've already been able to make work KDE6 and Wayland. I know what are the working parameters. I'm sure that it will work even with an nvidia GPU. Maybe some minor adjustements will be needed. Im pretty sure that it does not work because the bug that I have shown more times. I have even started a discussion on the nvidia forum,exposing that bug,but no one replied. Even on the FreeBSD / KDE ML,no one told anything :

i get you have it working on your other machine which doesnt use nvidia

have you seen this thread


from that page ( i changed the path to the freebsd path for the file )

Code:
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/local/share/glvnd/egl_vendor.d/10_nvidia.json eglinfo -B

do you have this installed

Code:
egl-wayland-1.1.13

just mention it since your error had egl in it so thought it might be realted

 
i get you have it working on your other machine which doesnt use nvidia

have you seen this thread


from that page ( i changed the path to the freebsd path for the file )

Code:
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/local/share/glvnd/egl_vendor.d/10_nvidia.json eglinfo -B

do you have this installed

Code:
egl-wayland-1.1.13

just mention it since your error had egl in it so thought it might be realted


The error is :

Code:
No provider of glEGLImageTargetTexture2DOES found.  Requires one of:     GL extension "GL_OES_EGL_image"

I see that it is related to the libglamoregl.so library (glamor).
 
the reason i mention __EGL_VENDOR_LIBRARY_FILENAMES
is because its something i have used in the past with da vinci resolve and nvidia

the issue was you couldnt drag video clips into the timeline because of an issue with the gpu

thats one of the fixes for nvidia issues i have come across

the other fix was

Code:
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
 
I think that's a good idea to put the exact keywords of the error on the google search bar,otherwise we take wrong roads.

I see that it is related to the libglamoregl.so library (glamor).
 
The error is :

Code:
No provider of glEGLImageTargetTexture2DOES found.  Requires one of:     GL extension "GL_OES_EGL_image"

I see that it is related to the libglamoregl.so library (glamor).
nvidia Optimus


The NVIDIA's official page gives a caveat.[1]

Some versions of the “modesetting” driver try to load a sub-module called “glamor”, which conflicts with the NVIDIA GLX implementation.
Please ensure that the libglamoregl.so X module is not installed.

do you have nvidia modeset enable in /boot/loader.conf

Code:
hw.nvidiadrm.modeset="1"

NVIDIA GLX implementation

makes me think of setting variables for glx

Code:
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
 
nvidia Optimus


The NVIDIA's official page gives a caveat.[1]

Some versions of the “modesetting” driver try to load a sub-module called “glamor”, which conflicts with the NVIDIA GLX implementation.
Please ensure that the libglamoregl.so X module is not installed.

do you have nvidia modeset enable in /boot/loader.conf

Code:
hw.nvidiadrm.modeset="1"



makes me think of setting variables for glx

Code:
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia

You told me 1000 times and I replied 1000 times that I started using :

hw.nvidiadrm.modeset="1"

from the beginning. I have also tried these :

Code:
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia

thanks. What I didn't try has been to remove glamor.
 
so is there an issue with the “modesetting” driver and “glamor” which conflicts with the NVIDIA GLX implementation.

do you have modestettings enabled in loader.conf

i dont because it doesnt work with dwl

but i do have nvidia-modeset in my kld_list in /etc/rc.conf

Code:
kld_list="nvidia-modeset nvidia-drm linux linux64 i915kms ext2fs mac_priority fusefs"
 
You told me 1000 times and I replied 1000 times that I started using :



from the beginning. I have also tried these :

Code:
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia

thanks. What I didn't try has been to remove glamor.
thats what im getting at

its recommend to have that set for kde
but is the issue that have modeset enable then causes the bug with glamour and glx

Some versions of the “modesetting” driver try to load a sub-module called “glamor”, which conflicts with the NVIDIA GLX implementation.

chicken and egg
your supposed to have that enabled but then you get the bug

but it you dont have it enabled then you cant start kde

so with hw.nvidiadrm.modeset="1" set are there any combination of environmental variables that will fix the bug

the 2 main things you can change are

1 - the environmental variables set for nvidia, kde and wayland

2 - the script you use to start kde

so you have to rule out all the different permutations of settings
and then you would have to look at things like the driver and drm versions
 
do you get the glamour error if nvidiadrm modeset is set to 0

Code:
hw.nvidiadrm.modeset="0"

what happens if thats set to 0 and nvidia-modeset nvidia-drm are set in your kld_list

Code:
kld_list="nvidia-modeset nvidia-drm"

what im getting at is what triggers the bug in the first place
is it something that is set or a problem with the defaults
 
Back
Top