Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland support #8328

Closed
jonathanernst opened this issue Dec 26, 2020 · 42 comments
Closed

Wayland support #8328

jonathanernst opened this issue Dec 26, 2020 · 42 comments
Assignees
Labels
Early-Adopter:CERN Linux p2-high Escalation, on top of current planning, release blocker
Milestone

Comments

@jonathanernst
Copy link

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

@jnweiger
Copy link
Contributor

jnweiger commented Jan 4, 2021

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

@TheOneRing
Copy link
Member

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

@gabi18
Copy link
Contributor

gabi18 commented Jan 5, 2021

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)

@jnweiger
Copy link
Contributor

jnweiger commented Jan 7, 2021

@jnweiger
Copy link
Contributor

jnweiger commented Jan 8, 2021

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 :-)

@jnweiger
Copy link
Contributor

jnweiger commented Jan 8, 2021

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 jnweiger mentioned this issue Jan 11, 2021
42 tasks
@jonathanernst
Copy link
Author

jonathanernst commented Jan 12, 2021

@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 👎

  • 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 dosbox-staging/dosbox-staging#650), maybe the best route is to check the code used by the hellowayland example?

@jnweiger
Copy link
Contributor

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.

@michaelstingl
Copy link
Contributor

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

@jnweiger
Copy link
Contributor

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.

@michaelstingl
Copy link
Contributor

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.

@fmoc fmoc added the Linux label Mar 12, 2021
@fmoc
Copy link
Contributor

fmoc commented Apr 15, 2021

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.

@jonathanernst
Copy link
Author

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

@fmoc
Copy link
Contributor

fmoc commented Apr 17, 2021

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.

@fmoc
Copy link
Contributor

fmoc commented Apr 17, 2021

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...

@fmoc
Copy link
Contributor

fmoc commented Apr 17, 2021

screenshot_2021-04-17_18-12-55

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

export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=gtk3

@TheOneRing
Copy link
Member

TheOneRing commented Apr 17, 2021

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

@fmoc
Copy link
Contributor

fmoc commented Apr 22, 2021

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

@fmoc
Copy link
Contributor

fmoc commented May 5, 2021

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.

@fmoc fmoc closed this as completed May 5, 2021
@ik8ozv
Copy link

ik8ozv commented Jul 24, 2021

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

@michaelstingl
Copy link
Contributor

@ik8ozv please open a new issue and provide the full context.

@ab412
Copy link

ab412 commented Aug 11, 2021

@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:

  1. sudo apt install libxcb-icccm4 libxcb-xkb1 libxcb-icccm4 libxcb-image0 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-xinerama0
  2. echo "export QT_QPA_PLATFORM=xcb" >> ~/.bash_profile && source ~/.bash_profile

@jnweiger
Copy link
Contributor

jnweiger commented Aug 31, 2021

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.

image

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.

@jnweiger jnweiger reopened this Aug 31, 2021
@jnweiger
Copy link
Contributor

jnweiger commented Jan 13, 2022

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.

@PVahr

This comment was marked as off-topic.

@pafgoncalves

This comment was marked as off-topic.

@PVahr

This comment was marked as off-topic.

@fmoc

This comment was marked as off-topic.

@kuateric
Copy link

kuateric commented Oct 15, 2022

owncloud on Ubuntu 22.04 with Wayland still crashes.
We use this routine for installing https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/download/
and we tried on 10 machines. Always the same behaviour.
Ubuntu 22.04 is already a while there, there is still no proper fix for wayland. It is very frustrating. We are about to migrating to a different platform

@fmoc
Copy link
Contributor

fmoc commented Oct 17, 2022

@kuateric what exactly is the terminal output, though? Are you using QT_QPA_PLATFORM=wayland? I can reproduce a crash only on Ubuntu 22.04 with that env var set (/tmp/.mount_ownClo7W2wIv/AppRun.wrapped: symbol lookup error: /lib/x86_64-linux-gnu/libEGL_mesa.so.0: undefined symbol: wl_proxy_marshal_flags).

On Fedora 36, for instance, the application starts up but misses window decorations.

screenshot_2022-10-17_14-25-30

Note that this is unrelated to packaging as an AppImage, apparently.

@fmoc
Copy link
Contributor

fmoc commented Oct 17, 2022

Tracked the issue down to libwayland-client.so.0, which our AppImage ships. Removing it makes the AppImage work on Ubuntu 22.04 with QT_QPA_PLATFORM=wayland. This also makes the window decorations work on Fedora 36 (it's not pretty, but it's working). See below.

screenshot_2022-10-17_15-57-11

