[Solved] QCAD on wayland failed to load wayland-egl

i’m evaluating wayland on Archlinux Kernel 5.9.10.a-1-hardened, gnome
i’m running QCAD version 3.25.2 installed from qcad-3.25.2-pro-linux-qt5.14-x86_64.tar.gz
qt5-Version is 5.15.2

i get this error on startup:

$ echo $QT_QPA_PLATFORM
wayland

$ ~/opt/qcad*/qcad
QCAD version  3.25.2
10:29:41: Info:    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning:  RPropertyTypeId::generateId: property already initialized:  7RObject : "" : "Invisible"
Warning:  Failed to load client buffer integration: "wayland-egl"
Warning:  Available client buffer integrations: ()
Warning:  No shell integration named "xdg-shell" found
Warning:  No shell integration named "xdg-shell-v6" found
Warning:  No shell integration named "wl-shell" found
Warning:  No shell integration named "ivi-shell" found
Warning:  Loading shell integration failed.
Warning:  Attempted to load the following shells ("xdg-shell", "xdg-shell-v6", "wl-shell", "ivi-shell")
Warning:  action not found: "VisibleInCadToolBar"
Warning:  action not found: "VisibleInMatrixPanel"
Warning:  action not found: "VisibleInMenu"
Warning:  action not found: "VisibleInToolBar"
10:29:43: Debug:    checking for QCAD Pro updates...
10:29:43: Debug:    no updates available
Warning:  Wayland does not support QWindow::requestActivate()

egl-wayland is installed.

Any help appreciated

Follow-up questions:

What happens after these warnings are printed?
What happens without setting QT_QPA_PLATFORM?

nothing happens after these warnings, the processes qcad and qcad.bin are running.
QT_QPA_PLATFORM is set by gnome.
If it is unset, i get:

$ unset QT_QPA_PLATFORM
$ echo $QT_QPA_PLATFORM

$ ~/opt/qcad*/qcad
QCAD version  3.25.2
23:34:49: Info:    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Warning:  RPropertyTypeId::generateId: property already initialized:  7RObject : "" : "Invisible"
Warning:  action not found: "VisibleInCadToolBar"
Warning:  action not found: "VisibleInMatrixPanel"
Warning:  action not found: "VisibleInMenu"
Warning:  action not found: "VisibleInToolBar"
23:34:51: Debug:    checking for QCAD Pro updates...
23:34:52: Debug:    no updates available

and QCAD starts up. But it is running on xwayland.
If i start FreeCAD after unsetting QT_QPA_PLATFORM it is running on wayland though.

You can download and extract the Qt wayland plugins from here:
http://qcad.org/archives/lib/wayland_plugins.tar.gz

Copy the three directories to your QCAD plugins folder:

plugins/wayland-decoration-client
plugins/wayland-graphics-integration-client
plugins/wayland-shell-integration

You should then be able to run QCAD using Wayland.

You can still use X instead:

./qcad -platform xcb

Note that at this point we cannot recommend running QCAD under Wayland. You might experience missing mouse cursors, font size problems and other ugly user interface glitches.

thanks, with these plugins QCAD runs on wayland but i’ll follow your hint to use QCAD on xwayland.

Is the advice to avoid the Wayland support still current? I decided to give it another try now that Wayland is the default on Kubuntu 24.10.

My results:
QCAD Professional 3.31.1 for Linux 64bit: starts, but the keyboard layout is wrong and it’s running under xwayland. The keyboard bug makes this version unusable for me.
QCAD Professional 3.31.1 for Linux Qt 5.14 64bit: doesn’t work out of the box (it seems to start but nothing appears on the screen).

At this point if I was a new user trying out QCAD for the first time on a Wayland desktop, I might have given up and not tried searching the forum for a fix (I might not even realise the problems were Wayland-related).

QCAD Professional 3.31.1 for Linux Qt 5.14 64bit after manually installing wayland_plugins.tar.gz: works, though the cursors look wrong.
QCAD Professional 3.31.1 for Linux Qt 5.14 64bit started from the command line with ./qcad -platform xcb: works, has the correct keyboard layout, but it’s using xwayland. This is probably the version I will use for now.

A suggestion: if the native Wayland support is still not recommended and the necessary libraries are not included in the package, perhaps modify the qcad startup script to use the “-platform xcb” flag by default? You could always remove it in a later version when native Wayland support is on par with the X11 version.

Thanks for your feedback.

I would still not recommend Wayland. Although QCAD seems to work fine on Wayland nowadays, the positioning of all top level windows and dialogs at the top left is really annoying and there appears to be no fix for that. See also Wayland Peculiarities.

Yes, that sounds sensible.

I understand, thanks for you response Andrew.

QCAD 3.31.2 with additional plugins for Wayland support is now available.

We’ve also released a Qt 6 based development snapshot release (3.31.2.1) for Linux 64bit which might improve the integration with newer Linux distributions.

Thanks, I upgraded to 3.31.2.0 this morning and it is working well for me (in xcb mode).