Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
Forum Updated to NodeBB v4.3 + New Features

qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
rdpscreen-sharewaylandweston
3 Posts 3 Posters 5.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    M4Z4
    wrote on 13 Jan 2023, 11:18 last edited by M4Z4
    #1

    Seems, that the Qt application doesn't start after adding the "--modules=screen.share.so" to services.

    Any tips how to debug/fix the problem?

    HW/SW

    iMX8

    ID=poky
    NAME="Poky (Yocto Project Reference Distro)"
    VERSION="3.3 (hardknott)"
    VERSION_ID=3.3
    PRETTY_NAME="Poky (Yocto Project Reference Distro) 3.3 (hardknott)"
    root@sm2s-imx8mp:/etc/systemd/system#

    Basic overview:

    Trying to create RDP connection to a Qt GUI-application.

    Running “first” weston with…
    drm-backend
    screen-share
    Qt-application (CPX Control Panel is the Qt application)

    …and RDP command is executed from weston.ini*, when the “second” Weston is started

    • rdp-backend
    • fullscreen-shell

    *=weston.ini

    [screen-share]
    command=@bindir@/weston --backend=rdp-backend.so --rdp-tls-cert=/data/etc/ssh/tls.crt --rdp-tls-key=/data/etc/ssh/tls.key --shell=fullscreen-shell.so --no-clients-resize --no-config
    start-on-startup=true
    
    

    CPX service

    ############

    Wayland

    ############
    export QT_QPA_PLATFORM=wayland-egl
    export WAYLAND_DISPLAY=wayland-0

    if test -z "$XDG_RUNTIME_DIR"; then
    export XDG_RUNTIME_DIR=/run/user/id -u
    fi

    Weston plugins

    [Service]

    Requires systemd-notify.so Weston plugin.

    Type=notify
    EnvironmentFile=/etc/default/weston
    ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log --modules=systemd-notify.so --modules=screen.share.so

    root@sm2s-imx8mp:~# journalctl -u cpx.service
    -- Journal begins at Fri 2023-01-13 08:19:03 CET, ends at Fri 2023-01-13 10:26:26 CET. --
    Jan 13 08:20:06 sm2s-imx8mp systemd[1]: Started CPX Control Panel.
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.core.logging: Loading "logging.ini" ...
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: Failed to create wl_display (No such file or directory)
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: EGL: Warning: No default display support on wayland
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.qpa.wayland: EGL not available
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the app>
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: Available platform plugins are: wayland, offscreen, vnc, minimal, minimalegl, vkkhrdisplay, eglfs, waylan>
    Jan 13 08:20:06 sm2s-imx8mp cpx.sh[764]: /opt/cpx/cpx.sh: line 84:   769 Aborted                 ./cpx --display=LVDS-1 --rotate=0 "$@"
    Jan 13 08:20:06 sm2s-imx8mp systemd[1]: cpx.service: Main process exited, code=exited, status=134/n/a
    Jan 13 08:20:06 sm2s-imx8mp systemd[1]: cpx.service: Failed with result 'exit-code'.
    

    I’ve also run the Qt with DEBUG option(QT_DEBUG_PLUGINS=1) and here is the log:

    Jan 13 11:55:32 sm2s-imx8mp systemd[1]: Started CPX Control Panel.
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.logging: Loading "logging.ini" ...
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: checking directory path "/usr/lib/plugins/platforms" ...
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqwayland-generic.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqwayland-generic.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "wayland"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QWaylandIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqoffscreen.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqoffscreen.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "offscreen"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QOffscreenIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqvnc.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqvnc.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "vnc"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QVncIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqminimal.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqminimal.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "minimal"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QMinimalIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqminimalegl.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqminimalegl.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "minimalegl"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QMinimalEglIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqvkkhrdisplay.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqvkkhrdisplay.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "vkkhrdisplay"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QVkKhrDisplayIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqeglfs.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqeglfs.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "eglfs"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QEglFSIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqwayland-egl.so"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqwayland-egl.so, metadata=
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "wayland-egl"
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QWaylandEglPlatformIntegrationPlugin",
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: checking directory path "/opt/cpx/platforms" ...
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.library: "/usr/lib/plugins/platforms/libqwayland-egl.so" loaded library
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: Failed to create wl_display (Connection refused)
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: EGL: Warning: No default display support on wayland
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.qpa.wayland: EGL not available
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: Available platform plugins are: wayland, offscreen, vnc, minimal, minimalegl, vkkhrdisplay, eglfs, wayland-egl.
    Jan 13 11:55:32 sm2s-imx8mp audit[1628]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1628 comm="cpx" exe="/opt/cpx/cpx" sig=6 res=1
    Jan 13 11:55:32 sm2s-imx8mp kernel: audit: type=1701 audit(1673607332.178:39): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1628 comm="cpx" exe="/opt/cpx/cpx" sig=6 res=1
    Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1624]: /opt/cpx/cpx.sh: line 84:  1628 Aborted                 ./cpx --display=LVDS-1 --rotate=0 "$@"
    Jan 13 11:55:32 sm2s-imx8mp systemd[1]: cpx.service: Main process exited, code=exited, status=134/n/a
    Jan 13 11:55:32 sm2s-imx8mp systemd[1]: cpx.service: Failed with result 'exit-code'.
    
    N 1 Reply Last reply 13 days ago
    0
    • S Offline
      S Offline
      sh1981
      wrote on 10 Oct 2024, 06:56 last edited by sh1981 10 Oct 2024, 07:17
      #2

      When configure Qt, did you add the following arguments?
      It seems that the package won't be built unless you explicitly use them.
      -eglfs -qpa wayland-egl -qpa xcb

      1 Reply Last reply
      0
      • M M4Z4
        13 Jan 2023, 11:18

        Seems, that the Qt application doesn't start after adding the "--modules=screen.share.so" to services.

        Any tips how to debug/fix the problem?

        HW/SW

        iMX8

        ID=poky
        NAME="Poky (Yocto Project Reference Distro)"
        VERSION="3.3 (hardknott)"
        VERSION_ID=3.3
        PRETTY_NAME="Poky (Yocto Project Reference Distro) 3.3 (hardknott)"
        root@sm2s-imx8mp:/etc/systemd/system#

        Basic overview:

        Trying to create RDP connection to a Qt GUI-application.

        Running “first” weston with…
        drm-backend
        screen-share
        Qt-application (CPX Control Panel is the Qt application)

        …and RDP command is executed from weston.ini*, when the “second” Weston is started

        • rdp-backend
        • fullscreen-shell

        *=weston.ini

        [screen-share]
        command=@bindir@/weston --backend=rdp-backend.so --rdp-tls-cert=/data/etc/ssh/tls.crt --rdp-tls-key=/data/etc/ssh/tls.key --shell=fullscreen-shell.so --no-clients-resize --no-config
        start-on-startup=true
        
        

        CPX service

        ############

        Wayland

        ############
        export QT_QPA_PLATFORM=wayland-egl
        export WAYLAND_DISPLAY=wayland-0

        if test -z "$XDG_RUNTIME_DIR"; then
        export XDG_RUNTIME_DIR=/run/user/id -u
        fi

        Weston plugins

        [Service]

        Requires systemd-notify.so Weston plugin.

        Type=notify
        EnvironmentFile=/etc/default/weston
        ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log --modules=systemd-notify.so --modules=screen.share.so

        root@sm2s-imx8mp:~# journalctl -u cpx.service
        -- Journal begins at Fri 2023-01-13 08:19:03 CET, ends at Fri 2023-01-13 10:26:26 CET. --
        Jan 13 08:20:06 sm2s-imx8mp systemd[1]: Started CPX Control Panel.
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.core.logging: Loading "logging.ini" ...
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: Failed to create wl_display (No such file or directory)
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: EGL: Warning: No default display support on wayland
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.qpa.wayland: EGL not available
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the app>
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: Available platform plugins are: wayland, offscreen, vnc, minimal, minimalegl, vkkhrdisplay, eglfs, waylan>
        Jan 13 08:20:06 sm2s-imx8mp cpx.sh[764]: /opt/cpx/cpx.sh: line 84:   769 Aborted                 ./cpx --display=LVDS-1 --rotate=0 "$@"
        Jan 13 08:20:06 sm2s-imx8mp systemd[1]: cpx.service: Main process exited, code=exited, status=134/n/a
        Jan 13 08:20:06 sm2s-imx8mp systemd[1]: cpx.service: Failed with result 'exit-code'.
        

        I’ve also run the Qt with DEBUG option(QT_DEBUG_PLUGINS=1) and here is the log:

        Jan 13 11:55:32 sm2s-imx8mp systemd[1]: Started CPX Control Panel.
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.logging: Loading "logging.ini" ...
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: checking directory path "/usr/lib/plugins/platforms" ...
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqwayland-generic.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqwayland-generic.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "wayland"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QWaylandIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqoffscreen.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqoffscreen.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "offscreen"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QOffscreenIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqvnc.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqvnc.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "vnc"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QVncIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqminimal.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqminimal.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "minimal"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QMinimalIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqminimalegl.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqminimalegl.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "minimalegl"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QMinimalEglIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqvkkhrdisplay.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqvkkhrdisplay.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "vkkhrdisplay"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QVkKhrDisplayIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqeglfs.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqeglfs.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "eglfs"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QEglFSIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqwayland-egl.so"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqwayland-egl.so, metadata=
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "MetaData": {
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         "Keys": [
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:             "wayland-egl"
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:         ]
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     },
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "archlevel": 0,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "className": "QWaylandEglPlatformIntegrationPlugin",
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "debug": false,
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]:     "version": 394240
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: }
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: checking directory path "/opt/cpx/platforms" ...
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.library: "/usr/lib/plugins/platforms/libqwayland-egl.so" loaded library
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: Failed to create wl_display (Connection refused)
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: EGL: Warning: No default display support on wayland
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.qpa.wayland: EGL not available
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: Available platform plugins are: wayland, offscreen, vnc, minimal, minimalegl, vkkhrdisplay, eglfs, wayland-egl.
        Jan 13 11:55:32 sm2s-imx8mp audit[1628]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1628 comm="cpx" exe="/opt/cpx/cpx" sig=6 res=1
        Jan 13 11:55:32 sm2s-imx8mp kernel: audit: type=1701 audit(1673607332.178:39): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1628 comm="cpx" exe="/opt/cpx/cpx" sig=6 res=1
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1624]: /opt/cpx/cpx.sh: line 84:  1628 Aborted                 ./cpx --display=LVDS-1 --rotate=0 "$@"
        Jan 13 11:55:32 sm2s-imx8mp systemd[1]: cpx.service: Main process exited, code=exited, status=134/n/a
        Jan 13 11:55:32 sm2s-imx8mp systemd[1]: cpx.service: Failed with result 'exit-code'.
        
        N Offline
        N Offline
        nbaldy
        wrote 13 days ago last edited by
        #3

        @M4Z4
        Hi, I'm not 100% sure I follow your launching process, but the error you're getting looks a lot like you are not setting the wayland display export in the same terminal as you run the QT application.

        Specifically, this part of the error message:

        
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.plugin.factoryloader: checking directory path "/opt/cpx/platforms" ...
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.core.library: "/usr/lib/plugins/platforms/libqwayland-egl.so" loaded library
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: Failed to create wl_display (Connection refused)
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: EGL: Warning: No default display support on wayland
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.qpa.wayland: EGL not available
        Jan 13 11:55:32 sm2s-imx8mp cpx.sh[1628]: qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
        

        The connection to the display screen is refused. It looks like either 1) Your path to the wayland display is wrong (check ls -l ${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY} before running your QT application) or 2) the user running QT does not have permissions. You should be able to see test applications like weston-flower work as well

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved