"Could not initialize egl display" when starting a Qt application

Hi all! I’ve spent a few days trying to get an LCD screen working with hardware acceleration, eglfs, on my Beaglebone Black Wireless. My end goal is running a PyQT5 application. After reading some discussions here, I found that the Stretch ImgTec Beaglebone image already has opengl and sgx dependencies installed. After installing that image on my SD and trying to start the test dashboard application as explained here, it just says:

Could not initialize egl display
Aborted

I know that my display is working as it displays a login screen in the terminal with tty1, AND it shows a basic pyqt5 application using linuxfb
on the screen with the command python3 test.py -platform linuxfb.

If I use qt debug variables, it still doesn’t show any errors

cd /usr/lib/arm-linux-gnueabihf/qt5/examples/quickcontrols/extras/dashboard

export QT_LOGGING_RULES=*=true
export QSG_INFO=1
export QT_QPA_EGLFS_DEBUG=1
export QT_DEBUG_PLUGINS=1
export QT_QPA_PLATFORM=eglfs

export QT_QPA_EGLFS_INTEGRATION=none
./dashboard

Extracted output (to keep it short):

Got keys from plugin meta data (“eglfs”)
Got keys from plugin meta data (“linuxfb”)
Got keys from plugin meta data (“minimal”)

Got keys from plugin meta data (“minimalegl”)
Got keys from plugin meta data (“offscreen”)
Got keys from plugin meta data (“xcb”)
loaded library “/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so”

Got keys from plugin meta data (“eglfs_kms_egldevice”)
Got keys from plugin meta data (“eglfs_kms”)
Got keys from plugin meta data (“eglfs_x11”)
QFactoryLoader::QFactoryLoader() checking directory path “/usr/lib/arm-linux-gnueabihf/qt5/examples/quickcontrols/extras/dashboard/egldeviceintegrations” …
qt.qpa.egldeviceintegration: EGL device integration plugin keys: (“eglfs_kms_egldevice”, “eglfs_kms”, “eglfs_x11”)
qt.qpa.egldeviceintegration: Using base device integration
Could not initialize egl display
Aborted

I don’t think an X server is running (searched via ps aux | grep -i x).

I also tried using Buster image without graphics and followed the instruction in the wiki page listed above, but still no dice. Does anyone have any pointers on how to continue with this?

Hi all! I've spent a few days trying to get an LCD screen working with hardware acceleration, eglfs, on my Beaglebone Black Wireless. My end goal is running a PyQT5 application. After reading some discussions here, I found that the Stretch ImgTec Beaglebone image already has opengl and sgx dependencies installed. After installing that image on my SD and trying to start the test dashboard application as explained here, it just says:

Could not initialize egl display
Aborted

I know that my display is working as it displays a login screen in the terminal with tty1, AND it shows a basic pyqt5 application using linuxfb
on the screen with the command `python3 test.py -platform linuxfb`.

If I use qt debug variables, it still doesn't show any errors

cd /usr/lib/arm-linux-gnueabihf/qt5/examples/quickcontrols/extras/dashboard
export QT_LOGGING_RULES=*=true
export QSG_INFO=1
export QT_QPA_EGLFS_DEBUG=1
export QT_DEBUG_PLUGINS=1
export QT_QPA_PLATFORM=eglfs
export QT_QPA_EGLFS_INTEGRATION=none
./dashboard

Extracted output (to keep it short):

Got keys from plugin meta data ("eglfs")
Got keys from plugin meta data ("linuxfb")
Got keys from plugin meta data ("minimal")
Got keys from plugin meta data ("minimalegl")
Got keys from plugin meta data ("offscreen")
Got keys from plugin meta data ("xcb")
loaded library "/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqeglfs.so"
Got keys from plugin meta data ("eglfs_kms_egldevice")
Got keys from plugin meta data ("eglfs_kms")
Got keys from plugin meta data ("eglfs_x11")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/arm-linux-gnueabihf/qt5/examples/quickcontrols/extras/dashboard/egldeviceintegrations" ...
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_kms_egldevice", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: Using base device integration
Could not initialize egl display
Aborted

I don't think an X server is running (searched via `ps aux | grep -i x`).

Correct no x server..

I also tried using Buster image without graphics and followed the instruction in the wiki page listed above, but still no dice. Does anyone have any pointers on how to continue with this?

Imagination wrote a fun with beagle, which helps explain the stretch
imgtec image and egl, etc..

https://university.imgtec.com/fun-with-beagle-gpu/

That ^ might help debug what's wrong..

Regards,

This was posted 24 hours ago but it only was approved right now. Since then I have solved the issue on the Stretch Imagination Technologies image.

  • I updated the kernel using these options: ./update_kernel.sh --ti-channel --lts-4_14 --sgx
  • I had to install an additional package: apt install libdrm-dev
  • I had to do a custom GBM library install, outlined here. Seems not everything was set up correctly as part of the image.

After that it started working. Hope this helps someone

Does anyone know if there is any work being done for a similar image for Debian Buster and kernel 4.19?