Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Yocto build 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.
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
yocto
5 Posts 3 Posters 2.3k Views
  • 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.
  • R Offline
    R Offline
    rtvideo
    wrote on last edited by
    #1

    Hello, I built the freescale yocto build using distro fslc-xwayland and building the fsl-image-multimedia-full image. My target machine is an imx8mqevk. I am trying to deploy my Qt application made on an ubuntu desktop to the imx8. When deplying through ssh I get: 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.

    I believe I have all the necessary libraries now on the imx8 to run the program except for this error.

    Does anyone know what I would need to add to my build or local.conf file in order to remove this error?

    JonBJ 1 Reply Last reply
    0
    • R rtvideo

      Hello, I built the freescale yocto build using distro fslc-xwayland and building the fsl-image-multimedia-full image. My target machine is an imx8mqevk. I am trying to deploy my Qt application made on an ubuntu desktop to the imx8. When deplying through ssh I get: 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.

      I believe I have all the necessary libraries now on the imx8 to run the program except for this error.

      Does anyone know what I would need to add to my build or local.conf file in order to remove this error?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @rtvideo
      Set environment variable QT_DEBUG_PLUGINS=1 (in target environment), run your app, look at the (end of) diagnostic output. And run ldd on target machine.

      If an not expert, but "could not connect to display" in the past has indicated a missing X DISPLAY environment variable, is that relevant to "Yocto" and ssh?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rtvideo
        wrote on last edited by rtvideo
        #3

        @JonB When running after doing the debugging, I get pretty much the same message.
        "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: minimal, offscreen, vnc, xcb."

        I am afraid this has to do with the IMX8 not supporting X11. Do you think that would be why I am getting this?

        JonBJ 1 Reply Last reply
        0
        • R rtvideo

          @JonB When running after doing the debugging, I get pretty much the same message.
          "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: minimal, offscreen, vnc, xcb."

          I am afraid this has to do with the IMX8 not supporting X11. Do you think that would be why I am getting this?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @rtvideo
          Although it may not help and I may be incorrect, I think we expect more than this once you set the debugging environment variable correctly. How exactly did you do that?

          If you Google for Yocto qt.qpa.xcb could not connect to display , with & without the Yocto, you will have plenty to look through.

          It may well be that you need X11, I don't know enough to know. Sometimes @Pablo-J-Rogina, if he sees this, seems to tell people that? :)

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            Well, if your target sysroot does not provide X11, then the xcb backend won't work. Either add X11 to your target or select a more appropriate backend like EGLFS, LinuxFB, wayland, etc.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1

            • Login

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