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/
libqxcb.so
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.
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.
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.
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
platforms/libqwayland-egl.so
platforms/libqwayland-generic.so
platforms/libqwayland-xcomposite-egl.so
platforms/libqwayland-xcomposite-glx.so