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

"Could not find the Qt platform plugin 'wayland-egl'" #1348

Closed
buhtz opened this issue Oct 30, 2022 · 10 comments
Closed

"Could not find the Qt platform plugin 'wayland-egl'" #1348

buhtz opened this issue Oct 30, 2022 · 10 comments
Labels
Bug Distro-Specific only for certain distributions, desktop environments or display servers Qt Qt bugs, code or features Reproduced Wayland Issues related to Wayland-based desktop environments

Comments

@buhtz
Copy link
Member

buhtz commented Oct 30, 2022

Because of the PR #1347 I tried to find out what the problem is behind that PR. I'm not sure if that problem I report here is the same the PR opener tries to solve.

When starting BIT as root (via backintime-qt_polkit script) the IMHO important part of the error output is _qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" in "".

Ubuntu 22 with BIT 1.2.1 from Ubuntu repo

$ ./backintime-qt_polkit  --debug
DEBUG: [common/backintime.py:583 argParse] Arguments: {'debug': True} | unknownArgs: []

Back In Time
Version: 1.2.1

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

DEBUG: [common/backintime.py:670 getConfig] config file: /root/.config/backintime/config
DEBUG: [common/backintime.py:671 getConfig] share path: /root/.local/share/backintime
DEBUG: [common/backintime.py:672 getConfig] profiles: 1=Hauptprofil
DEBUG: [common/pluginmanager.py:90 PluginManager.load] Register plugin path /usr/share/backintime/plugins
DEBUG: [common/pluginmanager.py:106 PluginManager.load] Add plugin notifyplugin.py
qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" 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)

Something about Wayland which is far beyond my expertise. But maybe this report helps to review the PR?

Reproduce with "master" (1.3.3_dev)

$ /usr/bin/backintime-qt_polkit --debug
DEBUG: [common/backintime.py:589 argParse] Arguments: {'debug': True} | unknownArgs: []

Back In Time
Version: 1.3.3-dev

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

DEBUG: [common/backintime.py:677 getConfig] config file: /root/.config/backintime/config
DEBUG: [common/backintime.py:678 getConfig] share path: /root/.local/share/backintime
DEBUG: [common/backintime.py:679 getConfig] profiles: 1=Hauptprofil
DEBUG: [common/pluginmanager.py:240 PluginManager.load] Register plugin path /usr/share/backintime/plugins
DEBUG: [common/pluginmanager.py:257 PluginManager.load] Add plugin notifyplugin.py
qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" 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)

Diagnostics

user@brinkmann ~/backintime/qt (master)$ /usr/bin/backintime-qt_polkit --diagnostics
{
    "backintime": {
        "name": "Back In Time",
        "version": "1.3.3-dev",
        "latest-config-version": 6,
        "local-config-file": "/root/.config/backintime/config",
        "local-config-file-found": true,
        "global-config-file": "/etc/backintime/config",
        "global-config-file-found": false,
        "distribution-package": "/usr/share/backintime",
        "started-from": "/usr/share/backintime/common",
        "running-as-root": true,
        "user-callback": "/root/.config/backintime/user-callback",
        "keyring-supported": false
    },
    "host-setup": {
        "platform": "Linux-5.15.0-52-generic-x86_64-with-glibc2.35",
        "system": "Linux #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022",
        "os-release": {
            "NAME": "Ubuntu",
            "ID": "ubuntu",
            "PRETTY_NAME": "Ubuntu 22.04.1 LTS",
            "VERSION_ID": "22.04",
            "VERSION": "22.04.1 LTS (Jammy Jellyfish)",
            "VERSION_CODENAME": "jammy",
            "ID_LIKE": "debian",
            "HOME_URL": "https://www.ubuntu.com/",
            "SUPPORT_URL": "https://help.ubuntu.com/",
            "BUG_REPORT_URL": "https://bugs.launchpad.net/ubuntu/",
            "PRIVACY_POLICY_URL": "https://www.ubuntu.com/legal/terms-and-policies/privacy-policy",
            "UBUNTU_CODENAME": "jammy"
        },
        "display-system": "($XDG_SESSION_TYPE not set)",
        "locale": "de_DE, UTF-8",
        "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
        "RSYNC_OLD_ARGS": "(not set)",
        "RSYNC_PROTECT_ARGS": "(not set)"
    },
    "python-setup": {
        "python": "3.10.6 main Aug 10 2022 11:40:04 CPython GCC 11.3.0",
        "python-executable": "/usr/bin/python3",
        "python-executable-symlink": true,
        "python-executable-resolved": "/usr/bin/python3.10",
        "sys.path": [
            "/usr/share/backintime/qt/plugins",
            "/usr/share/backintime/common/plugins",
            "/usr/share/backintime/plugins",
            "/usr/share/backintime/common",
            "/usr/share/backintime/qt",
            "/usr/lib/python310.zip",
            "/usr/lib/python3.10",
            "/usr/lib/python3.10/lib-dynload",
            "/usr/local/lib/python3.10/dist-packages",
            "/usr/lib/python3/dist-packages"
        ],
        "qt": "PyQt 5.15.6 / Qt 5.15.3"
    },
    "external-programs": {
        "rsync": "3.2.3",
        "ssh": "OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022",
        "sshfs": "3.7.1",
        "encfs": "1.9.5",
        "shell": "/bin/bash",
        "shell-version": "GNU bash, Version 5.1.16(1)-release (x86_64-pc-linux-gnu)"
    }
}

