SUMMARY Myself and other users seem to have trouble starting apps using the KDE runtime under Wayland. You can see bug reports of apps here: https://github.com/flathub/org.mixxx.Mixxx/issues/1 https://github.com/flathub/org.clementine_player.Clementine/issues/13 STEPS TO REPRODUCE 1. Use Wayland 2. Install a KDE runtime flatpak app (E.g. `flatpak install flathub org.clementine_player.Clementine`) 3. Run installed app OBSERVED RESULT App doesn't start with log: 16:38:11.710 INFO main:319 Clementine-qt5 1.3.1 __logging_message__16:38:11.710 DEBUG unknown Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. __logging_message__16:38:11.718 WARN unknown could not connect to display __logging_message__16:38:11.718 DEBUG unknown Could not load the Qt platform plugin "xcb" in "" even though it was found. __logging_message__16:38:11.718 ERROR unknown This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. __logging_message__16:38:11.718 ERROR unknown __logging_message__16:38:11.718 ERROR unknown Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb. __logging_message__16:38:11.718 ERROR unknown EXPECTED RESULT App should start. SOFTWARE/OS VERSIONS Ubuntu 19.04 with Flatpak 1.2.4 and latest KDE 5.12 runtime. ADDITIONAL INFORMATION If I use X11 instead of Wayland, the app starts. This includes using XWayland.
I've never seen this, will need some further investigation. Can you try passing QT_QPA_PLATFORM=wayland and see if that works?
Does not work for Clementine I'm afraid, but it does seem to at least try to start now. $ flatpak run --env=QT_QPA_PLATFORM=wayland org.clementine_player.Clementine 17:34:03.291 INFO main:319 Clementine-qt5 1.3.1 __logging_message__17:34:03.291 DEBUG unknown Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. 17:34:03.448 DEBUG NetworkProxyFactory:49 Detected system proxy URLs: ("", "", "", "") 17:34:03.449 DEBUG WorkerPool<HandlerType>:281 Starting worker 0x7f26e6f21730 "/app/bin/clementine-tagreader" "/tmp/clementine_-636192257" 17:34:03.453 DEBUG WorkerPool<HandlerType>:281 Starting worker 0x7f26e6f21730 "/app/bin/clementine-tagreader" "/tmp/clementine_-789146990" 17:34:03.455 DEBUG WorkerPool<HandlerType>:281 Starting worker 0x7f26e6f21730 "/app/bin/clementine-tagreader" "/tmp/clementine_-1762797002" 17:34:03.459 DEBUG WorkerPool<HandlerType>:281 Starting worker 0x7f26e6f21730 "/app/bin/clementine-tagreader" "/tmp/clementine_-1472949235" 17:34:03.471 INFO main:48 TagReader worker connecting to "/tmp/clementine_-636192257" 17:34:03.472 DEBUG WorkerPool<HandlerType>:301 Worker 0x7f26dc006210 connected to "/tmp/clementine_-636192257" 17:34:03.482 INFO main:48 TagReader worker connecting to "/tmp/clementine_-789146990" 17:34:03.483 DEBUG WorkerPool<HandlerType>:301 Worker 0x7f26dc006760 connected to "/tmp/clementine_-789146990" 17:34:03.487 INFO main:48 TagReader worker connecting to "/tmp/clementine_-1472949235" 17:34:03.488 DEBUG WorkerPool<HandlerType>:301 Worker 0x7f26dc00a300 connected to "/tmp/clementine_-1472949235" 17:34:03.489 INFO main:48 TagReader worker connecting to "/tmp/clementine_-1762797002" 17:34:03.489 DEBUG WorkerPool<HandlerType>:301 Worker 0x7f26dc004ef0 connected to "/tmp/clementine_-1762797002" 17:34:03.591 DEBUG GnomeGlobalShortcutBackend:54 registering 17:34:03.592 WARN GnomeGlobalShortcutBackend:70 gnome settings daemon not registered 17:34:03.592 DEBUG QxtGlobalShortcutBackend:32 registering Mixx fails with $ flatpak run --env=QT_QPA_PLATFORM=wayland org.mixxx.Mixxx Critical [Main]: Failed to create wl_display (No such file or directory) Fatal [Main]: 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, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
I see the same error messages posted in comment 2 trying to open clementine on Arch Linux running Gnome 3.32.2 + flatpak 1.4.2 on Wayland.
I think both applications shouldn't be using "--socket=fallback-x11", because in this case X11 will be used only when Wayland is not available, but on Gnome wayland session it always will be and Qt doesn't use wayland platform plugin on Gnome wayland by default. Btw. both applications do work for me on Plasma wayland session, because there wayland platform plugin is used by defaul, or at least Mixxx starts and Clementine doesn't produce any error mentioned below, but doesn't show up for some reason.
This makes clementine run for me: flatpak run --env=QT_QPA_PLATFORM=xcb --nosocket=fallback-x11 --socket=x11 org.clementine_player.Clementine There seem to be just some incompatibility with Wayland. Just replace --socket=fallback-x11 with --socket=x11 and it will work.
Well, it's certainly a problem. People can't start the applications. Maybe we can find a way to provide a useful error? or to have flatpak not use the fallback-x11 on wayland?
The only thing you can do in the runtime is to revert [1]. Otherwise we can only tell people using Qt apps in flatpak not to use --socket=fallback-x11. [1] - https://github.com/qt/qtbase/commit/36d2ef5af9875afd9d398f5e37102194040cb1d9
If anything, we could tell packagers. Maybe there's a way we can add an error message on the packaging so the build won't succeed?
It makes sense to use "--socket=fallback-x11", because you want to use Wayland whenever possible. Problem is that Qt doesn't think so in case of Gnome. If you now learn people not to use it, they won't change it back in future once Qt decides to use Wayland on Gnome by default. Maybe it's time to change this decision in Qt upstream, btw. we already plan to revert this for Fedora 31 and let Qt apps run nativaly on wayland. I believe it's ready to be used.
--fallback-x11 was disabled a few hours ago but the problem with clementine persists. Latest changes: Subject: Remove --fallback-x11 (1f645c51) Date: 2019-07-18T08:55:53Z Hash: 55050a1d8219