I have Radeon 6600 XT AMD GPU inside my TrueNAS server and I’m trying to get hardware acceleration in my containers but it doesn’t work.
In case it’s relevant, I run Dockge as TrueNAS app and I run my containers inside it.
I also tried just starting the container from the terminal.
I tested this with Immich, Plex and some other containers but it didn’t work anywhere.
Here is the example of Plex container:
services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:
- PUID=568
- PGID=568
- TZ=Etc/UTC
- VERSION=docker
group_add:
- video
- render
volumes:
- /mnt/ssd-pool/configs/plex:/config
- /mnt/big-boy/media:/data
devices:
- /dev/dri:/dev/dri
tmpfs:
- /transcode
restart: unless-stopped
networks: {}
To test this, I would enter the container and install vainfo package and test with:
vainfo --display drm --device /dev/dri/renderD128
Failed to open the given device!
Inside container:
root@truenas:/# id
uid=0(root) gid=0(root) groups=0(root),44(video),995(render)
root@truenas:/# ls -alh /dev/dri
total 0
drwxr-xr-x 2 root root 80 Jan 29 10:50 .
drwxr-xr-x 6 root root 360 Jan 29 10:50 ..
crw-rw---- 1 root video 226, 0 Jan 29 10:50 card0
crw-rw---- 1 root group0pwm 226, 128 Jan 29 10:50 renderD128
On host:
root@truenas[/home/truenas_admin]# ls -alh /dev/dri
total 0
drwxr-xr-x 3 root root 100 Jan 29 10:48 .
drwxr-xr-x 19 root root 4.1K Jan 29 10:49 ..
drwxr-xr-x 2 root root 80 Jan 29 10:49 by-path
crw-rw---- 1 root video 226, 0 Jan 29 10:49 card0
crw-rw---- 1 root render 226, 128 Jan 29 10:48 renderD128
It is worth noting that Plex recognizes the GPU but it fails to transcode since it can’t access /dev/dri/renderD128 so it fallbacks to CPU.