Not sure yet why the native packages aren't working.

Edit: this is what the client is looking like on Fedora 36 when using X11:

screenshot_2022-10-17_15-59-46

@kuateric
Copy link

kuateric commented Oct 17, 2022

Thank you for taking a look. Which on of these should i delete in order to get it work.
grafik

Is it possible to set QT_QPA_PLATFORM=wayland permanently? if so how ?

Note that this is unrelated to packaging as an AppImage, apparently.

the problem is then related to the native packages here https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/download/? Is it not better to fix the issue in the native packages and make it easier for us to install it properly ?

Thanks

@kuateric
Copy link

i just set up a server on aws to test again.
I installed owncloud following the link below.
I applied QT_QPA_PLATFORM=wayland
owncloud opens but it is not possible to go further than this. The next button somehow does not respond.
image

@kuateric
Copy link

same behaviour without QT_QPA_PLATFORM=wayland

image

@kuateric
Copy link

now i deleted libwayland-client.so.0 and owncloud does not open anymore.
image

I think that the installation procedure becomes too complicated for the everyday users. a more simple and functional installation routine would be great to have

@fmoc
Copy link
Contributor

fmoc commented Oct 17, 2022

Seems like you've been busy, and may have damaged your system. I think we can repair it with reasonable effort, though. Next time, please wait for instructions explicitly. I'll respond to all your comments in a single post.

By the way, I am not sure whether a language barrier is causing problems here. If so, please let me know. We do not want you to understand us wrongly (and vice versa).

Which on of these should i delete in order to get it work.

None. I was discussing the contents of the AppImage. You're looking at system files. Please do not delete any files from your system randomly. (See below.)

Is it possible to set QT_QPA_PLATFORM=wayland permanently? if so how ?

I did not say you should use that. I was asking whether this is already set. To check, please open a terminal and type the following code snippet:

> echo "$QT_QPA_PLATFORM"

If it shows no output, you can assume it is not set. If there is any output, please post it here.

the problem is then related to the native packages here https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/download/? Is it not better to fix the issue in the native packages and make it easier for us to install it properly ?

Native packages are under investigation right now. Unfortunately, Ubuntu has made debugging in live CD VMs extremely hard with its snap stuff. I need to set up a proper VM.

i just set up a server on aws to test again.

For future tests, feel free to use https://demo.owncloud.org, https://demo.owncloud.com or https://ocis.owncloud.com.

owncloud opens but it is not possible to go further than this. The next button somehow does not respond.
same behaviour without QT_QPA_PLATFORM=wayland

This is unexpected, and I cannot reproduce this on a vanilla (that means, freshly set up) system. It may be related to changes you performed on your system. Of course, I cannot tell which one exactly led to the problem. As long as I cannot reproduce the issue, I cannot tell you how to fix it.

now i deleted libwayland-client.so.0 and owncloud does not open anymore.

Again, nobody instructed you to delete this file from your system. You just broke your system to some extent.

Since you seem kind of unexperienced, I'd like to try to help you, though. Try running the following commands in a terminal to reinstall the library:

sudo apt-get update
sudo apt-get install --reinstall libwayland-client0

sudo might prompt you for your password, please enter it as instructed.

Generally, please never just randomly delete files from your system if you do not know what you're doing.

I think that the installation procedure becomes too complicated for the everyday users. a more simple and functional installation routine would be great to have

This is what our AppImage is for. It doesn't require root permissions, and is easier to use in general. The incompatibility with Wayland seems unrelated to the packaging format anyway.

@kuateric

This comment was marked as off-topic.

@fmoc
Copy link
Contributor

fmoc commented Oct 18, 2022

@kuateric please open your own issue(s).

@TheOneRing
Copy link
Member

With Qt6 and egl support in qtwayland I get.
thumb-Clipboard - September 8, 2023 12 35
However it appears egl support is not possible with our currently used centos image.
I'll disable qtwayland for 5.0, in Qt6 in with our sles15 based builds we should re enable it.
Taskbar and window title are still an issue we need to solve.

@TheOneRing TheOneRing modified the milestones: Desktop 5.0, Desktop 6.0 Sep 8, 2023
@TheOneRing TheOneRing added the p2-high Escalation, on top of current planning, release blocker label Sep 22, 2023
@TheOneRing TheOneRing modified the milestones: Desktop 6.0, Desktop 7.0 Dec 19, 2023
@TheOneRing
Copy link
Member

With #11625 I think we can close this issue 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Early-Adopter:CERN Linux p2-high Escalation, on top of current planning, release blocker
Projects
None yet
Development

No branches or pull requests