AMD GPU Hardware acceleration

Server Version#: 1.41.5.9522
Player Version#: 2025.11.1

Hi everyone, I’m running a Plex inside a docker container on TrueNAS Scale with AMD Radeon 6600XT and I’m trying to use it for hardware acceleration.

I have a plex pass, hardware acceleration is enabled in settings and plex shows me my gpu as option.

compose.yml

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=568
      - PGID=568
      - TZ=Etc/UTC
      - VERSION=docker
      - PLEX_CLAIM= #optional
    group_add:
      - 226
    volumes:
      - /mnt/ssd-pool/configs/plex:/config
      - /mnt/big-boy/media:/data
    devices:
      - /dev/dri:/dev/dri
    tmpfs:
      - /transcode
    restart: unless-stopped
networks: {}

Note: I tried with official plex container too but it didn’t work. Added the render group by GID to make sure permissions are right but I tested without it. 568 is TrueNAS’s default apps which is used for running docker applications.

Relevant log:

      48 Apr 08, 2025 11:40:54.617 [139701541583672] DEBUG - [GPU] Got device: AMD Navi 23 [Radeon RX 6600/6600 XT/6600M], amd@unknown, default true, best true, ID 1002:73ff:1eae:6501@0000:09:00.0, DevID [1002:73ff:1eae:6501], flags 0x60
      7 Apr 08, 2025 11:43:31.489 [139701523188536] DEBUG - [Req#19f9/Transcode] Codecs: testing h264 (decoder) with hwdevice vaapi
      6 Apr 08, 2025 11:43:31.489 [139701523188536] VERBOSE - [Req#19f9/Transcode] [FFMPEG] - Rescanning for external libs: '/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/e613bce-97f23d579c1001d8e9cc0d2e-linux-x86_64/'
      5 Apr 08, 2025 11:43:31.489 [139701523188536] DEBUG - [Req#19f9/Transcode] Codecs: hardware transcoding: testing API vaapi for device '/dev/dri/renderD128' (AMD Navi 23 [Radeon RX 6600/6600 XT/6600M])
      4 Apr 08, 2025 11:43:31.489 [139701523188536] VERBOSE - [Req#19f9/Transcode] [FFMPEG] - libva: VA-API version 1.21.0
      3 Apr 08, 2025 11:43:31.489 [139701523188536] VERBOSE - [Req#19f9/Transcode] [FFMPEG] - libva: User requested driver 'i965'
      2 Apr 08, 2025 11:43:31.489 [139701523188536] VERBOSE - [Req#19f9/Transcode] [FFMPEG] - libva: Trying to open /config/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64/i965_drv_video.so
      1 Apr 08, 2025 11:43:31.489 [139701523188536] VERBOSE - [Req#19f9/Transcode] [FFMPEG] - libva: va_openDriver() returns -1
  16541 Apr 08, 2025 11:43:31.489 [139701523188536] ERROR - [Req#19f9/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
      1 Apr 08, 2025 11:43:31.489 [139701523188536] DEBUG - [Req#19f9/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
      2 Apr 08, 2025 11:43:31.489 [139701523188536] DEBUG - [Req#19f9/Transcode] Could not create hardware context for h264

It seems Plex is trying to use i915 driver instead of amdgpu driver.
This could be because I migrated from Synology 220+ to TrueNAS with AMD gpu. Is there a way to fix it? if I delete e613bce-97f23d579c1001d8e9cc0d2e-linux-x86_64 codec directory will plex download the appropriate one for amd driver? Not even sure if it works that way.

Thank you for your time and if any additional info is needed I can provide it.

I’m not sure if it’s the only issue, but I think you’ve added an incorrect group to your container. The ‘226’ you’ve added is the device major number for the renderD128 device. What you want to add is the group ID for render:
getent group render | cut -d ':' -f 3

Unless the device major and the render group just coincidentally happens to be 226 in your environment (apologies if that’s the case).

It is also possible to just group_add the actual group name instead of using the ID itself:

...
  ...
    group_add:
      - render
...

Yeah tried that already it doesn’t seem to be issue. I even tried installing ffmpeg inside the container and tried hardware acceleration which works for ffmpeg.

I really think there is something wrong with plex trying to use i915 driver.

Fair enough.

This thread might have some useful information, if you haven’t stumbled upon it yourself already:

It’s a bit of a slog to read through, but many folks reported success in using AMD GPUs for hardware-accelerated transcoding.

1 Like

Thank you for linking this. I didn’t find this originally and that might help in future but I tested it now and still the same issue with i915.

Will wait to see what @ChuckPa says.

According to “Chuck’s Law” (Murphy is my cousin) :rofl: lol

There is currently only partial HW ( up to HEVC SDR) support for AMD gpus in the transcoder.
This works through the VAAPI ( libva api ) interface

It’s a royal P.I.T.A to make work–

  1. You must install the LIBVA libraries
  2. You must install the AMD drivers to make the GPU visible to LIBVA
  3. These, coupled with what you’ve done make the GPU visible to the libva api which the transcoder currently has.

The above “slog” is what you need to do (currently). I did it in LXC because it’s not reset every time the container restarts.

That’s the bad news. Now for the good news.

  1. We’re finalizing FFMPEG 6.1 (has AMD HW support)
  2. We just fixed a long-standing EAC-3 5.1 bug (pre-requisite for FFMPEG 6.1)

The complete To-Do list:

  1. FFMPEG 6.1
  2. Update the Intel Media Driver & Intel Compute Runtime
  3. Upgrade from the VAAPI interface to the AMD AMF interface
    ( This is some development we need to do )

There are other tasks to perform but these are the big broad strokes.

No, I don’t know the timeline as this represents a lot of work and testing, including fixing issues reported by folks as 6.1 is rolled out for forum testing.

1 Like

Could you share instructions for doing that?

I messed with GitHub - jefflessard/plex-vaapi-amdgpu-mod: linuxserver.io mod to enable hardware acceleration using vaapi amdgpu on linuxserver/plex and GitHub - naonak/plex-amdgpu: Plex Docker with AMDGPU-Pro for Hardware Transcoding without any success.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.