Possibly related Ubuntu bug tickets

@buhtz buhtz added Qt Qt bugs, code or features Distro-Specific only for certain distributions, desktop environments or display servers Bug labels Oct 30, 2022
@sojusnik
Copy link

Does sudo apt install qtwayland5, then reboot, help?

@phparkle
Copy link

I'm the one who submitted #1347 earlier. Yes, this is the exact problem I was facing. I've tried on a VM as well as on bare metal. The output I get without the --debug flag is:

Back In Time
Version: 1.3.2

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

INFO: Update to config version 6
qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" 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)

Thanks for the quick response and investigation!

@phparkle
Copy link

phparkle commented Oct 30, 2022

Does sudo apt install qtwayland5, then reboot, help?

Yes, it does! With this, Back In Time (root) launches fine without my PR.

@emtiu emtiu added Wayland Issues related to Wayland-based desktop environments Reproduced labels Oct 30, 2022
@emtiu
Copy link
Member

emtiu commented Oct 30, 2022

Possibly related to #836?

@aryoda
Copy link
Contributor

aryoda commented Nov 1, 2022

IMHO this issue is not related to #836 (which shows a quite interesting approach to start BiT root on Wayland - I will assign that issue to me).

@phparkle It looks like this issue is solved by installing the missing dependency so can we close the issue?

BTW: I will add the qtwayland5 dependency to our README since it is still missing there

@phparkle
Copy link

phparkle commented Nov 1, 2022

Ok, sounds good @buhtzz

@buhtz
Copy link
Member Author

buhtz commented Nov 2, 2022

BTW: I will add the qtwayland5 dependency to our README since it is still missing there

Good idea.

I'm not into all details. But in my limited understanding it is the responsibility of the distro maintainer (who creates the package) to make sure that the application can be run on X11 and/or Wayland (depending on what the distro supports) and add the right dependencies to the created package. Am I right so far?

But to prevent further bug tickets can we improve the error message? Can we catch that error? And tell the user something like

  • Open a bug ticket at your distro.
  • Read the upstream FAQ for possible workarounds (e.g. install qtwayland5)

@aryoda
Copy link
Contributor

aryoda commented Nov 2, 2022

@buhtzz The display manager support (X11, Wayland) of an app with a GUI is clearly the responsibility of the app developer and a distro packager simply doesn't know what is supported until we document the dependencies and required configurations to use it. Ubuntu installs XWayland by default if you install Wayland which means all apps that do not support Wayland use the X11 API of XWayland which (partially) uses Wayland internally.

Regarding Wayland there is clearly a bug at our side (I will open another issue for this soon):

  • We are using Qt5 in BiT which supports X11. Qt5 supports Wayland by installing the qtwayland5
  • To use Wayland in Qt5 apps also the env var QT_QPA_ARCHITECTURE must be set to specific value
    (Bug: We do this ONLY in Bit root, not in the BiT userland version so only BiT root uses Wayland which explains why we do not see userland BiT tickets for Wayland)
  • If we do not explicitly configure the BiT launcher script to use Wayland BiT uses X11

Long story short: I see it as our responsibility to

  • document the dependencies
  • to provide launcher scripts that decide on using X11 vs. Wayland (based on whatever decision logic)

For this I would also refrain from catching and throwing "missing dependencies" errors because

  • it only works if distro package maintainers package the new version containing this code
  • packaging a new version means to check and update the dependencies (which means the error no longer occurs)
  • we have no influence on existing installations with missing dependencies (they will always end up here browsing or opening an issue)

@aryoda
Copy link
Contributor

aryoda commented Nov 2, 2022

Ok, sounds good @buhtzz

So we can close the issue now?

@buhtz
Copy link
Member Author

buhtz commented Nov 2, 2022

Thanks for explaining. It helps me. ❤️

So we can close the issue now?

I think so. Just referencing #1350 which is some kind of meta-wayland-issue, right?

@buhtz buhtz closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Distro-Specific only for certain distributions, desktop environments or display servers Qt Qt bugs, code or features Reproduced Wayland Issues related to Wayland-based desktop environments
Projects
None yet
Development

No branches or pull requests

5 participants