Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open gl with qt5 in weston turns black #1433

Open
brettermeier opened this issue Dec 7, 2023 · 4 comments
Open

open gl with qt5 in weston turns black #1433

brettermeier opened this issue Dec 7, 2023 · 4 comments

Comments

@brettermeier
Copy link

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
Copy link
Member

dwalkes commented Dec 9, 2023

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
Copy link
Author

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
Copy link
Contributor

kekiefer commented Dec 11, 2023

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.

  • do the regular examples included with weston work? how about the weston opengl examples (weston-simple-egl)
  • does Qt work on its own in eglfs mode (not running through weston)?
  • are there particular Qt examples that do work, maybe some that handle rendering in different ways?
  • does a QtWayland-based compositor work better than weston here?

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

@ichergui
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants