currently im working on an avalonia application using the avalonia template from the apolloX extension. everytime i launch the application i get a message that glx based rendering could not be initialized. is anyone else facing that issue or having an idea what could lead to that behavior?
heres the error:
[OpenGL] Unable to initialize GLX-based rendering: 'System.EntryPointNotFoundException: Unable to find an entry point named 'glXGetProcAddress' in shared library 'libGL.so.1'.
at Avalonia.X11.Glx.GlxInterface.GlxGetProcAddress(Utf8Buffer buffer)
at Avalonia.OpenGL.GlInterfaceBase`1.<>c__DisplayClass2_0.<ConvertNative>b__0(String proc) in /_/src/Avalonia.OpenGL/GlInterfaceBase.cs:line 67
at Avalonia.OpenGL.GlEntryPointAttribute.GetProcAddress(Func`2 getProcAddress) in /_/src/Avalonia.OpenGL/GlEntryPointAttribute.cs:line 40
at Avalonia.OpenGL.GlInterfaceBase`1..ctor(Func`2 getProcAddress, TContext context) in /_/src/Avalonia.OpenGL/GlInterfaceBase.cs:line 50
at Avalonia.X11.Glx.GlxDisplay..ctor(X11Info x11, IList`1 probeProfiles) in /_/src/Avalonia.X11/Glx/GlxDisplay.cs:line 20
at Avalonia.X11.Glx.GlxPlatformOpenGlInterface.TryCreate(X11Info x11, IList`1 glProfiles) in /_/src/Avalonia.X11/Glx/GlxPlatformFeature.cs:line 34'
after i updated my project to the current version of the avalonia mvvm template the stack changed a bit:
[OpenGL] Unable to initialize GLX-based rendering: 'Avalonia.OpenGL.OpenGlException: Unable to find a suitable GL function for CreateContextAttribsARB
at Avalonia.OpenGL.GlInterfaceBase`1..ctor(Func`2 getProcAddress, TContext context) in /_/src/Avalonia.OpenGL/GlInterfaceBase.cs:line 58
at Avalonia.OpenGL.GlInterfaceBase..ctor(Func`2 getProcAddress) in /_/src/Avalonia.OpenGL/GlInterfaceBase.cs:line 11
at Avalonia.X11.Glx.GlxInterface..ctor() in /_/src/Avalonia.X11/Glx/Glx.cs:line 110
at Avalonia.X11.Glx.GlxDisplay..ctor(X11Info x11, IList`1 probeProfiles) in /_/src/Avalonia.X11/Glx/GlxDisplay.cs:line 20
at Avalonia.X11.Glx.GlxPlatformOpenGlInterface.TryCreate(X11Info x11, IList`1 glProfiles) in /_/src/Avalonia.X11/Glx/GlxPlatformFeature.cs:line 34'
i also tried with the default template project without making any changes:
Starting: "ssh" -T -q -p 2223 -i /home/dog/testprojects/ToradexStartupProject200/.conf/id_rsa -o StrictHostKeyChecking=no -o "UserKnownHostsFile /dev/null" torizon@colibri-imx8x-07252196 "/vsdbg/vsdbg --interpreter=vscode"
-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/ToradexStartupProject200.dll'. Symbols loaded.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.DesktopRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Controls.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/netstandard.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Base.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Styling.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Input.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Interactivity.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Layout.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Visuals.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Animation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.ComponentModel.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Desktop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.ReactiveUI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.X11.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Runtime.InteropServices.RuntimeInformation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Skia.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.OpenGL.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/System.Reactive.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Private.Uri.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.ComponentModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Xml.XDocument.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Private.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Private.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Memory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Text.Encoding.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Threading.Thread.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.FreeDesktop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Tmds.DBus.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Diagnostics.TraceSource.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
[X11Platform] SMLib/ICELib reported a new error: SESSION_MANAGER environment variable not definedEGL: Warning: No default display support on wayland
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/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 43
at Avalonia.OpenGL.Egl.EglDisplay..ctor(EglInterface egl, Boolean supportsSharing, Int32 platformType, IntPtr platformDisplay, Int32[] attrs) in /_/src/Avalonia.OpenGL/Egl/EglDisplay.cs:line 48
at Avalonia.OpenGL.Egl.EglDisplay..ctor(EglInterface egl, Boolean supportsSharing) in /_/src/Avalonia.OpenGL/Egl/EglDisplay.cs:line 22
at Avalonia.OpenGL.Egl.EglDisplay..ctor(Boolean supportsSharing) in /_/src/Avalonia.OpenGL/Egl/EglDisplay.cs:line 144
at Avalonia.OpenGL.Egl.EglDisplay..ctor() in /_/src/Avalonia.OpenGL/Egl/EglDisplay.cs:line 139
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'
Loaded '/home/torizon/app/SkiaSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Splat.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/ReactiveUI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.ComponentModel.TypeConverter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
LogHost: Initializing to normal mode (.cctor)
Loaded '/home/torizon/app/Avalonia.Markup.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Themes.Fluent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Runtime.CompilerServices.Unsafe.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Markup.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Threading.Tasks.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/Avalonia.Diagnostics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/dotnet/shared/Microsoft.NETCore.App/6.0.5/System.Buffers.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/home/torizon/app/HarfBuzzSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
my project differ in a way that i wanted to get my avalonia application separated from the toradex startup confiugrations. so i splitted that into two different project that are referenced
yes, we tried the framebuffer template in the past but there we were not able to get the touch input to work and with the other template it was working. that was the reason for us to work with that template. and on the other hand, we wanted to take advantage of the 2d acceleration.
thanks for your answer. i also tried to not use glx and use egl instead like it is set up in the avalonia template, but this will also result in init exceptions stated above. so it is not just about glx at this point if i understand it right.
i also modified my project to use linux framebuffer. it was working in general but it seemed to be even less performant than running the application on weston without a working graphics acceleration.
i am also confused now since i saw the post here (https://community.nxp.com/t5/i-MX-Processors/X11-support-for-iMX8-and-iMX8M/td-p/822981) where the tech support of nxp also stated frame buffer as not supported
So, make sure you are using DRM mode, if you are not already. And, if you are already using it let me know, because that’s the mode we’ve tested with the best performance, and we have to look into it if you’re having issues.