Apalis imx6 X11 unhandled page fault

Hello everyone,
We have built the tdx-reference-multimedia-image with x11 in Yocto Dunfell.
X11 is crashing with this error:

[ 1645.246112] Xorg: unhandled page fault (11) at 0x066ffee0, code 0x005
[ 1645.252558] pgd = 756ee75c
[ 1645.255328] [066ffee0] *pgd=00000000
(EE)
(EE) Backtrace:
(EE)
(EE) Segmentation fault at address 0x66ffee0
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

[1]+  Aborted                 Xorg

dmesg:

[   28.643867] QSGRenderThread: unhandled page fault (11) at 0x0000016c, code 0x805
[   28.654113] pgd = a8f78ea5
[   28.659634] [0000016c] *pgd=00000000
[   28.666109] CPU: 1 PID: 769 Comm: QSGRenderThread Tainted: G           O      5.4.161-5.6.0-devel+git.7cb929ebe2ad #1
[   28.666117] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[   28.666126] PC is at 0x719dec8e
[   28.666131] LR is at 0x719db209
[   28.666150] pc : [<719dec8e>]    lr : [<719db209>]    psr: 60070030
[   28.666157] sp : 6c600ba8  ip : 75458b54  fp : 6c600c28
[   28.666165] r10: 719ff43c  r9 : 00b115f0  r8 : 00b41820
[   28.666177] r7 : 6c600c78  r6 : 00000000  r5 : 00000000  r4 : 00000000
[   28.666187] r3 : 00000000  r2 : 00000000  r1 : 00800006  r0 : 00000001
[   28.666197] Flags: nZCv  IRQs on  FIQs on  Mode USER_32  ISA Thumb  Segment user
[   28.666205] Control: 10c5387d  Table: 5700404a  DAC: 00000055
[   28.666213] CPU: 1 PID: 769 Comm: QSGRenderThread Tainted: G           O      5.4.161-5.6.0-devel+git.7cb929ebe2ad #1
[   28.666217] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[   28.666248] [<8010fac0>] (unwind_backtrace) from [<8010ba60>] (show_stack+0x10/0x14)
[   28.666261] [<8010ba60>] (show_stack) from [<808ac2f0>] (dump_stack+0x90/0xa4)
[   28.666280] [<808ac2f0>] (dump_stack) from [<801138a4>] (__do_user_fault+0xfc/0x100)
[   28.666296] [<801138a4>] (__do_user_fault) from [<80113c84>] (do_page_fault+0x354/0x394)
[   28.666309] [<8[   29.968197] 8<--- cut here ---
0113c84>] (do_page_fault) from [<[   29.971745] QSGRenderThread: unhandled page fault (11) at 0x0000016c, code 0x805
80113e2c>] (do_DataAbort+0x3c/0xc[   29.982094] pgd = d21119e8
0)
[   28.666329]  [0000016c] *pgd=00000000
[1m[<80113e2c>] (do_DataAbort) from [<80101dbc>] (__dabt_usr+0x3c/0x40)
[   28.666335] Exception stack(0xca883fb0 to 0xca883ff8)
[   28.666343] 3fa0:                                     00000001 00800006 00000000 00000000
[   28.666352] 3fc0: 00000000 00000000 00000000 6c600c78 00b41820 00b115f0 719ff43c 6c600c28
[   28.666360] 3fe0: 75458b54 6c600ba8 719db209 719dec8e 60070030 ffffffff

Xorg.0.log (18.3 KB)

Hi @LordXor,

Thanks for reaching out. Before going further, I’d like to know a bit more information about your setup and your goal.

  • Which exact Apalis iMX6 version are you using?
  • Which version of the tdx-reference-multimedia-image are you basing yourself into?
  • Which carrier board and display are you using? Did you do the correct device tree changes?
  • Why do you need to use X11? Is there a reason for not using Wayland? How are you trying to enable X11 with Yocto? Could you share the steps you’re trying to follow?

Best regards,

Hi @gclaudino.tx,
Sorry for the delay.

I put you in context.
We have made a Qt application with Yocto Dunfell.

For this we have built a custom image adding the meta-qt5 branch dunfell-5.x.y:
meta-toradex-bsp-common dunfell branch
meta-toradex-demos. dunfell branch
meta-toradex-distro branch dunfell
meta-toradex-nxp dunfell branch

The board versions tested are Apalix IMX6Quad ​​4GB ver. 1.1C and 1.1Y

The problem is that after a few hours, and sometimes minutes, the animations and transitions of the application gradually slow down until they become completely unusable.

We have also tried building the tdx-reference-multimedia-image images with the same results

Then we have installed with “Easy Installer” the image “Embedded Linux Reference Multimedia Image” giving exactly the same results.

We have also tested the “Embedded Linux Reference Multimedia Image (Upstream)” image with the same results.

As a reference to consider for a long time we have the same application with Yocto Armstrong 2.8 LTS Ångström v2017.12 directly in eglfs (linux-framebuffer) running days without stopping perfectly.

We also have it running on Intel platforms with Xorg and working perfectly.

We’re suspecting Wayland or the “etnaviv” drivers. But we couldn’t find a specific reason for the problem.

For that reason we want to try to replace Wayland with Xorg (Although I think this would be more of a workaround than the definitive solution).

Hi @LordXor,

Thanks for updating!

Did you check this article on our website? Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center

It describes the standard way to build our reference images using Yocto. Usually, if you follow the link the meta-qt5 will be downloaded by default as it’s used on our reference-multimedia-image.

Do you have any video that could probably show it in better detail? You could upload it to share.toradex.com and paste the link here. Also, which application became slow, your own application or the default one that comes with the image?

Can you please share with us the output of dmesg and top commands? For top, you can send us one when the system started and another when things are really slow already.

Just as an additional check, this is the one from our feeds that you get when you connect the module to the internet, right?


Can you please also share which carrier board and type of display you’re using and resolution? This way we could try to reproduce the same behaviour on our side for testing purposes.

Best regards,

Hi @gclaudino.tx

Thanks for your responses.

We have finally solved it.

We have discovered that it is a bug with Qt and Wayland.
The affected Qt versions are 5.12.6 - 5.15.1.

Apparently it’s a bug in the rendering system.
As a work arraound, just setting the environment variable QSG_RENDER_LOOP to basic, everything works fine. (QSG_RENDER_LOOP=basic)

This is reported here: [QTBUG-83263] Rendering of multiple framebuffers object leads to degraded render performance with Wayland - Qt Bug Tracker

1 Like

Hi @LordXor!

I’m glad you got things working on your side :smiley:

I’ll also forward this QT Bug internally so we know it beforehand when a customer arrives with some similar issue. Please feel free to come back if you have any other questions.

Best regards,