No hardware acceleration with AMD GPU and Cinnamon within LXC container

My host is headless and I want to run DE on a container and connect to it remotely.

System:

Operating System: Fedora Linux 40 (Container Image)
              Kernel: Linux 6.8.5-301.fc40.x86_64

So it looks like that my gpu is forwarded nicely, with my user being part of the video and render groups:

ls -l /dev/dri/:

total 0
crw-rw----. 1 root video 226,   1 Dec 27 21:30 card1
crw-rw-rw-. 1 root video 226, 128 Dec 27 21:30 renderD128

lspci -k contains:

25:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] (rev e5)
	Subsystem: Sapphire Technology Limited Device e348
	Kernel driver in use: amdgpu

I have a bunch of mesa stuff installed which were pulled by @cinnamon-desktop; dnf list --installed | grep mesa:

mesa-dri-drivers.x86_64                     24.1.7-1.fc40                      @updates               
mesa-filesystem.x86_64                      24.1.7-1.fc40                      @updates               
mesa-libEGL.x86_64                          24.1.7-1.fc40                      @updates               
mesa-libGL.x86_64                           24.1.7-1.fc40                      @updates               
mesa-libGLU.x86_64                          9.0.3-4.fc40                       @fedora                
mesa-libOSMesa.x86_64                       24.1.7-1.fc40                      @updates               
mesa-libgbm.x86_64                          24.1.7-1.fc40                      @updates               
mesa-libglapi.x86_64                        24.1.7-1.fc40                      @updates               
mesa-va-drivers.x86_64                      24.1.7-1.fc40                      @updates               
mesa-vulkan-drivers.x86_64                  24.1.7-1.fc40                      @updates

But, when I test with xpra or NoMachine. The screen set up by them have no HW acceleration and I can verify the high CPU load when moving a window or with GL test tools; glxinfo -display :1001 -B:

name of display: :1001
display: :1001  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0xffffffff)
    Device: llvmpipe (LLVM 18.1.6, 256 bits) (0xffffffff)
    Version: 24.1.7
    Accelerated: no
    Video memory: 15930MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 21 MB, largest block: 21 MB
    VBO free aux. memory - total: 14483 MB, largest block: 14483 MB
    Texture free memory - total: 21 MB, largest block: 21 MB
    Texture free aux. memory - total: 14483 MB, largest block: 14483 MB
    Renderbuffer free memory - total: 21 MB, largest block: 21 MB
    Renderbuffer free aux. memory - total: 14483 MB, largest block: 14483 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4294224127 MB
    Total available memory: 4294240057 MB
    Currently available dedicated video memory: 21 MB
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 18.1.6, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 24.1.7
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.5 (Compatibility Profile) Mesa 24.1.7
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.1.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Rendering string boasts llvmpipe… Not good.
Everything is at default settings, fresh install. And gpu and user were correctly set up before installing the DE.

systemctl get-default:

graphical.target

cat /usr/lib/systemd/system/graphical.target:

#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Graphical Interface
Documentation=man:systemd.special(7)
Requires=multi-user.target
Wants=display-manager.service
Conflicts=rescue.service rescue.target
After=multi-user.target rescue.service rescue.target display-manager.service
AllowIsolate=yes

cat /etc/systemd/system/display-manager.service:

[Unit]
Description=Light Display Manager
Documentation=man:lightdm(1)

# Replaces getty.
Conflicts=getty@tty1.service
After=getty@tty1.service

# Replaces plymouth-quit since it quits plymouth on its own.
Conflicts=plymouth-quit.service
After=plymouth-quit.service

# We need all the dependencies of the services we are replacing.
# Pulled from getty@.service and plymouth-quit.service (except
# for plymouth-quit-wait.service since it waits until plymouth
# is quit, which we do).
# bug #2167386: Avoid X rejecting connections from processes started with a different host name
# than the one X itself was started with.
After=rc-local.service plymouth-start.service systemd-user-sessions.service livesys-late.service systemd-hostnamed.service

# We need DBus to be present.
Requires=dbus.service

# We need the DBus socket and user slice to be present.
Wants=dbus.socket user.slice
After=dbus.socket user.slice

# LighDM takes responsibility for stopping plymouth, so if it fails
# for any reason, make sure plymouth still stops.
OnFailure=plymouth-quit.service

[Service]
Type=dbus
ExecStart=/usr/sbin/lightdm
Restart=always
IgnoreSIGPIPE=no
BusName=org.freedesktop.DisplayManager
LimitMEMLOCK=16777216

[Install]
Alias=display-manager.service

lightdm --show-config:

   [Seat:*]
B  allow-guest=false
E  session-wrapper=/etc/X11/xinit/Xsession
G  xserver-command=X -core -noreset
H  greeter-session=slick-greeter

   [LightDM]
C  minimum-vt=1
D  run-directory=/run/lightdm
F  user-authority-in-system-dir=true

Sources:
A  /usr/share/lightdm/lightdm.conf.d/50-backup-logs.conf
B  /usr/share/lightdm/lightdm.conf.d/50-disable-guest.conf
C  /usr/share/lightdm/lightdm.conf.d/50-minimum-vt.conf
D  /usr/share/lightdm/lightdm.conf.d/50-run-directory.conf
E  /usr/share/lightdm/lightdm.conf.d/50-session-wrapper.conf
F  /usr/share/lightdm/lightdm.conf.d/50-user-authority-in-system-dir.conf
G  /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
H  /usr/share/lightdm/lightdm.conf.d/90-slick-greeter.conf
I  /etc/lightdm/lightdm.conf

I tell xpra to start cinnamon-session-cinnamon explicitly but I wonder how NoMachine starts it :sweat_smile:.

Could anyone provide any insight?

I used the Fedora 40 netinst/everything image to install the host OS. Maybe something is configured in a way that inhibits HW acceleration?