Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtWayland error on Raspberry Pi



  • Hello,
    I want to use wayland as my windowing system. Qt Cross compilation went really ok, without no errors (using Qt5.8 downloaded from download.qt.io).

    Cross compilation of qwindow-compositor is without any error too. But when I want to run app on my raspberry Pi, wierd error occures:

    QtCompositor: Failed to initialize EGL display. There is no EGL_WL_bind_wayland_display extension.

    I have tried to log this error via export QT_LOGGING_RULES=qt.qpa.*=true but that doesnt give me any information while the application
    cannot be started:

    qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm", "eglfs_kms")
    qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_kms")
    qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
    qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
    [9;0]Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    qt.qpa.input: libinput: input device 'CHICONY USB Keyboard', /dev/input/event0 is tagged by udev as: Keyboard
    qt.qpa.input: libinput: input device 'CHICONY USB Keyboard', /dev/input/event0 is a keyboard
    qt.qpa.input: libinput: input device 'CHICONY USB Keyboard', /dev/input/event1 is tagged by udev as: Keyboard
    qt.qpa.input: libinput: input device 'CHICONY USB Keyboard', /dev/input/event1 is a keyboard
    qt.qpa.input: Using xkbcommon for key mapping
    QtCompositor: Failed to initialize EGL display. There is no EGL_WL_bind_wayland_display extension.
    

    Can you help me with this error, please?

    Using Raspberry Pi 3B with raspbian. Cross compilation was performed with config options:

    -opengl
    es2
    -optimized-qmake
    -no-pch
    -make
    libs
    -make
    tools
    -reduce-exports
    -sysroot
    /home/lukas/raspberry/sysroot
    -device
    linux-rasp-pi2-g++
    -device-option
    CROSS_COMPILE=/home/lukas/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-
    -prefix
    /usr/local/rasp
    -opensource
    -nomake
    examples
    -nomake
    tests
    -confirm-license
    -skip
    qtwebengine
    -skip
    qtsensors
    -skip
    qtgamepad
    -skip
    qtmacextras
    -skip
    qtandroidextras
    -prefix
    /usr/local/qt5pi
    -extprefix
    /home/lukas/raspi/qt5pi
    -hostprefix
    /home/lukas/raspi/qt5
    


  • Did you export XDG_RUNTIME?

    Try:

    mkdir $HOME/.xdg
    export XDG_RUNTIME_DIR=$HOME/.xdg
    export QT_QPA_PLATFORM=wayland-brcm
    /home/user/your-app-qt -platform eglfs &
    

    Or:

    mkdir $HOME/.xdg
    export XDG_RUNTIME_DIR=$HOME/.xdg
    
    wayland-compositor &
    /home/user/your-app-qt -platform wayland
    

    I hope it helps!


    Cleiton Bueno

    Blog | Linkedin | B2Open



  • Thanks for the answer!

    I have tried that but the error still occurs. I have already tried to use previous version 5.7 of Qt but the result is not different at all.



  • Hi sedlalu2,

    the only way I got the raspberry pi (3 in my case) to work with wayland and egl was to use the vc4 driver.
    Additional I hade to cross-compile qt with the mkspec for linux-rasp-pi3-g++ and changed EGLFS_DEVICE_INTEGRATION
    in qmake.conf to eglfs_kms. Then I had to adjust the symlinks for libEGL.so and libGLESv2.so from /opt/vc/lib
    to /usr/lib/arm-linux-gnueabihf.

    Using vc4 has no notable drawback compared using the eglfs_brcm device integration, but the performance is
    very poor on weston and even worse on the qtwayland compositors.


Log in to reply