ApolloX Avalonia GTK not rendering with correct Tree Overlays

Hi,

Currently i am evaluating the new VS code extension ApolloX and tried out the new Avalonia Single Container GTK project.

I found an issue where when i configure the Tree Overlays with the overlays

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

The avalonia app is launched but the window is not displayed. I have the same issue when using the Avalonia Framebuffer project.

I also tested the Uno Framebuffer project and that one is working correctly.

I used this tutorial Device Tree Overlays on Torizon | Toradex Developer Center and the overlay configuration from Setting up Displays with Torizon | Toradex Developer Center

Hardware:
imx8x, Iris carrier board, Resistive Touch Display 7

Thanks in advance
Simon

Greetings @SimonBaur,

I have a few questions just to make sure I understand your situation.

You applied some overlays to the overlays.txt file to enable a display. Once you did this the display worked, correct?

Then you deployed an Avalonia Single Container GTK project with ApolloX and the application failed to work, or be displayed specifically? But, if you deploy a Uno Framebuffer project then that is fine, correct?

What I don’t quite understand yet is what is the connection between the overlays and the failed Avalonia container.

Does the Avalonia container work without these overlays applied, using a different display?

Best Regards,
Jeremias

Hallo @jeremias.tx,

thank you for the quick replay.

You applied some overlays to the overlays.txt file to enable a display. Once you did this the display worked, correct?

Yes correct

Then you deployed an Avalonia Single Container GTK project with ApolloX and the application failed to work, or be displayed specifically?

It started, and there was no Exception reported. But the Application was not displayed.

But, if you deploy a Uno Framebuffer project then that is fine, correct?

Yes it worked just fine

Does the Avalonia container work without these overlays applied, using a different display?

With the Capacitive Touch Display 7" Parallel. The behavior is the same. With the default overlays the application is displayed correctly but when i configure the overlays correctly the application is not displayed

Best Regards,
Simon

Hello @SimonBaur,

I am Andre from the IDE Extensions Toradex Team. I have created an Avalonia Single Container GTK project with ApolloX and applied the overlay with this method, using the torizoncore-builder tool, instead of the method without using torizoncore-builder and it worked for me. Can you try applying the overlay this way and see if it works, please?

Best regards,
Andre

Hello @andreRiesco,

I am sorry that it took me so long to check this. As you probably know priorities can shift quite spontaneously sometimes :stuck_out_tongue:

Sadly your proposed solution did not work. I used the following .yaml file.

input:
  easy-installer:
    local: images/torizon-core-docker-colibri-imx8x-Tezi_5.7.0+build.17.tar
customization:
  device-tree:
    include-dirs:
      - device-trees/include/
    custom: device-trees/dts-arm64/imx8qxp-colibri-iris-v2.dts
    overlays:
      add:
        - device-trees/overlays/colibri-imx8x_parallel-rgb_overlay.dts
        - device-trees/overlays/display-lt161010_overlay.dts

output:
  easy-installer:
    local: torizon-core-docker-colibri-imx8x-Tezi_5.7.0.CUSTOM

I checked the output a bit more and found the following warnings.

[X11Platform] SMLib/ICELib reported a new error: SESSION_MANAGER environment variable not definedEGL: Warning: No default display support on wayland
Loaded '/home/torizon/app/System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/System.IO.Compression.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
[OpenGL] Unable to initialize EGL-based rendering: 'Avalonia.OpenGL.OpenGlException: eglGetDisplay failed with error EGL_SUCCESS (0x3000)
   at Avalonia.OpenGL.Egl.EglDisplay.CreateDisplay(EglInterface egl, Int32 platformType, IntPtr platformDisplay, Int32[] attrs) in /_/src/Avalonia.OpenGL/Egl/EglDisplay.cs:line 38
   at Avalonia.OpenGL.Egl.EglPlatformOpenGlInterface.<>c.<TryCreate>b__15_0() in /_/src/Avalonia.OpenGL/Egl/EglPlatformOpenGlInterface.cs:line 29
   at Avalonia.OpenGL.Egl.EglPlatformOpenGlInterface.TryCreate(Func`1 displayFactory) in /_/src/Avalonia.OpenGL/Egl/EglPlatformOpenGlInterface.cs:line 34'

Best Regards
Simon

Hallo @andreRiesco,

i just wanted to ask if there is any progress regarding this?

Best Regards
Simon

Hi @SimonBaur ,

Sorry for the delay.

Happy New Year :tada:

I took your .yaml file and used torizoncore-builder to generate an image for the Colibri iMX8X.

After that I deployed the image on the device using the “deploy” command with the generated image.

This part worked for me. Can you maybe try it this way?
I am now trying to reproduce the warnings you see in VisualStudio Code.

Best Regards
Kevin

Hi @SimonBaur ,

I was able to reproduce the issue.

I involved @andreRiesco in my tests, he will take this forward and reply here as soon as there’s a solution for it.

Best Regards
Kevin

Hi @SimonBaur ,

The latest version of ApolloX has this issue with the Avalonia GTK templates fixed on the Colibri iMX8X, so new projects should work out-of-the-box. More details about the problem can be found in this thread: Issue with ApolloX extension and Avalonia GTK MVVM example

See if this works for you.

Best regards,
Lucas Akira

2 Likes

Hallo @lucas_a.tx

thank you for the update it works now.

Best Regards
Simon Angerer

Hi @SimonBaur ,

Thank you for confirming.

Best Regards
Kevin