OpenGL not working on wlroots based compositor

Hi, we are working on getting some form of vnc working on our verdin imx8mp boards for easier access while in the field.
For this we decided to use sway combined with wayvnc for proper support

We have sway working with wayvnc on our system and can start some simple graphical applications like foot and the qt widgets template app.
But cannot get any program to run that requires the use of OpenGL, they all segfault from wl_proxy_set_queue in libwayland-client.so.0 (backtrace from glmark2-es2-wayland and the qtquick template app attached below).

Is the mesa implementation incompatible with the Vivante GPU or are me missing a package?

Thanks in advance.

Hardware:
Verdin iMX8M Plus Quad 2GB V.10B
Verdin Development Board V1.1B
Linux kirkstone-6.x.y bsp based on tdx-reference-minimal-image

gdb-log-glmark2-es2-wayland.txt (1.8 KB)
gdb-log-qtquick.txt (3.5 KB)

Hi @BasDingemans ,

Thank you for your question.

What I noticed is that you are using the tdx-reference-minimal-image. The minimal image is a command line only image. So I assume that all the features related to multimedia and GPU are not enabled there.

First thing I would like to try here is to use the multimedia image instead and see if that changes anything.

If that does not affect the behaviour, then I would suggest that you try BSP 5.7 instead of BSP 6.

Let us know if any of this changes the behaviour.

Best Regards
Kevin

Hi @kevin.tx ,

Thanks for you response.
The custom image I am building is identical to tdx-reference-multimedia-image safe for the inclusion of one of our own piece of software and the exclusion of wayland-qtdemo-launch-cinematicexperience, but per your sugestion I have changed the main image to require tdx-reference-multimedia-image and am experiencing the same error.

I’ve also built an image based on the dunfell-5.x.y branch in your repo’s, both with tdx-reference-multimedia-image and tdx-reference-minimal-image as a base and it too, sadly, receives the same errors.

Might Weston functioning be caused by a patch NXP made for it, while wlroots is lacking that patch?
Or is there maybe a package or library I’m missing?

Best Regards,
Bas Dingemans

Hi @BasDingemans

Unfortunately, the iMX8MP still needs the proprietary Vivante GPU drivers (as far as I can tell, there is no support for etnaviv yet) and is therefore not really compatible with mesa. Did you install libEGL from the Vivante package or the one from Mesa?
The following EGL and OpenGL libraries have to be used:

This should typically be the case if you use the downstream BSP. Find more information about this here (search for upstream):

I honestly do not know how if the downstream OpenGL libraries support your use case and if everything wayvnc needs is supported.
Do sway and the Qt application work when you have a display attached or do they crash there too? The reason why the other applications work is that they normally don’t need GPU support (if they are based on qt widgets). As soon as qtquick is used Qt requires an OpenGL context.

Regards
Stefan

Hi @stefan_e.tx,

We are indeed using the proprietary Vivante GPU drivers, I’ve tried to use libEGL from both mesa and the vivante recipe and both gave the same errors.
It seems we need to wait for nxp to improve the support or for weston to support multi-backend and hope the downstream version gets that update as well.

All test up until now have been done with a monitor attached without vnc running.

I thank both you and Kevin for your help, but will work on some other avenues to achieve a hopefully similar end-result.

If there are any more developments on this issue do let me know, we will hopefully be able to make this solution work at a later date.

Kind regards,
Bas Dingemans