Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

xcb Qt platform plugin could be initialized on beaglebone ai SoC



  • Hi all,

    I am trying to launch the Basler software package to drive a camera. I have a functional screen attached and I can run my own pyqt stuff with no issues. However when I try to launch this 3rd party program I get the following

    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
    
    Aborted
    
    

    I have seen other threads reference incorrect paths or setting the display and I have tried these things for no luck. Hopefully someone can help me here.

    Thanks in advance

    UPDATE

    some aditional debug info

    debian@beaglebone:/opt/pylon/bin$ export QT_DEBUG_PLUGINS=1
    debian@beaglebone:/opt/pylon/bin$ ./pylonviewer
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/pylon/lib/Qt/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqeglfs.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqeglfs.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "eglfs"
            ]
        },
        "archreq": 0,
        "className": "QEglFSIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("eglfs")
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqlinuxfb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "linuxfb"
            ]
        },
        "archreq": 0,
        "className": "QLinuxFbIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqminimal.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqminimal.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "archreq": 0,
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqminimalegl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimalegl"
            ]
        },
        "archreq": 0,
        "className": "QMinimalEglIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("minimalegl")
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqoffscreen.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "archreq": 0,
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqvnc.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqvnc.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "vnc"
            ]
        },
        "archreq": 0,
        "className": "QVncIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("vnc")
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqwebgl.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqwebgl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "webgl"
            ]
        },
        "archreq": 0,
        "className": "QWebGLIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("webgl")
    QFactoryLoader::QFactoryLoader() looking at "/opt/pylon/lib/Qt/plugins/platforms/libqxcb.so"
    Found metadata in lib /opt/pylon/lib/Qt/plugins/platforms/libqxcb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "xcb"
            ]
        },
        "archreq": 0,
        "className": "QXcbIntegrationPlugin",
        "debug": false,
        "version": 330752
    }
    
    
    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/pylon/bin/platforms" ...
    loaded library "/opt/pylon/lib/Qt/plugins/platforms/libqxcb.so"
    qt.qpa.xcb: could not connect to display 
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
    
    Aborted
    
    

    and ldd on the library

    debian@beaglebone:/opt/pylon/bin$ ldd /opt/pylon/lib/Qt/plugins/platforms/libqxcb.so
    	linux-vdso.so.1 (0xbec8d000)
    	libQt5XcbQpa.so.5 => /opt/pylon/lib/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0xb6ec7000)
    	libQt5Gui.so.5 => /opt/pylon/lib/Qt/plugins/platforms/../../lib/libQt5Gui.so.5 (0xb6add000)
    	libQt5Core.so.5 => /opt/pylon/lib/Qt/plugins/platforms/../../lib/libQt5Core.so.5 (0xb663c000)
    	libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb65f6000)
    	libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb64eb000)
    	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb63f1000)
    	/lib/ld-linux-armhf.so.3 (0xb6f7f000)
    	libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0xb63b5000)
    	libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb6337000)
    	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6312000)
    	libX11-xcb.so.1 => /usr/lib/arm-linux-gnueabihf/libX11-xcb.so.1 (0xb6300000)
    	libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb620d000)
    	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6192000)
    	libxkbcommon.so.0 => /usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0 (0xb6152000)
    	libxkbcommon-x11.so.0 => /usr/lib/arm-linux-gnueabihf/libxkbcommon-x11.so.0 (0xb613c000)
    	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6113000)
    	libGL.so.1 => /usr/lib/arm-linux-gnueabihf/libGL.so.1 (0xb6091000)
    	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb607e000)
    	libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb606b000)
    	libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb6057000)
    	libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb6022000)
    	libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0xb600c000)
    	libpng16.so.16 => /usr/lib/arm-linux-gnueabihf/libpng16.so.16 (0xb5fda000)
    	libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb5fb6000)
    	libxcb-xkb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb-xkb.so.1 (0xb5f94000)
    	libGLX.so.0 => /usr/lib/arm-linux-gnueabihf/libGLX.so.0 (0xb5f79000)
    	libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0xb5ef9000)
    	libbsd.so.0 => /usr/lib/arm-linux-gnueabihf/libbsd.so.0 (0xb5ed6000)
    	libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0xb5ebb000)
    	librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb5ea5000)
    
    


  • @qt_BoneMan said in xcb Qt platform plugin could be initialized on beaglebone ai SoC:

    qt.qpa.xcb: could not connect to display

    Not my area, your libraries/paths are OK. But you haven't set your DISPLAY or similar environment variable?



  • @JonB Thanks for the reply. I have tried setting DISPLAY=:0 but that did not solve my issue. Further my gui that I made myself works fine with the caveat that I run it with --platform linuxfb. It seems I have no choice in terms of plug-ins since I did not make the SW and I have to use xcb.

    I just tried to run my gui with the --platform xcb and I get

    debian@beaglebone:~$ python3 run_test2.py  --platform xcb
    qt.qpa.screen: QXcbConnection: Could not connect to display 
    Could not connect to any X display.
    debian@beaglebone:~$ python3 run_test2.py  --platform linuxfb
    debian@beaglebone:~$ echo $DISPLAY
    
    debian@beaglebone:~$ export DISPLAY=:0
    debian@beaglebone:~$ echo $DISPLAY
    :0
    debian@beaglebone:~$ python3 run_test2.py  --platform xcb
    qt.qpa.screen: QXcbConnection: Could not connect to display :0
    Could not connect to any X display.
    
    

    so it is something with xcb and I am not sure what the key differences are in the plugins


  • Lifetime Qt Champion

    Hi,

    To use the XCB backend, you need to have an X11 server running.



  • Installing and running an X11 server resolved my issue thanks!!!


Log in to reply