Qt App Rendering Distortion on Qt Wayland Compositor in Raspberry Pi 4B
-
Hi,
I'm currently encountered with rendering distortion of app's GUI running on Qt Wayland Compositor.
I'm using custom Yocto Linux image to build in-vehicle infotainment system on Raspberry Pi 4B.It looks like this:
The thing is, if I enforce it to render the apps with CPU using
QT_QUICK_BACKEND=software
flag, it works fine.
But if I remove the flag and let the default flag (QT_QUICK_BACKEND=wayland-egl
) be set, then the distortion occurs.
I think there is a problem about graphical resource integration between my Qt apps and the Qt Wayland Compositor.Below are some source files for my compositor and one of my Qt apps included in my Yocto image:
// ivi-compositor.service [Unit] Description=Qt Wayland Compositor Service After=graphical.target [Service] Type=simple ExecStart=/usr/bin/ivi-compositor Environment="XDG_RUNTIME_DIR=/run/user/0" Environment="QT_QPA_PLATFORM=eglfs" Environment="WAYLAND_DEBUG=1" Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target
// head-unit.service - one of Qt GUI apps [Unit] Description=Head Unit Service After=ivi-compositor.service BindsTo=ivi-compositor.service [Service] Type=simple ExecStart=/usr/bin/head-unit Environment="XDG_RUNTIME_DIR=/run/user/0" Environment="QT_IVI_SURFACE_ID=1000" Environment="QT_QPA_PLATFORM=wayland" Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target
And part of Yocto local.conf setting:
// build/conf/local.conf MACHINE ?= "raspberrypi4-64" PREFERRED_VERSION_linux-raspberrypi = "6.1%" DISTRO_FEATURES:append = " systemd bluetooth wayland pam opengl kms" DISTRO_FEATURES:remove = " x11 sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" LICENSE_FLAGS_ACCEPTED += "commercial" IMAGE_BOOT_FILES:append = " vc4-kms-dsi-waveshare-panel.dtbo;overlays/vc4-kms-dsi-waveshare-panel.dtbo"
I also installed
mesa
to my image for OpenGL and EGL.I have no idea what am I missing.