OE4T / meta-tegra

BSP layer for NVIDIA Jetson platforms, based on L4T
MIT License
385 stars 216 forks source link

open gl with qt5 in weston turns black #1433

Open brettermeier opened 7 months ago

brettermeier commented 7 months ago

Describe the bug I tried to build an image for a nano with qt5 and weston. Everything is fine, it booted to the weston desktop and I can start the examples from qt5. When I started the example with opengl, in specific situations the application turns black. For example: /usr/share/examples/opengl/qopenglwidget/qopenglwidget --platform wayland-egl As soon as you try to add a new widget with the button in the left upper corner, the application turns black. I tested it with an original nano image from nvidia. Started weston with this doc and it worked fine.

To Reproduce I created an image with https://github.com/OE4T/tegra-demo-distro for a nano, used the branch kirkstone-l4t-r32.7.x and created the image demo-image-weston. I added meta-qt5 to the bblayers in the conf folder and added

IMAGE_INSTALL:append = " \
         qtbase-plugins \
         qtbase-examples \
         qtwayland \
         "

to layer.conf.

I extended meta-tegra/external/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend with

PACKAGECONFIG:append:tegra = " eglfs kms"
PACKAGECONFIG:append = " gles2 examples eglfs gl widgets"

and added the file meta-tegra/external/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend PACKAGECONFIG:remove = "xcomposite-glx"

dwalkes commented 7 months ago

Thanks for the detailed steps to reproduce. I haven't had a chance to try yet yet, however one thing I've noticed when chasing a different issue is that the meta-qt layer for kirkstone (and master) is behind the upstream and missing a few releases. You might try moving to the latest at https://code.qt.io/cgit/qt/qtbase.git/log/?h=5.15 to ensure this hasn't already been found/fixed there.

Also I think it will be important to look for error logs, although I don't exactly know where they'd be in this case. I'd probably just start by dumping dmesg and journalctl to see if there are any clues.

brettermeier commented 7 months ago

Hi, thanks for the fast response. I tried the version 5.15.11, but it didn't change anything. Sadly there is no output in dmesg or journalctl.

I tried the example with the official nano sd card image, and it worked fine. The qt version which it installs via apt is much older (5.9.5): That's why I thought this isn't a bug in QT or weston but a configuration problem. But I'm quite unfamiliar with yocto and QT.

kekiefer commented 7 months ago

I guess we have quite a few possibilities here - a problem with Weston, a problem with Qt, a problem with the EGL libraries in L4T, or some combination of these. Unfortunately it's not a simple setup. Here's a few things to try and see if we get any hints.

Any further debug information from strace, gdb, or even with WAYLAND_DEBUG enabled might be helpful.

ichergui commented 1 month ago

Hi @brettermeier Any update on this ? Otherwise I will close it.