TK1 QT apps are unable to render - glamoregl couldn't get display device

After bringing up our product on Apalis TK1 eval-1.2 and the 3.10 kernel, we found that even our minor usage of the Nvidia Tegra 124m to do basic animations had failed for some time. I forced the glx module to load and it sort of worked again, but some users reported glitches when using date/time widgets (basic QT animation clip worked OK again). In the course of trying to fix that and beef up the rendering, we moved up to the Toradex mainline:

apalis-tk1-mainline:~/tmp$ uname -a Linux apalis-tk1-mainline
5.4.34-4.0.0-devel+git.1830688f426a #1 SMP PREEMPT Tue Apr 28 21:59:14 UTC 2020 armv7l armv7l armv7l GNU/Linux

But at this point we couldn’t even get a basic QT animation to work again. We’ve tried X and abandoning X, Nouveau, DirectFB with no display manager at all etc. but I have not been able to do more than display a simple JPEG (which does work). But apps like glxgears and qmlvideo show a black screen.

My Xorg.0.log: link text
dmesg output: link text

No xorg.conf file or added /usr/share/X11/xorg.conf.d/* files. But the framebuffer has been picked up:

apalis-tk1-mainline:~/tmp$ grep tegradrmfb /var/tmp/dmesg.txt
[    6.052445] drm drm: fb0: tegradrmfb frame buffer device
apalis-tk1-mainline:~/tmp$ cat /proc/fb
0 tegradrmfb

The app that works displaying a simple JPEG image, run with EGL_LOGLEVEL=debug, gives this output:

apalis-tk1-mainline:~/tmp$ ./GUITestApp
libEGL warning: DRI2: failed to authenticate
libEGL debug: MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
libEGL debug: MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize
libEGL debug: Native platform type: x11 (build-time configuration)
libEGL warning: DRI2: failed to authenticate
libEGL debug: MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
libEGL debug: MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize
qt.qpa.xcb: xcb_shm_create_segment() failed for size 1536000

At this point at least the static image displays on the screen. But under similar circumstances, here’s what qmlvideofx and glxgears produce:

apalis-tk1-mainline:~/tmp/video/qmlvideofx$ ./qmlvideofx
libEGL warning: DRI2: failed to authenticate
libEGL debug: MESA-LOADER: dlopen(/usr/lib/dri/swrast_dri.so)
libEGL debug: MESA-LOADER: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libEGL warning: did not find extension DRI_Core version 1
libEGL warning: did not find extension DRI_SWRast version 2
libEGL debug: MESA-LOADER: dlopen(/usr/lib/dri/swrast_dri.so)
libEGL debug: MESA-LOADER: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libEGL warning: did not find extension DRI_Core version 1
libEGL warning: did not find extension DRI_SWRast version 2
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize
libEGL debug: Native platform type: x11 (build-time configuration)
libEGL warning: DRI2: failed to authenticate
libEGL debug: MESA-LOADER: dlopen(/usr/lib/dri/swrast_dri.so)
libEGL debug: MESA-LOADER: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libEGL warning: did not find extension DRI_Core version 1
libEGL warning: did not find extension DRI_SWRast version 2
libEGL debug: MESA-LOADER: dlopen(/usr/lib/dri/swrast_dri.so)
libEGL debug: MESA-LOADER: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libEGL warning: did not find extension DRI_Core version 1
libEGL warning: did not find extension DRI_SWRast version 2
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize

apalis-tk1-mainline:~/tmp$ glxgears
Error: couldn't get an RGB, Double-buffered visual

I can show layers, etc. if that will help but didn’t want to overload the initial post with it all.

So our objective is to be able to have QT apps render decently, no screen tearing or other issues, but usually these are going to be fairly short and simple animation clips and individual widgets for dates, times, and other quantities. No display manager is really needed, so DirectFB with basic hardware support would probably be just fine for us … or we’ll live with X/Nouveau/Wayland if that’s what gets us there. Thanks for listening -

Apalis TK1 eval-1.2

I am not sure what exactly you mean by this. There is Apalis TK1 V1.2A and there is Apalis Evaluation Board V1.1A/C or Ixora V1.2A.

and the 3.10 kernel

As the Linux kernel is not directly involved in any Qt rendering it would be more interesting to know what exact userspace Qt flavour aka image you are running.

Anyway, why don’t you just try the regular angstrom-qt5-x11-image which at least allows running the Qt5_CinematicExperience demo with full hardware acceleration?

I am not sure what exactly you mean by this. There is Apalis TK1 V1.2A and there is Apalis Evaluation Board V1.1A/C or Ixora V1.2A.

I meant that the following DTS (“tegra124-apalis-v1.2-eval.dtb”) applies:

layers/meta-toradex-tegra/conf/machine/apalis-tk1-mainline.conf:KERNEL_DEVICETREE += "tegra124-apalis-eval.dtb tegra124-apalis-v1.2-eval.dtb"

for whatever that’s worth.

Anyway, why don’t you just try the regular angstrom-qt5-x11-image which at least allows running the Qt5_CinematicExperience demo with full hardware acceleration?

Thanks for the pointer. Cinematic and Smarthome at least worked and gave me a model to study, though chasing down all of the X/EGL configuration differences still proved fruitless. There was a problem in that swrast-related drivers were not getting installed, and in the end we also found that QT had a bug which affected this, and were able to make it happen by patching that. Thanks for listening, and for the suggestion.

I meant that the following DTS (“tegra124-apalis-v1.2-eval.dtb”) applies.

Device trees typically have tree parts: SoC here being tegra124 for TK1, module here apalis-v1.2 for the Apalis TK1 V1.2 module and carrier board here eval for the Evaluation Board.

I admit, that our developer website article is currently missing concrete mentioning of the TK1.

Thanks for listening, and for the suggestion.

You are very welcome. Just let us know should you have any further questions or comments.