Framebuffer with EGLFS : QXcbConnection: Could not connect to display :0.0

Target: Colibri-imx6

I want to compare running QT5 applications with X11 and Framebuffer-EGLFS

This is my procedure, following Openembedded (Core):

  1. Create a LXDE image with Qt5 (X11): bitbake -k angstron-lxde-image
  2. Create a SD card with the LXDE image
  3. Configure QT Creator
  4. Cross Compile and execute (successfully) a QT5 basic “./helloword” application
  5. Modify local.conf for EGLFS and create other image : bitbake -k console-trdx-image
  6. Create a SD card with theconsole-trdx-image
  7. Copy the “./helloworld” application to the new console-trdx-image linux image
  8. When I execute “./helloword” application I get this error: QXcbConnection: Could not connect to display :0.0

*root@colibri-imx6-egfls:~# ./helloworld

QXcbConnection: Could not connect to display :0.0

Aborted

root@colibri-imx6-egfls:~#*

What is wrong?

Yes I did follow this article

My helloword is basic QT Widget application.

Executing with --platform eglfs return this error:

root@colibri-imx6-egfls:~# ./helloworld3 --platform eglfs

This application failed to start because it could not find or load the Qt platform plugin “eglfs”.

Available platform plugins are: minimal, offscreen, xcb.

Reinstalling the application may fix this problem.

Aborted

root@colibri-imx6-egfls:~#

Then it seems you did not create EGLFS based image correctly. See the answer on this post. The instructions would also be applicable for Colibri iMX6.

Thank you sanchayan.tx. I’ll repeat image creation.

While creating EGLFS console-trdx-image did you follow the instructions as per this article.

Is your helloworld application a QT widget based application? Does it work if you execute it as below

./helloworld --platform eglfs

Without specifying the above it would look for Qt platform plugin “xcb” and default X display.

Please note the following Every time one changes the DISTRO_FEATURES, one has to remove all build output and sstate cache, in our setup remove the directories build/out-glibc and build/sstate-cache, if present from any previous build.