My Issue
I am trying to enable headless gpu acceleration. Panfrost mali driver seems correctly initialised:
dmesg | grep panfrost
[ 11.370043] panfrost ffa30000.gpu: clock rate = 400000000
[ 11.372528] panfrost ffa30000.gpu: mali-t760 id 0x750 major 0x0 minor 0x0 status 0x1
[ 11.372540] panfrost ffa30000.gpu: features: 00000000,00000407, issues: 00000000,24040400
[ 11.372546] panfrost ffa30000.gpu: Features: L2:0x07120206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[ 11.372553] panfrost ffa30000.gpu: shader_present=0xf l2_present=0x1
[ 11.383944] [drm] Initialized panfrost 1.2.0 20180908 for ffa30000.gpu on minor 1
lsmod | grep panfrost
panfrost 57344 0
gpu_sched 24576 1 panfrost
When I create a virtual buffer with sudo Xvfb :1 -screen 0 1280x1024x24 &
and then run DISPLAY=:1 glxinfo | grep renderer
, I get OpenGL renderer string: llvmpipe (LLVM 15.0.6, 128 bits)
The devices also seem to be correcly identified by the system:
ls /dev/dri/
: by-path card0 card1 renderD128
The only odd thing I noticed is Xorg.log after i run sudo startx
:
[ 15940.917] (II) Platform probe for /sys/devices/platform/display-subsystem/drm/card0
[ 15940.918] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 15940.918] (II) Platform probe for /sys/devices/platform/ffa30000.gpu/drm/card1
[ 15940.918] (II) no primary bus or device found [ 15940.918] falling back to /sys/devices/platform/display-subsystem/drm/card0
[ 15941.317] (II) modeset(0): glamor X acceleration enabled on Mali-T760 (Panfrost)
[ 15941.317] (II) modeset(0): glamor initialized
[ 15941.362] (WW) modeset(0): Option "PrimaryGPU" is not used
[ 15941.363] (II) modeset(0): [DRI2] Setup complete
[ 15941.363] (II) modeset(0): [DRI2] DRI driver: rockchip
[ 15941.363] (II) modeset(0): [DRI2] VDPAU driver: rockchip
The log says “no primary bus or device found” and falls back to card0 (cpu renderer). Could the problem be I don’t have an HDMI cable attached to the board, but instead I am using ssh ?
In the log, the gpu is mentioned when activating glamorx, but then not used.
Is there a way to setup headless gpu acceleration?
Required Information
- DietPi version | 9.8.0
- Distro version | bookworm
- Kernel version | 6.6.54-current-rockchip
- Architecture | armhf
- SBC model |ASUS Tinker Board (armv7l)
- Power supply used | 5V 3A
- SD card used | SanDisk 64GB
Additional logs:
sudo kmscube -D /dev/dri/renderD128
drmModeGetResources failed: Permission denied
failed to initialize legacy DRM
sudo kmscube -D /dev/dri/card1
/dev/dri/card1 does not look like a modeset device
drmModeGetResources failed: Operation not supported
failed to initialize legacy DRM
es2_info -display :1
EGL_CLIENT_APIS: OpenGL OpenGL_ES
GL_VENDOR: Mesa/X.org
GL_VERSION: OpenGL ES 3.2 Mesa 22.3.6
GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.20
GL_RENDERER: llvmpipe (LLVM 15.0.6, 128 bits)