Hi,
I wanted to ask a question about the Avalonia GTK vscode template. When it comes to animations, rendering, page navigation and general performance the app seems to be lagging pretty hard.
I’m using the standard vscode template from the bookworm branch with a few tweaks. I use the weston compositor instead of xfce, I’ve added [“libvlc-dev”, “vlc”] libs to implement a VLC based video player and ScottPlot for chart support. I also changed the default ReactiveUI binding system to the Community Toolkit.
Edit: Forgot to mention, I’m using the Verdin AM62 board attached to a dahlia carrier board. The display is a connected 10inch DSI panel.
After changing the code in the Program.cs to something like this, it works a little bit better but is still far from being fluent:
Is there something I might be missing that slows down the performance so much?
class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
{
IReadOnlyList<X11RenderingMode> renders = new List<X11RenderingMode>
{
X11RenderingMode.Egl,
X11RenderingMode.Glx
};
return AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.UseSkia()
.With(new SkiaOptions() { MaxGpuResourceSizeBytes = 49152000 }) // ~49mb 12x 1280 x 800 textures.
.With(new X11PlatformOptions
{
RenderingMode = renders,
});
}
}
Weston compositor logs:
Switching VT tty1 to text mode if currently in graphics mode
Switching VT mode of /dev/tty1 to text
Switching to VT 7
Cannot detect SoC! Assuming it's GPU-capable.
SoC has GPU: true
SoC has DPU: false
Removing previously created '.X*-lock' entries under /tmp before starting Weston. Pass 'IGNORE_X_LOCKS=1' environment variable to Weston container to disable this behavior.
dos2unix: converting file /etc/xdg/weston/weston.ini to Unix format...
dos2unix: converting file /etc/xdg/weston-dev/weston.ini to Unix format...
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
Date: 2025-03-21 UTC
[07:59:32.087] weston 10.0.1
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 10.0.1
[07:59:32.088] Command line: weston -Bdrm-backend.so -Swayland-0
[07:59:32.088] OS: Linux, 6.6.58-7.1.0-gf874412b7190, #1-Torizon SMP PREEMPT Fri Dec 6 14:07:48 UTC 2024, aarch64
[07:59:32.088] Flight recorder: enabled
[07:59:32.089] Using config file '/etc/xdg/weston/weston.ini'
[07:59:32.090] Output repaint window is 7 ms maximum.
[07:59:32.090] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/drm-backend.so'
[07:59:32.105] initializing drm backend
[07:59:32.105] Trying libseat launcher...
00:00:00.066 [INFO] [seatd/server.c:145] New client connected (pid: 27, uid: 1000, gid: 1000)
00:00:00.066 [INFO] [seatd/seat.c:170] Added client 7 to seat0
00:00:00.067 [INFO] [seatd/seat.c:480] Opened client 7 on seat0
[07:59:32.107] libseat: session control granted
[07:59:32.112] using /dev/dri/card0
[07:59:32.113] DRM: supports atomic modesetting
[07:59:32.113] DRM: supports GBM modifiers
[07:59:32.113] DRM: supports picture aspect ratio
[07:59:32.113] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/gl-renderer.so'
MESA-LOADER: failed to open tidss: /usr/lib/dri/tidss_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: tidss
[07:59:32.877] EGL client extensions: EGL_EXT_device_base
EGL_EXT_device_enumeration EGL_EXT_device_query
EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device
EGL_EXT_platform_wayland EGL_KHR_platform_wayland
EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb
EGL_MESA_platform_gbm EGL_KHR_platform_gbm
EGL_MESA_platform_surfaceless
[07:59:32.882] EGL device extensions: EGL_MESA_device_software
EGL_EXT_device_drm_render_node
[07:59:32.882] failed to query DRM device from EGL
[07:59:32.882] EGL version: 1.4
[07:59:32.882] EGL vendor: Mesa Project
[07:59:32.882] EGL client APIs: OpenGL OpenGL_ES
[07:59:32.882] EGL extensions: EGL_ANDROID_blob_cache EGL_EXT_buffer_age
EGL_EXT_image_dma_buf_import
EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2
EGL_KHR_config_attribs EGL_KHR_context_flush_control
EGL_KHR_create_context EGL_KHR_create_context_no_error
EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses
EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image
EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image
EGL_KHR_gl_texture_cubemap_image EGL_KHR_image
EGL_KHR_image_base EGL_KHR_image_pixmap
EGL_KHR_no_config_context EGL_KHR_reusable_sync
EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
EGL_KHR_wait_sync EGL_MESA_configless_context
EGL_MESA_image_dma_buf_export EGL_MESA_query_driver
[07:59:32.882] warning: Disabling render GPU timeline and explicit synchronization due to missing EGL_ANDROID_native_fence_sync extension
[07:59:32.882] EGL_KHR_surfaceless_context available
[07:59:32.927] GL version: OpenGL ES 3.2 Mesa 22.3.6
[07:59:32.928] GLSL version: OpenGL ES GLSL ES 3.20
[07:59:32.928] GL vendor: Mesa/X.org
[07:59:32.928] GL renderer: llvmpipe (LLVM 15.0.6, 128 bits)
[07:59:32.928] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1
GL_EXT_texture_compression_rgtc GL_EXT_texture_format_BGRA8888
GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24
GL_OES_element_index_uint GL_OES_fbo_render_mipmap
GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives
GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float
GL_OES_texture_float_linear GL_OES_texture_half_float
GL_OES_texture_half_float_linear GL_OES_texture_npot
GL_OES_vertex_half_float GL_EXT_draw_instanced
GL_EXT_texture_sRGB_decode GL_OES_EGL_image
GL_OES_depth_texture GL_OES_packed_depth_stencil
GL_EXT_texture_type_2_10_10_10_REV GL_NV_conditional_render
GL_OES_get_program_binary GL_APPLE_texture_max_level
GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
GL_NV_pack_subimage GL_EXT_frag_depth
GL_NV_fbo_color_attachments GL_OES_EGL_image_external
GL_OES_EGL_sync GL_OES_vertex_array_object
GL_OES_viewport_array GL_ANGLE_pack_reverse_row_order
GL_ANGLE_texture_compression_dxt3
GL_ANGLE_texture_compression_dxt5
GL_EXT_occlusion_query_boolean GL_EXT_robustness
GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers
GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil
GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range
GL_KHR_debug GL_KHR_robustness
GL_KHR_texture_compression_astc_ldr GL_NV_pixel_buffer_object
GL_OES_depth_texture_cube_map GL_OES_required_internalformat
GL_OES_surfaceless_context GL_EXT_color_buffer_float
GL_EXT_debug_label GL_EXT_sRGB_write_control
GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch
GL_EXT_shader_group_vote GL_EXT_shader_implicit_conversions
GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size
GL_EXT_tessellation_shader GL_ANDROID_extension_pack_es31a
GL_ARM_shader_framebuffer_fetch_depth_stencil
GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture
GL_EXT_copy_image GL_EXT_draw_buffers_indexed
GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5
GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box
GL_EXT_render_snorm GL_EXT_shader_io_blocks
GL_EXT_texture_border_clamp GL_EXT_texture_buffer
GL_EXT_texture_cube_map_array GL_EXT_texture_norm16
GL_EXT_texture_view GL_KHR_blend_equation_advanced
GL_KHR_blend_equation_advanced_coherent
GL_KHR_context_flush_control
GL_KHR_robust_buffer_access_behavior GL_NV_image_formats
GL_NV_shader_noperspective_interpolation GL_OES_copy_image
GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex
GL_OES_gpu_shader5 GL_OES_primitive_bounding_box
GL_OES_sample_shading GL_OES_sample_variables
GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation
GL_OES_tessellation_point_size GL_OES_tessellation_shader
GL_OES_texture_border_clamp GL_OES_texture_buffer
GL_OES_texture_cube_map_array GL_OES_texture_stencil8
GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view
GL_EXT_blend_func_extended GL_EXT_buffer_storage
GL_EXT_float_blend GL_EXT_geometry_point_size
GL_EXT_geometry_shader GL_EXT_texture_filter_minmax
GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_KHR_no_error
GL_KHR_texture_compression_astc_sliced_3d
GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size
GL_OES_geometry_shader GL_OES_shader_image_atomic
GL_EXT_clear_texture GL_EXT_clip_cull_distance
GL_EXT_disjoint_timer_query
GL_EXT_texture_compression_s3tc_srgb
GL_MESA_shader_integer_functions GL_EXT_clip_control
GL_EXT_color_buffer_half_float GL_EXT_memory_object
GL_EXT_memory_object_fd GL_EXT_texture_compression_bptc
GL_EXT_texture_mirror_clamp_to_edge
GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage
GL_EXT_shader_framebuffer_fetch_non_coherent
GL_EXT_texture_shadow_lod GL_MESA_framebuffer_flip_y
GL_EXT_depth_clamp GL_EXT_texture_query_lod GL_MESA_bgra
[07:59:32.987] GL ES 3.2 - renderer features:
read-back format: BGRA
EGL Wayland extension: no
[07:59:33.012] event1 - tps65219-pwrbutton: is tagged by udev as: Keyboard
[07:59:33.012] event1 - tps65219-pwrbutton: device is a keyboard
[07:59:33.021] event2 - ilitek_ts: is tagged by udev as: Touchscreen
[07:59:33.023] event2 - ilitek_ts: device is a touch device
[07:59:33.030] event0 - gpio-keys: is tagged by udev as: Keyboard
[07:59:33.031] event0 - gpio-keys: device is a keyboard
[07:59:33.074] libinput: configuring device "tps65219-pwrbutton".
[07:59:33.075] Touchscreen - ilitek_ts - /sys/devices/platform/bus@f0000/20020000.i2c/i2c-2/2-0041/input/input2/event2
[07:59:33.075] libinput: configuring device "ilitek_ts".
[07:59:33.075] input device event2 has no enabled output associated (none named), skipping calibration for now.
[07:59:33.075] libinput: configuring device "gpio-keys".
[07:59:33.076] DRM: head 'LVDS-1' updated, connector 40 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[07:59:33.077] DRM: head 'LVDS-1' found, connector 40 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[07:59:33.078] Registered plugin API 'weston_drm_output_api_v1' of size 24
[07:59:33.078] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
[07:59:33.078] Color manager: no-op
[07:59:33.078] Output 'LVDS-1' using color profile: built-in default sRGB SDR profile
[07:59:33.079] Chosen EGL config details: id: 31 rgba: 8 8 8 0 buf: 24 dep: 0 stcl: 0 int: 1-1 type: win vis_id: XRGB8888 (0x34325258)
[07:59:33.079] Output LVDS-1 (crtc 38) video modes:
1280x800@58.0, preferred, current, 71.1 MHz
[07:59:33.079] associating input device event1 with output LVDS-1 (none by udev)
[07:59:33.079] associating input device event2 with output LVDS-1 (none by udev)
[07:59:33.081] associating input device event0 with output LVDS-1 (none by udev)
[07:59:33.081] Output 'LVDS-1' enabled with head(s) LVDS-1
[07:59:33.081] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: yes
cursor planes: yes
arbitrary resolutions: no
view mask clipping: yes
explicit sync: no
color operations: yes
presentation clock: CLOCK_MONOTONIC, id 1
presentation clock resolution: 0.000000001 s
[07:59:33.082] Loading module '/usr/lib/aarch64-linux-gnu/weston/desktop-shell.so'
[07:59:33.086] launching '/usr/lib/aarch64-linux-gnu/weston-keyboard'
[07:59:33.096] Note: support for the deprecated wl_shell interface is disabled. If a legacy client still needs it, it can be re-enabled by passing -Ddeprecated-wl-shell=true to Meson when building Weston.
[07:59:33.098] Loading module '/usr/lib/aarch64-linux-gnu/weston/screen-share.so'
[07:59:33.102] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/xwayland.so'
[07:59:33.183] Registered plugin API 'weston_xwayland_v1' of size 32
[07:59:33.183] Registered plugin API 'weston_xwayland_surface_v1' of size 16
[07:59:33.184] xserver listening on display :0
[07:59:33.184] launching '/usr/lib/aarch64-linux-gnu/weston-desktop-shell'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
[07:59:35.492] unexpectedly large timestamp jump (from 2394692 to 2396002)
[07:59:35.996] Spawned Xwayland server, pid 39
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
libEGL warning: MESA-LOADER: failed to open pvr: /usr/lib/dri/pvr_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libEGL warning: MESA-LOADER: failed to open pvr: /usr/lib/dri/pvr_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
Failed to initialize glamor, falling back to sw
[07:59:36.347] xfixes version: 6.0
[07:59:36.397] created wm, root 1309
The XKEYBOARD keymap compiler (xkbcomp) reports:
Warning: Unsupported maximum keycode 708, clipping.
X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
tdx-info output:
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.58-7.1.0-gf874412b7190 #1-Torizon SMP PREEMPT Fri Dec 6 14:07:48 UTC 2024
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/f3e8eace2362cfd69fe527293cf3f705d48ce1c6781b1052c56459592e6a30dc/0
Distro name: NAME="Torizon OS"
Distro version: VERSION_ID=7.1.0-build.4
Distro variant: VARIANT="Docker"
Hostname: verdin-am62-15380640
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin AM62 WB on Verdin Development Board
Toradex version: 0076 V1.1C
Serial number: 15380640
Processor arch: aarch64
------------------------------------------------------------