Client: Wayland support

Created on 27 Dec 2020  路  18Comments  路  Source: owncloud/client

Expected behaviour

Running owncloud client under wayland should be possible.

Actual behaviour

Owncloud client crashes.

export QT_QPA_PLATFORM=wayland
owncloud
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, xcb.

Abandon (core dumped)

Steps to reproduce

  1. Force wayland platform usage with export QT_QPA_PLATFORM=wayland
  2. Run owncloud
  3. Crash

Client configuration

Client version:
2.7.4

Operating system:
Ubuntu 20.04

OS language:
French

Qt version used by client package (Linux only, see also Settings dialog):
5.12.9

Client package (From ownCloud or distro) (Linux only):
From owncloud

Linux

All 18 comments

On my ubuntu 20.4 box:
Looks like we simply do not ship a wayland plugin

dpkg -L ocqt5129-libqt5gui5  | grep platforms
/opt/ownCloud/qt-5.12.9/lib/x86_64-linux-gnu/qt5/plugins/platforms
/opt/ownCloud/qt-5.12.9/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so
/opt/ownCloud/qt-5.12.9/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so
/opt/ownCloud/qt-5.12.9/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so
/opt/ownCloud/qt-5.12.9/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so
/opt/ownCloud/qt-5.12.9/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so

@gabi18 probably similar issue with openSUSE-15.2

Its a separate module https://github.com/qt/qtwayland

Reproducible on openSUSE Leap 15.2:

export QT_QPA_PLATFORM=wayland
owncloud
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, xcb.

Aborted (core dumped)

Testing needed:

  • today's 2.7 daily is built with qt-5.12.10 and wayland support
  • the wayland module can be added manually from the above repo
echo >> /etc/apt/sources.list.d/owncloud-test.list "deb https://download.owncloud.com/desktop/testpilotcloud/daily/2.7/linux/Ubuntu_20.04/ /"
echo >> /etc/apt/sources.list.d/owncloud-test.list "deb http://download.opensuse.org/repositories/isv:/ownCloud:/Qt51210/Ubuntu_20.04/ /"
apt update
apt install testpilotcloud-client
apt install ocqt51210-qtwayland5
testpilotcloud --version
testpilotcloud 2.7.5daily20210108 (build 3012) Jan  6 2021 01:33:14
https://github.com/owncloud/client/commit/4ab81e903f83f9720e82dddadb939d9952ed8cd6
Libraries Qt 5.12.10, OpenSSL 1.1.1f  31 Mar 2020
Using virtual files plugin: suffix



md5-566022eec642e71a4d0472e0b57eebdb



env XDG_SESSION_TYPE=wayland QT_QPA_PLATFORM=wayland testpilotcloud



md5-b973a596503d99a345b8cdee1e67a577



Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, wayland, xcb.

Aborted (core dumped)

At least it loads a wayland platform plugin, when forced :-)

Logged in with the "Ubuntu on wayland" option selected, when the login manager asks for password:
image


image

It somewhat runs, but no window decoration and cannot be moved or minified. Tray icon is missing. Fonts are huge. Somewhat difficult to use.
The hellowayland test tool (seen on the right) has window decoration.

@jonathanernst I am new to wayland, not sure wht is wrong. It may be a miscompilation on my side when generating the qtwayland5 module, or it maybe something in the client code, or a confing thing... any ideas?

I have /usr/sbin/gdm, gdm-session-worker, /usr/lib/gdm3/gdm-wayland-session and /usr/libexec/gnome-session-binary running. Sway is installed, but does not seem to start automatically.

@jnweiger first of all thanks a lot for your interest in this feature! Owncloud is one of the last application I use that is not wayland aware and look ugly with fractional scaling on my screen :-)

I've tried your test version in both Ubuntu 20.04 et 20.10 and get the same results as you. I can confirm that it's using wayland with xeyes and can see that the fonts are now perfect but I have no decorations. Unfortunately as I don't have this issue with other wayland-compatible apps I have currently no idea why you don't have decorations.

It might well come from the fact that with wayland the client (owncloud in this instance) is responsible for the window decoration by default. It seems also possible to have server side decorations though. Maybe this is relevant :-1:

  • https://www.qt.io/blog/2018/12/14/whats-new-wayland-platform-plugin-qt-5-12
    "Furthermore, we've now also added support for support for the Wayland extension, xdg-decoration unstable v1. Compositors implementing this extension can now tell Qt clients that decorations will be drawn server-side instead of client-side. I.e. the decorations for Qt applications and other toolkits can be identical after all. This is also good news for people running tiling compositors. It's no longer needed to set the environment variable QT_WAYLAND_DISABLE_WINDOWDECORATION on compositors that implement this extension. Toggling window decorations at runtime is now also possible."

=> maybe we need this xdg-decoration extension or a runtime ?

Hope it helps and thanks again!

Edit: It seems Mutter doesn't implement server side decorations (see for example https://github.com/dosbox-staging/dosbox-staging/issues/650), maybe the best route is to check the code used by the hellowayland example?

Probably very relevant pointers! Afaik, our desktop client currently does not know about client side decorations. At least to me, that is a new concept.
Thank you so much for these hints! I am glad to test any progress we make or help with packaging.

In the meantime, I can only report: Same issue reproduced on Debian-10.7.0 with gnome3.

Testing Wayland support is part of the 2.7.5 release testing: https://github.com/owncloud/client/issues/8349

Testing Wayland support is part of the 2.7.5 release testing: #8349

Prvoiding a missing dependency was part of the release preparations. But there is no more wayland testing planned for the release on top of what we discuss here.

@michaelstingl Do you want wayland support as a release blocker? I'd suggest to keep that independant of the release until you have a developer to look into that.

No, not a blocker for 2.7.5. in case it鈥檚 not solved, we should mention it in the release communication and in the supported platform docs.

I built the current master in a VM running an openSUSE Leap 15.2 live image with KDE, in a "full wayland" session. Everything looks fine in there:

screenshot_2021-04-15_17-34-52

For distribution, we probably just have to ship the wayland platform plugin(s). That's a little complex, but I'm sure we'll figure it out. Other than that, I think the client supports Wayland properly already.

Edit: I built the client against the system packages.

@fmoc unfortunately to support GNOME/Mutter we still miss client side decoration

screenshot_2021-04-17_14-55-52

This is openSUSE Leap 15.2 GNOME Live with a Wayland session, using QT_QPA_PLATFORM=wayland. I haven't tried Ubuntu with Mutter yet, but I presume any kind of issue is not caused by ownCloud.

Tested on Ubuntu 20.04.2 with GNOME.

XWayland:

screenshot_2021-04-17_17-59-22

Native Wayland:

screenshot_2021-04-17_17-58-52

Built against system packages. I'm relatively confident that the ugly look is caused by Qt5, and there's nothing we can do about it. At least I couldn't find any fix while doing a bit of research on the issue...

screenshot_2021-04-17_18-12-55

Problem apparently solved by enforcing the Gtk3 platform theme. The environment variables to set:

```sh
export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=gtk3

We might not have enabled building the gtk Plugin.
It鈥檚 a qtbase build time switch.

@jonathanernst could you please check whether setting that second environment variable solves the issue on your end as well?

Was this page helpful?
0 / 5 - 0 ratings