Slicer on Wayland

Hey everyone,
I’ve been messing around a bit today with Slicer due to performance issues and noticed it’s actually running in XWayland on my openSuse TW + KDE plasma Wayland system.
Upon starting from the commandline:

➜  ~ /opt/slicer/Slicer-5.3.0-2023-08-01-linux-amd64/Slicer
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
Switch to module:  "Welcome"

indeed, the platform plugins shipped in the binary download are the following:

➜  ~ ls /opt/slicer/Slicer-5.3.0-2023-08-01-linux-amd64/lib/QtPlugins/platforms/  

While the ones available on my system:

➜  ~ ls /usr/lib64/qt5/plugins/platforms   

and unfortunately symlinking any of the files from the latter to the former is unsuccessful, Qt finds and correctly identifies the lib, but stops with version incompatibility.

If my understanding is right, would it be imaginable to have the platform plugins shipped with Slicer?

Thank you for the investigation and sharing the results.

I’ve tried to set up a linux box with wayland a couple of months ago and found that basically none of the commonly used remote desktop software supported it yet, so it did not look like that wayland is really ready for replacing X protocol. Do you find that wayland is actually practically usable? (for me, no standard remote desktop software

If yes, and you think that it is time for Slicer to support it, too, then we could use some of your experience and help with this. Could you build Slicer as described here and see if it works? Then try to make a package (make package) and see if the wayland platform plugin files are included in the created package.

  • If the wayland plugin files are not included then SlicerBlockInstallQtPlugins.cmake may need to be modified.
  • If the wayland plugin files are included it means that the Qt that is used on factory machines need to be built with wayland enabled.

@Sam_Horvath @jcfr please chime in if you have some suggestions or have experience with wayland support.

Looking at the Slicer sources, we can indeed observe that we are only packaging xcb plugins

means that the Qt that is used on factory machines need to be built with wayland enabled.

Since on Linux, we are re-packaging the official binaries, addressing this should not require to build Qt from source.

Wayland plugins

The plugins available in Qt 5.15.2 are the following:

$ cd /opt/qt/5.15.2/gcc_64/plugins

$ ls -1 wayland-decoration-client/

$ ls -1 wayland-graphics-integration-client/

$ ls -1 wayland-shell-integration/

Distributing Wayland plugins

It would be straightforward to distribute additional plugins.

@d-vogel Could you help use evaluate which ones ?

Without recompiling, you should be able to simply copy the missing plugins found after installing Qt 5.15.2 following these instructions


1 Like

Well wayland is now default on quite a few distributions (Fedora and openSuse at least), KDE has stated Wayland is their default target for Plasmashell and I think Gnome is also very much focused on Wayland.

I’ve been running plasmashell with wayland for around two years now and I think all apps installed from the distro repo are using wayland (including Paraview with better performance with Wayland). The last apps that don’t are apps installed via flatpack (MS Teams) and Electron apps (VSCode, Slack, Spotify, Obsidian) both require adding a flag manually, I applied them for Teams and VSCode and again the animations are smoother.

As for the source build, it might be challenging in terms of time, I will first investigate the direction provided by @jcfr.

1 Like

To my understanding, apps in plasmashell-wayland are in fact using xwayland, and won’t start without X libraries. Last time I tried with a pure Wayland desktop like Weston, even kcalc did not launch. Will try again, it’s just doubtful that the plethora of applicaions in a Linux distribution have been ported to pure Wayland.

XWayland apps get listed by xlsclients, only those I talked about in my previous message pop up in the list.

There’s no reason Wayland shouldn’t be supportable either via the methods Jc suggested if someone has the time to invest in it, or by waiting for the Qt6 port. I’m not particularly motivated since X works fine for my use cases and remote desktop support in Wayland seems to be lagging.

I will first investigate the direction provided by @jcfr

@d-vogel Thanks for working on that. The idea would be to understand how to update variable SlicerBlockInstallQtPlugins_subdirectories referenced above.

In addition of the libraries listed above, there are also:

$ cd /opt/qt/5.15.2/gcc_64/plugins

$ ls -1 platforms/libqwayland-*so

Reading this page is informative:

After we understand which plugins are required and how to env. variable like these ones:


we will understand how to update the list of plugins to package and provide guidance.

The env. variable should be set in a way for also compatible with how Qt and VTK are integrated.

Additional resources: