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

You wrote : ~/.zshenv ; so I placed those lines in the equivalent file for me , .cshrc.

You don't read my messages or what ? I told you that :



is not good (post : https://forums.freebsd.org/threads/trying-to-run-kde-6-plasma-with-wayland.93951/post-663933)
thats from your config

Code:
dbus-launch --sh-syntax --exit-with-session startplasma-wayland 2> startplasma.log


i was just suggesting you started with these variables

Code:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"

export QT_QPA_PLATFORMTHEME=qt6ct
export LIBSEAT_BACKEND=consolekit2
 
Its better to refocus here :

Code:
(/usr/local/libexec/xdg-desktop-portal:1156): xdg-desktop-portal-WARNING **: 23:07:33.468: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file
dbus-daemon[1142]: [session uid=1001 pid=1142] Successfully activated service 'org.freedesktop.portal.Desktop'

Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
No backend specified, automatically choosing drm
Unable to determine system time zone: please check your system configuration.
kwin_screencast: Failed to connect PipeWire context
 
if you are trying to set variables for wayland and kde in your ~/.cshrc
using export instead of setenv then you may run into issues


set vim as the editor as an example

Code:
setenv name value
setenv EDITOR /usr/bin/vim

have had this exact same conversation before about setting variables with the csh shell on this forum,
from memory it was on a thread about davinci resolve

and you were trying to set a variable with setenv
like this

Code:
setenv EDITOR=/usr/bin/vim

and i said


meaning no equals,
between the name and the value

Code:
setenv EDITOR /usr/bin/vim

wayfire doesnt need any settings exported to work
the XDG_RUNTIME_DIR is auto created and exported with Freebsd 14.1
thats why it works without any additional settings
 
I'm using export on the script that should launch kde6,this one :
Code:
#!/bin/sh

#export QT_DEBUG_PLUGINS=1
#export WAYLAND_DEBUG=1

export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_RUNTIME_DIR=/var/run/user/"$(id -u)"

export QT_WAYLAND_SHELL_INTEGRATION=xdg-shell
export XDG_SESSION_TYPE=xdg-shell

export QT_QPA_PLATFORMTHEME=qt6ct

export QT_QPA_PLATFORM=minimal

export WLR_NO_HARDWARE_CURSORS=1
export LIBSEAT_BACKEND=consolekit2

#mkdir -p /var/run/user/"$(id -u)"
#chown -R "${USER}":wheel /var/run/user/"$(id -u)"
#chmod 700 /var/run/user/"$(id -u)"

#dbus-launch --sh-syntax --exit-with-session startplasma-wayland 2> startplasma.log

#ck-launch-session dbus-run-session startplasma-wayland 2> startplasma.log

ck-launch-session dbus-run-session wayfire

It is able to launch wayfire on wayland,so placing the exports there do work. So,why change something that already work ?
 
KDE developer :

>Manually setting and creating XDG_RUNTIME_DIR is obsolete on FreeBSD >= 14 via pam_xdg(8).

Besides, Plasma uses ConsoleKit2 which overrides XDG_RUNTIME_DIR and (if the value is same) destroys existing contents. GUI apps started before Plasma with different XDG_RUNTIME_DIR wouldn't be accessible from within Plasma and may cause other issues.

NapoleonWils0n : you should read more carefully the posts made.
 
And you should stop telling people what to do when they're trying to help.

For needing help, you are sometimes really unpleasant.

This is not pertinent with what I suggested. I'm investing time and energy to follow and understand the developers suggestions. This is the better warranty to be successfull. Don't read posts means to repeat the same (wrong schemes) and ignoring the developers suggestions create only noises. I don't want that someone does what I say,but I would like that he takes care of what developers suggest to do.

As a secondary factor, I feel like saying that the help you give me is not exclusively directed to me, but is for the community, because it will help all those users who want to achieve the same goal.
 
There is an interesting tip for fixing the error "No backend specified, automatically choosing drm" explained here :


this :

Neither of these are a correct or sane way to make KWin choose a GPU. You need to put KWIN_DRM_DEVICES="/dev/dri/card1:/dev/dri/card0" into /etc/environment and reboot.

but FreeBSD does not have environment.
 
This is also a very frequent error that I see on the log :

Code:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""

so,the solution seems to be here :


where he says to recompile qt to enable the missing features. So,the idea is to remove all the qt6 from packages and installing them from ports,enabling the wayland and xcb plugins. Again one time,installing packages is not the best idea.

Unfortunately,when I try to compile qt6 from ports,I can't choose the compilation parameters :

Istantanea_2024-07-24_12-27-44.png
 
NapoleonWils0n : sorry if I have hurted you telling that you should read the old posts / follow the developers suggestions. Forget it and do what you want. And now,I want to invite you again to collaborate here to make KDE 6 and Wayland to work. To tinker it's what we like the most and it makes us happy... and you are a valuable resource.
 
dont worry unlike Donald Trump im thick skinned

qt6ct is used to set the qt theme
for instance to set the qt theme used by apps like obs studio


loader.conf

Code:
/boot/loader.conf

Code:
hw.nvidiadrm.modeset="1"

Code:
qt6-wayland-6.7.2              Qt6 wrapper for Wayland

Code:
sudo pkg install qt6-wayland

kde6-devel


NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
Runtime dependencies:
Code:
plasma6-plasma>0 : x11/plasma6-plasma
kf6-frameworks>0 : x11/kf6-frameworks
kate-devel>0 : editors/kate-devel
dolphin-devel>0 : x11-fm/dolphin-devel
konsole-devel>0 : x11/konsole-devel
gwenview-devel>0 : graphics/gwenview-devel



Build dependencies:

Code:
PlasmaWaylandProtocolsConfig.cmake : x11/plasma-wayland-protocols

suggests wayland support

from the plasma wayland page about nvidia

Make sure to have the Nvidia EGL library installed. For example on Ubuntu and Neon the relevant package is called libnvidia-egl-wayland1

searching for egl turns up this, not sure if you need that installed

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

Code:
sudo pkg install egl-wayland

set QT_QPA_PLATFORM to wayland

csh setenv variables

Code:
~/.cshrc

Code:
setenv XDG_CONFIG_HOME "$HOME/.config"
setenv XDG_CACHE_HOME "$HOME/.cache"
setenv XDG_DATA_HOME "$HOME/.local/share"

setenv QT_QPA_PLATFORMTHEME qt6ct
setenv QT_QPA_PLATFORM wayland

setenv LIBSEAT_BACKEND consolekit2

# uncommented if needed
#setenv QT_WAYLAND_SHELL_INTEGRATION xdg-shell
#setenv XDG_SESSION_TYPE xdg-shell
#setenv WLR_NO_HARDWARE_CURSORS 1

or shell script with export

Code:
#!/bin/sh

export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"

export QT_QPA_PLATFORMTHEME=qt6ct
export QT_QPA_PLATFORM=wayland

export LIBSEAT_BACKEND=consolekit2

# uncommented if needed
#export QT_WAYLAND_SHELL_INTEGRATION=xdg-shell
#export XDG_SESSION_TYPE=xdg-shell
#export WLR_NO_HARDWARE_CURSORS=1

and then use whatever command you use to start kde

i have come across this error with davinci resolve and other qt applications

Code:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

either you dont have a qt6 wayland package installed
a variable isnt set or the app isnt a wayland app and use xcb which is x11
 
This is also a very frequent error that I see on the log :

Code:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""

so,the solution seems to be here :


where he says to recompile qt to enable the missing features. So,the idea is to remove all the qt6 from packages and installing them from ports,enabling the wayland and xcb plugins. Again one time,installing packages is not the best idea.

Unfortunately,when I try to compile qt6 from ports,I can't choose the compilation parameters :

View attachment 19666

Is there a method to invoke the window where we can choose the parameters to use during the compilation of the qt6 ?
 
Let's restart this project. From the ML a developer told me :

in my recent testing you just need the libudev-devd patch :

cat /usr/ports/devel/libudev-devd/files/patch-udev-device.c

--- udev-device.c.orig 2024-07-30 16:20:00 UTC
+++ udev-device.c
@@ -181,8 +181,9 @@ udev_device_has_tag(struct udev_device *ud, const char
struct udev_list_entry *ule;

TRC("(%p, %s)", ud, tag);
- ule = udev_list_entry_get_first(udev_device_get_tags_list(ud));
- return (udev_list_entry_get_by_name(ule, tag) != NULL);
+// ule = udev_list_entry_get_first(udev_device_get_tags_list(ud));
+// return (udev_list_entry_get_by_name(ule, tag) != NULL);
+ return false;
}

struct udev_list *

so,I tried to apply the patch doing like that :


Code:
nano /usr/ports/devel/libudev-devd/files/patch-udev-device.c

--- udev-device.c.orig  2024-07-30 16:20:00 UTC
+++ udev-device.c

@@ -181,8 +181,9 @@ udev_device_has_tag(struct udev_device *ud, const char
struct udev_list_entry *ule;

TRC("(%p, %s)", ud, tag);
- ule = udev_list_entry_get_first(udev_device_get_tags_list(ud));
- return (udev_list_entry_get_by_name(ule, tag) != NULL);
+// ule = udev_list_entry_get_first(udev_device_get_tags_list(ud));
+// return (udev_list_entry_get_by_name(ule, tag) != NULL);
+       return false;
}
  struct udev_list *

root@marietto:/usr/ports/devel/libudev-devd # make

===>  License BSD2CLAUSE LGPL21+ accepted by the user
===>   libudev-devd-0.5.1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by libudev-devd-0.5.1 for building
===>  Extracting for libudev-devd-0.5.1
=> SHA256 Checksum OK for wulf7-libudev-devd-v0.5.1_GH0.tar.gz.
===>  Patching for libudev-devd-0.5.1
===> Applying FreeBSD patches for libudev-devd-0.5.1 from /usr/ports/devel/libudev-devd/files
1 out of 1 hunks failed--saving rejects to udev-device.c.rej
===>  FAILED Applying FreeBSD patch-udev-device.c
===> FAILED to apply cleanly FreeBSD patch(es)  patch-udev-device.c
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/libudev-devd
*** Error code 1

but it didn't work,so I made some mistake.
 
so,I tried to apply the patch doing like that :


Code:
nano /usr/ports/devel/libudev-devd/files/patch-udev-device.c

--- udev-device.c.orig 2024-07-30 16:20:00 UTC
+++ udev-device.c

@@ -181,8 +181,9 @@ udev_device_has_tag(struct udev_device *ud, const char
struct udev_list_entry *ule;

TRC("(%p, %s)", ud, tag);
- ule = udev_list_entry_get_first(udev_device_get_tags_list(ud));
- return (udev_list_entry_get_by_name(ule, tag) != NULL);
+// ule = udev_list_entry_get_first(udev_device_get_tags_list(ud));
+// return (udev_list_entry_get_by_name(ule, tag) != NULL);
+ return false;
}
struct udev_list *

root@marietto:/usr/ports/devel/libudev-devd # make

===> License BSD2CLAUSE LGPL21+ accepted by the user
===> libudev-devd-0.5.1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by libudev-devd-0.5.1 for building
===> Extracting for libudev-devd-0.5.1
=> SHA256 Checksum OK for wulf7-libudev-devd-v0.5.1_GH0.tar.gz.
===> Patching for libudev-devd-0.5.1
===> Applying FreeBSD patches for libudev-devd-0.5.1 from /usr/ports/devel/libudev-devd/files
1 out of 1 hunks failed--saving rejects to udev-device.c.rej
===> FAILED Applying FreeBSD patch-udev-device.c
===> FAILED to apply cleanly FreeBSD patch(es) patch-udev-device.c
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/libudev-devd
*** Error code 1
but it didn't work,so I made some mistake.
Did you apply the patch EXACTLY AS SHOWN HERE?
If so it shouldn't apply. Patches on ports is aware of spaces and tabs.

Try attached patch (added ".txt" extention to upload here, so rename before put it into devel/udev-devd/files directory).
Not actually installed/tested, it applied and built fine for main branch of ports tree, at least.

An advice for future:
If any patch proposed via email, as an example with this port,
  1. make clean on devel/libudev-devd
  2. make extract on devel/libudev-devd
  3. look into the original file extracted to be patched and see the differences
If original part does not match, ask the person the actual branch and commit hash the person was on when the person created the patch.
 

Attachments

  • patch-udev-device.c.txt
    504 bytes · Views: 32
Forgot to mention.
I have no plan to actually test the patch, as I have currently no plan to switch to KDE6 and the (patched) port is depended upon by multiple ports having multiple ports depending upon them.
I don't want possible breakage for them.
 
Hello boys.

This is how the file udev-device.c should be :

Code:
LIBUDEV_EXPORT int
udev_device_has_tag(struct udev_device *ud, const char *tag)
{
        struct udev_list_entry *ule;
        return false;
TRC("(%p, %s)", ud, tag);
ule = udev_list_entry_get_first(udev_device_get_tags_list(ud));
        return (udev_list_entry_get_by_name(ule, tag) != NULL);
}

with that modification in the code the port compile itself succesfully. Unfortunately (for me),kde 6 + wayland still don't work. Maybe you are luckier than me.
 
Back
Top