Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt App Rendering Distortion on Qt Wayland Compositor in Raspberry Pi 4B
Forum Updated to NodeBB v4.3 + New Features

Qt App Rendering Distortion on Qt Wayland Compositor in Raspberry Pi 4B

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 148 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.
  • C Offline
    C Offline
    cobook
    wrote on 9 Jan 2025, 20:20 last edited by
    #1

    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:
    distortion.jpeg

    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.

    1 Reply Last reply
    0

    1/1

    9 Jan 2025, 20:20

    • Login

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