Paraview on Arch Linux (Gnome) not running on Wayland

Hi,

I am running Paraview 5.12 on Arch Linux on a Wayland Gnome session. All packages have been installed from the official Arch pkgbuilds, but I have the same problem when running Paraview from the package downloaded from the website.

It seems that it won’t start in Wayland mode but only in X11 compatibility (XWayland) with this warning.

Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

I tried running export QT_QPA_PLATFORM=wayland && paraview and also paraview --platform=wayland

This is the status of my variables:

env | grep XDG
env | grep QT

XDG_SESSION_TYPE=wayland
QT_QPA_PLATFORM=wayland

And this package is installed

extra/qt5-wayland 5.15.13+kde+r60-1 (1.1 MiB 5.9 MiB) [qt5] (Installed)
    Provides APIs for Wayland

This issue is critical especially when running on an nvidia gpu because of problems with flickering which makes impossible to use Paraview or any other XWayland app. On Intel it runs fine, but still I’d rather use Wayland than X11 :slight_smile:

Any hint?

Thank you

To fix this need some change in the code, here is a workaround: https://gitlab.kitware.com/paraview/paraview/-/issues/21738#note_1500669

1 Like

So, if I understand correctly, the solution is to recompile the whole program

Changing line 117 in CMake/paraview_client_main.cxx.in to
std::string platform_args_data = { “-platform”, “wayland” };

Indeed, this is the only workaround until the issue is fixed.

Ok Thanks.

Just for curiosity, is this a problem with Gnome? I mean is it possible to run Paraview natively on Wayland without using that workaround?

I do not think so, although someone should check

It seems impossible without recompiling the whole program, there is also a comment on the source code of CMake/paraview_client_main.cxx that seems to explicitly block Wayland support. I still have to recompile it (I have to run it overnight maybe) but the author of the bug report seems to have tested it successfully. If it works also for you maybe it is possible to give the user or the distributions the choice to compile Paraview with experimental Wayland support.

The main problem is with Nvidia though (Xwayland does not provide a suitable mechanism for our driver to synchronize application rendering with presentation, which can cause visual corruption in some circumstances.), you could also leave the problem to them and keep using XWayland but I would like more to have the experimental Wayland support :slightly_smiling_face:

#if !defined(__APPLE__) && !defined(_WIN32)
  // On non-Apple and non-Windows platforms, ParaView only works with X11, so
  // prefer it to Wayland on those platforms.

Note that VTK rendering probably doesn’t understand how to talk to Wayland and the X rendering stack will likely be used. I don’t know what (if any) schedule might exist for proper Wayland support.

Concerning this the XDG_SESSION_TYPE=wayland is ignored on gnome-shell, so yes, that is (also) a Gnome specific thing. However, in CMake/paraview_client_main.cxx.in xcb is hard coded anyway.
When compiling with qt5 and hard coding wayland instead of xcb, Paraview runs without any issues under Wayland. Even with fractional scaling and HiDPi monitor! And Nvidia :wink:

1 Like

And one further finding: qt6 respects XDG_SESSION_TYPE (see here), there is no gnome specific platformName exception.

Unfortunately, Paraview has some issues with qt6. It builds and works, except some drop down menus, which are broken (see there)

For Gnome-Wayland-Nvidia users there is currently only 1 possibility, to get a smooth Paraview experience: compile it.

Maybe we/I could set up a temporary paraview-wayland AUR package?

As soon as qt6 is supported, the problems should have been vanished.

Qt6 support was initially added by @Sankhesh_Jhaveri but I ran out of runway on getting CI updated to Qt6 (it involved a longer backlog of things :confused: ), so it may have bitrotted in the meantime. Feel free to submit patches though; we’ll get Qt6 support up and running again hopefully soon.