Options for UI with .net

Hi,
I’m using a imx8m plus, we have previously developed a GUI for our product using Uno but noticed that there was a bit of lag, it seemed that the GPU wasn’t being used (or mostly unused). We noticed that by the beginning of 2025 Toradex decided to move with Avalonia for .NET GUIs.

We were recently considering moving to Avalonia and we were hoping to have better usage of the GPU to reduce some of that lag but then I noticed these posts in the community:

So, it seems like if using Avalonia, FrameBuffer DRM gets you better results.

I was wondering:

  • Are there any new developments on GPU usage with Avalonia?
  • What are Toradex recommendations for GUI frameworks? Ideally with .Net since it’s what we are more familiar with but it seems that the current options are not making the most of the GPU and causing some lag. Also, ideally not requiring a license like QT due to budget constraints.

Update: Apparently Wayland could (potentially) be released until the end of the year, left a comment on this thread: Our own backend for Wayland · Issue #1243 · AvaloniaUI/Avalonia · GitHub

Regards,

Joao

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


GUI Framework Recommendations for iMX8M Plus

Based on the official Toradex documentation, here are the current recommendations for GUI frameworks on your iMX8M Plus module:

GPU Acceleration Support

The iMX8M Plus supports OpenGL ES acceleration through the Wayland graphics backend (1). The default choice for GUI in Torizon is to use the Wayland protocol with the Weston compositor (2).

For GUI frameworks that support hardware acceleration, you need to set specific environment variables (2):

Toolkit Environment Setting
GTK3 GDK_BACKEND="wayland"
Qt5 QT_QPA_PLATFORM="wayland"
SDL2 SDL_VIDEODRIVER="wayland"

.NET Framework Options

According to the framework comparison documentation (3), here are the .NET options available:

.NET Avalonia

  • Cost: Free and open-source under MIT license (3)
  • Graphical Backend: Legacy framebuffer, X11, DRM (3)
  • Hardware Demand: Mid (3)
  • Performance: GPU-accelerated under DRM; however, X11 needs library versions to be in sync (3)
  • Development Experience: Considerable learning curve if unfamiliar with XAML, offers familiar experience for WPF developers (3)

.NET Uno

  • Cost: Free and open-source under Apache 2.0 license (3)
  • Graphical Backend: Legacy framebuffer, X11 (3)
  • Hardware Demand: Mid (3)
  • Performance: Standard performance characteristics (3)

.NET Blazor (Web-based)

  • Cost: Free and open-source under Apache License 2.0 (3)
  • Graphical Backend: Web Browser (runs on Chromium/Cog) (3)
  • Hardware Demand: High (3)
  • Performance: GPU-accelerated, but performance negatively impacted by browser-based execution (3)

Alternative Recommendations

If you’re open to exploring beyond .NET, consider these high-performance options:

Qt (C++ or Python)

  • Performance: High performance UIs possible, even on platforms without GPU, hardware acceleration possible (3)
  • Cost: $0 for projects that can use open-source version (3)
  • Graphical Backend: Supports Wayland, X11, framebuffer, EGL, and others (3)

JavaScript Web-Based

  • Performance: High performance UIs possible with hardware acceleration through browser (3)
  • Cost: $0, open source (3)
  • Development Experience: Very easy learning curve, easy to find developers (3)

Current Status and Recommendations

Based on the documentation, for optimal GPU utilization on iMX8M Plus:

  1. Use Wayland backend when possible for hardware acceleration
  2. Consider Qt if you need proven GPU acceleration and don’t mind learning C++ or Python
  3. Evaluate web-based solutions using JavaScript frameworks running in Chromium for excellent GPU acceleration
  4. For .NET specifically, Avalonia with DRM backend appears to be the most promising option for GPU acceleration

The iMX8M Plus has demonstrated strong performance with glmark2 scores of 953 using OpenGL ES 2 on Wayland (1), indicating the hardware capability is there when properly utilized.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hello @jvieira ,

As far as I know, Avalonia still only supports GPU acceleration on DRM. (Our template for the IDE extension has support for it). Wayland support is planned, but only in the future.

Regarding UI partners, we have a section on this topic in our website: https://developer.toradex.com/torizon/application-development/use-cases/gui/gui-overview/

hope this helps

best regards