Flickering UI with IMX8X and Avalonia/Bash

Hi,

another Monday, another question.

Background
After some help with the Avalonia template, we managed to get our example running. I have a IMX8QXP 2 GB SoC mounted on an Iris carrier board running
dunfell/colibri-imx8x/torizon/torizon-core-docker/monthly version: 5.7.0-devel-202206+build.24.

Attached to this is the default 7" resisitive display. I added the following *.dtbo entries to overlays.txt to enable the full display including touch:

fdt_overlays=colibri-imx8x_parallel-rgb_overlay.dtbo colibri-imx8x_atmel-mxt-connector_overlay.dtbo display-lt161010_overlay.dtbo

Issue
The display is flickering from time to time. Hopefully, you can see this in the attached video. I enabled “UseGPU” in the X11PlattformSettings. The same behaviour also occurs with the default Avalonia template using frame buffer. It also happens when I select the bash terminal and mark text with the mouse.

I think it might have something to do with refresh rate or display timings. On the capacitive display, the behaviour also occurs, but less visible and often. Do the display need any other calibration?

Thanks in advance!
Best regards
Markus

Video in Wayland bash where I just move the mouse around:

Hi @KidIcarus ,

At first glance this issue seems to be related to Device Tree Overlays: The overlays you added are for the Capacitive Touch Display 7" Parallel. Try adding the ones corresponding to the Resistive Touch Display 7" Parallel, as instructed here: Device Tree Overlays on Torizon | Toradex Developer Center

fdt_overlays=colibri-imx8x_parallel-rgb_overlay.dtbo colibri-imx8x_ad7879_overlay.dtbo display-lt161010_overlay.dtbo

See if this solves the flickering issue for the resistive display.

On the capacitive display, the behaviour also occurs, but less visible and often. Do the display need any other calibration?

That is strange, no additional image calibration should be needed if the correct overlays were added. Are you planning to use both displays?

Best regards,
Lucas Akira

Hi @lucas_a.tx

Thank you for the fast reply. I am sorry I made a copy & paste mistake. For the resistive 7" display, I use these overlays:

fdt_overlays=colibri-imx8x_parallel-rgb_overlay.dtbo colibri-imx8x_ad7879_overlay.dtbo display-lt161010_overlay.dtbo

The ones mentioned in my first post are only used for the capacitive display. No, we most likely won’t use both display types, but currently we use all the hardware we have for prototyping towards our general software architecture. This is why I would appreciate it if we could use both displays and compare our progress.

Best regards,
Markus

Hi @KidIcarus,

As a workaround to solve this issue, you can use the the overlay with the DPU driver: colibri-imx8x_display-lcdif_overlay.dtbo

Also, please try setting use-g2d=0 in /etc/xdg/weston/weston.ini which could solve the problem.

Please let us know how it goes.

Hi @rudhi.tx

This seems to do the trick. Thank you for your support.

Can you please tell me if there are any (especially negative) consequences of using this overlay and disabling the g2 renderer?

Best regards,
Markus

Hello @KidIcarus ,
I asked internally and I got this answer:

By using this flag we’re preventing Weston from using accelerated 2D drawing. Because of that, I would expect some higher CPU usage.
Apart from that, if the application works as desired I think there are no downsides but I’m not 100% sure about this. We never did extended testing around this workaround, we only tried it and saw the problem go away.

Best regards,
Josep

Hello @josep.tx,

Many thanks for the clarification. I will run some tests and check if the impact on performance will affect us.

Best regards,
Markus

Hello @KidIcarus ,

Please let us know the outcome of your tests.
Thanks in advance for your feedback.

Best regards
Josep