client
client copied to clipboard
Wayland support
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
- Force wayland platform usage with export QT_QPA_PLATFORM=wayland
- Run owncloud
- 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
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)
Wayland module coming up in https://build.opensuse.org/package/show/isv:ownCloud:Qt51210/ocqt51210-qt5-qtwayland
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
On a machine with an X11 Desktop I get:
env XDG_SESSION_TYPE=wayland QT_QPA_PLATFORM=wayland testpilotcloud
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:
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 ?
- https://doc-snapshots.qt.io/qt5-5.12/qtwaylandcompositor-server-side-decoration-example.html
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’s 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:
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
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:
Native Wayland:
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...
Problem apparently solved by enforcing the Gtk3 platform theme. The environment variables to set:
export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=gtk3
We might not have enabled building the gtk Plugin. It’s a qtbase build time switch.
@jonathanernst could you please check whether setting that second environment variable solves the issue on your end as well?
2.8 RC AppImage works fine on Leap 15.2 wand Ubuntu 20.04.2, both with GNOME. I had to set only QT_QPA_PLATFORM
with it, since linuxdeploy-plugin-qt sets the QT_QPA_PLATFORMTHEME=gtk3
in a script in apprun-hooks
already. I think we can close this issue.
Please Since i upgraded Ubuntu to version 21.04, i have the same issue with gnuradio running any GRC file. Please any Help to avoid the problem? Thanks Enzo
@ik8ozv please open a new issue and provide the full context.
@ik8ozv I had the same issue on Ubuntu 21.04 for a different application. Changing to xcb
solved it for me. I had to add the dependencies as highlighted here: https://forum.qt.io/topic/126864/how-to-resolve-qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found-error/3:
-
sudo apt install libxcb-icccm4 libxcb-xkb1 libxcb-icccm4 libxcb-image0 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-xinerama0
-
echo "export QT_QPA_PLATFORM=xcb" >> ~/.bash_profile && source ~/.bash_profile
Retested with 2.9.0 RC1
$ env QT_QPA_PLATFORM=wayland testpilotcloud
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
The mentioned workaround, of using xcb instead of native wayland also works with 2.9.0
The warning message about QT_QPA_PLATFORM should be avoided when the suggested setting is actually in use.
The warning is issued by Qt so we can ignore that part. So the remaining issue is again a lack of window decorations and that could be a setup issue as @fmoc was able to set it up correctly.
@fmoc would you share your secrets? :roll_eyes:
Same with 10.9.1-rc4: the client runs fine, but I still miss the secret how to get window decorations on my ubuntu-20.04 wayland test system.
I suggest to re-open here and document (or implement) the remaining steps.
Issue still present in fresh Ubuntu 22.04, linux 5.15.40, gnome 42.2.
Installed via apt.
By default gives the segmentation fault reported above.
Adding env QT_QPA_PLATFORM=wayland
gives a more verbose crash:
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 "gtk3" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. Aborted (core dumped)
Apt suggests the packages: qt5-image-formats-plugins qtwayland5
Installing again owncloud-client with the flag
sudo apt --install-suggests install owncloud-client
installs qt5-image-formats-plugins qtwayland5
but does not fix the issue.
Did you found a fix? Is not so clear from the discussion above to me, but maybe I missed something.
If installed from the ownCloud repository it will work with wayland in Ubuntu 22.04
wget -nv https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/Release.key -O - | sudo apt-key add -
echo 'deb https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/ /' | sudo tee -a /etc/apt/sources.list.d/owncloud.list
sudo apt update
sudo apt install owncloud-client
Thanks a lot! This works for me, I can finally sync my stuff.
My problem was then not in the graphical engine, but - I guess - in some repository setting. Shall I open a new issue?
@PVahr the version shipped by Debian is really old, there's no point in debugging those old versions, really. Our repositories use a much, much more recent Qt version and other up-to-date dependencies.
Since cannot provide support for these distro packages and your issue is clearly unrelated to the issue originally described, I'm hiding our comments as off topic.