Hardware HDR tone mapping broken on debian/docker/intel setup

Server Version#: v1.32.0.6918-6f393eda1
Player Version#: Plex Web 4.104.2 (Firefox)

Having issues getting hardware transcoding to behave with HDR tone mapping enabled on the latest version of Plex Server. Had it working fine on my previous version until I did a recent container upgrade to the latest version (no hardware changes). I’ve tried multiple versions now rolling back and it appears the last version of the server that works without breaking hardware encoding is 1.27.2.5929-a806c5905

I’ve tried both the latest official docker container as well as the linuxserver container (which is the one I primarily use) with the same results

Hardware wise I’m running

OS: Debian
Kernal: 5.18.0-2-amd64
CPU: i5-11600K

On the host machine I have the following relevant package versions

Package: intel-media-va-driver-non-free
Version: 23.1.1+ds1-1

Package: intel-opencl-icd
Version: 23.05.25593.11

HWInfo host

  Model: "Intel RocketLake-S GT1 [UHD Graphics 750]"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x4c8a "RocketLake-S GT1 [UHD Graphics 750]"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x8694
  Revision: 0x04
  Driver: "i915"
  Driver Modules: "i915"

VAInfo host

libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ()

VAInfo inside 1.32 container

libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()

VAInfo inside 1.27 container

libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()

Logs
First I played the demo with tone mapping enabled and transcoding was forced software. I then stopped playback, turned tone mapping off, and played the same file and HW transcoding was enabled. Generated these logs immediately after
Plex Media Server Logs_2023-04-08_22-10-27 (1.32).zip (1.4 MB)

I then rolled back and restarted the docker container version to 1.27, played the same file with tone mapping enabled, and generated the logs again. HW transcoding worked fine
Plex Media Server Logs_2023-04-08_22-14-27 (1.27).zip (1.4 MB)

Using the follow demo file for testing but I see this with any HDR content that requires tone mapping

At this point I’m not sure what else to do to debug. I’ve read through the extensive forum posts and I know there’s lots of ongoing issues with tone mapping and opencl and I saw a few users with issues around the 1.29/1.28 version transition that had problems but neither of those versions were working on my hardware just 1.27 as above

Plex works very well in docker for all CPUs including Raptor Lake.

How do you have the GPU configured to pass throught?

It starts with hardware then, fails with an OpenCL error (can’t configure the output)

Apr 08, 2023 22:09:43.971 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode] [FFMPEG] - Format 0x50524742 -> unknown.
Apr 08, 2023 22:09:43.971 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode] [FFMPEG] - Created surface 0.
Apr 08, 2023 22:09:43.971 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode] [FFMPEG] - Direct mapping possible.
Apr 08, 2023 22:09:43.975 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Apr 08, 2023 22:09:43.975 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/e51a01b-4528-linux-x86_64/' LIBVA_DRIVERS_PATH=/usr/lib/plexmediaserver/lib/dri OCL_ICD_VENDORS="/config/Library/Application Support/Plex Media Server/Cache/CL-ICDs" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxx4733-b3f5-f5ee8f182be1 cl_cache_dir="/config/Library/Application Support/Plex Media Server/Cache/Shaders/icr-9-linux-x86_64/" "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 hevc -hwaccel:0 vaapi -hwaccel_fallback_threshold:0 10 -hwaccel_output_format:0 vaapi -hwaccel_device:0 vaapi -codec:1 dca -analyzeduration 20000000 -probesize 20000000 -i /data/demos/HDR10Plus_PA_DTSX.mkv -filter_complex "[0:0]hwupload[0];[0]scale_vaapi=w=2276:h=1280:format=p010[1];[1]hwmap=derive_device=opencl[2];[2]tonemap_opencl=tonemap=mobius:format=nv12:m=bt709:p=bt709:r=tv[3];[3]hwmap=derive_device=vaapi:reverse=1[4];[4]hwupload[5]" -map "[5]" -metadata:s:0 language=eng -codec:0 h264_vaapi -b:0 20000k -r:0 23.975999999999999 -force_key_frames:0 "expr:gte(t,n_forced*1)" -filter_complex "[0:1] aresample=async=1:ochl='stereo':rematrix_maxval=0.000000dB:osr=48000[6]" -map "[6]" -metadata:s:1 language=eng -codec:1 aac -b:1 256k -f dash -seg_duration 1 -dash_segment_type mp4 -init_seg_name 'init-stream$RepresentationID$.m4s' -media_seg_name 'chunk-stream$RepresentationID$-$Number%05d$.m4s' -window_size 5 -delete_removed false -skip_to_segment 1 -time_delta 0.0625 -manifest_name "http://127.0.0.1:32400/video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/manifest?X-Plex-Http-Pipeline=infinite" -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -init_hw_device vaapi=vaapi:/dev/dri/renderD128 -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress
Apr 08, 2023 22:09:43.975 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode/JobRunner] In directory: "/tmp/Transcode/Sessions/plex-transcode-tdfl79m00eoannwiimrbhk15-d9940421-c72a-4481-8996-2b95ae0c9008"
Apr 08, 2023 22:09:43.976 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode/JobRunner] Jobs: Starting child process with pid 362
Apr 08, 2023 22:09:43.981 [0x7f255398bb38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=startup (9 live) #83 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:43.981 [0x7f255b70fb38] DEBUG - Completed: [127.0.0.1:34618] 204 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=startup (9 live) #83 0ms 203 bytes (pipelined: 1) (range: bytes=0-) 
Apr 08, 2023 22:09:43.989 [0x7f255639eb38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=startup (9 live) #10f Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:43.989 [0x7f255b50cb38] DEBUG - Completed: [127.0.0.1:34618] 204 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=startup (9 live) #10f 0ms 203 bytes (pipelined: 2) (range: bytes=0-) 
Apr 08, 2023 22:09:43.990 [0x7f2556923b38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=opening (9 live) #110 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:43.990 [0x7f255b70fb38] DEBUG - Completed: [127.0.0.1:34618] 204 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=opening (9 live) #110 0ms 203 bytes (pipelined: 3) (range: bytes=0-) 
Apr 08, 2023 22:09:44.015 [0x7f255398bb38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=opened (9 live) #111 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:44.015 [0x7f255b50cb38] DEBUG - Completed: [127.0.0.1:34618] 204 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?status=opened (9 live) #111 0ms 203 bytes (pipelined: 4) (range: bytes=0-) 
Apr 08, 2023 22:09:44.015 [0x7f255639eb38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/stream?index=0&id=0&codec=hevc&type=video (9 live) #112 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:44.015 [0x7f255b70fb38] DEBUG - Completed: [127.0.0.1:34618] 200 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/stream?index=0&id=0&codec=hevc&type=video (9 live) #112 0ms 195 bytes (pipelined: 5) (range: bytes=0-) 
Apr 08, 2023 22:09:44.015 [0x7f2556923b38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/stream?index=1&id=0&codec=dts&type=audio (9 live) #113 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:44.015 [0x7f255b70fb38] DEBUG - Completed: [127.0.0.1:34618] 200 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/stream?index=1&id=0&codec=dts&type=audio (9 live) #113 0ms 195 bytes (pipelined: 6) (range: bytes=0-) 
Apr 08, 2023 22:09:44.017 [0x7f255398bb38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/streamDetail?index=0&id=0&codec=hevc&type=video&profile=Main%2010&language=eng&width=3840&height=2160&interlaced=0&sar=1:1&level=153&frameRate=23.976&disp_default=1 (9 live) #114 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:44.017 [0x7f255b50cb38] DEBUG - Completed: [127.0.0.1:34618] 200 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/streamDetail?index=0&id=0&codec=hevc&type=video&profile=Main%2010&language=eng&width=3840&height=2160&interlaced=0&sar=1:1&level=153&frameRate=23.976&disp_default=1 (9 live) #114 0ms 195 bytes (pipelined: 7) (range: bytes=0-) 
Apr 08, 2023 22:09:44.017 [0x7f255639eb38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/streamDetail?index=1&id=0&codec=dts&type=audio&profile=DTS-HD%20MA&language=eng&channels=8&layout=7.1&sampleRate=48000&bitDepth=24&disp_default=1 (9 live) #115 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:44.017 [0x7f255b50cb38] DEBUG - Completed: [127.0.0.1:34618] 200 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress/streamDetail?index=1&id=0&codec=dts&type=audio&profile=DTS-HD%20MA&language=eng&channels=8&layout=7.1&sampleRate=48000&bitDepth=24&disp_default=1 (9 live) #115 0ms 195 bytes (pipelined: 8) (range: bytes=0-) 
Apr 08, 2023 22:09:44.018 [0x7f2556923b38] DEBUG - Request: [127.0.0.1:34618 (Loopback)] PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?duration=50.054000 (9 live) #116 Signed-in Token (mhiggins) (range: bytes=0-) 
Apr 08, 2023 22:09:44.018 [0x7f255b70fb38] DEBUG - Completed: [127.0.0.1:34618] 204 PUT /video/:/transcode/session/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008/progress?duration=50.054000 (9 live) #116 0ms 203 bytes (pipelined: 9) (range: bytes=0-) 
Apr 08, 2023 22:09:44.018 [0x7f25583bfb38] DEBUG - [Req#10b/Transcode] Started session successfully: tdfl79m00eoannwiimrbhk15
Apr 08, 2023 22:09:44.018 [0x7f255b50cb38] DEBUG - Completed: [10.0.1.62:51622] 200 GET /video/:/transcode/universal/start.mpd?hasMDE=1&path=%2Flibrary%2Fmetadata%2F43651&mediaIndex=0&partIndex=0&protocol=dash&fastSeek=1&directPlay=0&directStream=1&subtitleSize=100&audioBoost=100&location=lan&addDebugOverlay=0&autoAdjustQuality=0&directStreamAudio=1&mediaBufferSize=102400&session=tdfl79m00eoannwiimrbhk15&subtitles=burn&Accept-Language=en (9 live) #10b TLS GZIP 57ms 1077 bytes (pipelined: 56)
Apr 08, 2023 22:09:44.023 [0x7f255398bb38] DEBUG - Request: [10.0.1.62:51622 (Allowed Network (Subnet))] GET /status/sessions (9 live) #122 TLS GZIP Signed-in Token (mhiggins) (Firefox)
Apr 08, 2023 22:09:44.023 [0x7f255398bb38] DEBUG - [Req#122] [Now] Adding 0 sessions.
Apr 08, 2023 22:09:44.023 [0x7f255b70fb38] DEBUG - Completed: [10.0.1.62:51622] 200 GET /status/sessions (9 live) #122 TLS GZIP 0ms 475 bytes (pipelined: 57)
Apr 08, 2023 22:09:44.025 [0x7f255639eb38] DEBUG - Request: [10.0.1.62:51622 (Allowed Network (Subnet))] GET /status/sessions (9 live) #123 TLS GZIP Signed-in Token (mhiggins) (Firefox)
Apr 08, 2023 22:09:44.025 [0x7f255639eb38] DEBUG - [Req#123] [Now] Adding 0 sessions.
Apr 08, 2023 22:09:44.025 [0x7f255b50cb38] DEBUG - Completed: [10.0.1.62:51622] 200 GET /status/sessions (9 live) #123 TLS GZIP 0ms 475 bytes (pipelined: 58)
Apr 08, 2023 22:09:44.052 [0x7f2556923b38] DEBUG - Request: [10.0.1.62:51622 (Allowed Network (Subnet))] GET /video/:/transcode/universal/session/tdfl79m00eoannwiimrbhk15/1/header (9 live) #124 TLS GZIP Signed-in
Apr 08, 2023 22:09:44.052 [0x7f255398bb38] DEBUG - Request: [10.0.1.62:51633 (Allowed Network (Subnet))] GET /video/:/transcode/universal/session/tdfl79m00eoannwiimrbhk15/0/header (9 live) #105 TLS GZIP Signed-in
Apr 08, 2023 22:09:44.118 [0x7f255639eb38] ERROR - [Req#117/Transcode/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008] [AVHWDeviceContext @ 0x7f16815023c0] Failed to get number of OpenCL platforms: -1001.
Apr 08, 2023 22:09:44.118 [0x7f25583bfb38] ERROR - [Req#125/Transcode/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008] [AVHWDeviceContext @ 0x7f16815023c0] Failed to get number of OpenCL platforms: -1001.
Apr 08, 2023 22:09:44.118 [0x7f255639eb38] ERROR - [Req#126/Transcode/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008] [Parsed_hwmap_2 @ 0x7f1687182c40] Failed to created derived device context: -19.
Apr 08, 2023 22:09:44.118 [0x7f25583bfb38] ERROR - [Req#127/Transcode/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008] [Parsed_hwmap_2 @ 0x7f1687182c40] Failed to configure output pad on Parsed_hwmap_2
Apr 08, 2023 22:09:44.119 [0x7f255639eb38] ERROR - [Req#128/Transcode/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008] Error reinitializing filters!
Apr 08, 2023 22:09:44.119 [0x7f25583bfb38] ERROR - [Req#129/Transcode/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008] Failed to inject frame into filter network: No such device
Apr 08, 2023 22:09:44.120 [0x7f255639eb38] ERROR - [Req#12a/Transcode/tdfl79m00eoannwiimrbhk15/d9940421-c72a-4481-8996-2b95ae0c9008] Error while processing the decoded data for stream #0:0
Apr 08, 2023 22:09:44.142 [0x7f255b989b38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 362 is 1 (failure)
Apr 08, 2023 22:09:44.142 [0x7f2558fdbb38] DEBUG - Streaming Resource: Changing client to use software decoding
Apr 08, 2023 22:09:44.142 [0x7f2558fdbb38] DEBUG - Found session GUID of tdfl79m00eoannwiimrbhk15 in session start.

When this happens in docker containers, it’s usually a misconfiguration of the passthrough.

Plex doesn’t use any of the VA drivers you have installed.
PMS brings all drivers it needs with it.

Docker-compose config is

  plex:
    image: lscr.io/linuxserver/plex
    #image: plexinc/pms-docker:beta
    container_name: plex
    network_mode: host
    devices:
      - /dev/dri:/dev/dri
    volumes:
      - /opt/appdata/plex:/config
      - /mnt/storage:/data:ro
    tmpfs:
      - /tmp
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - PLEX_UID=${PUID}
      - PLEX_GID=${PGID}
      #- VERSION=latest
      - VERSION=1.27.2.5929-a806c5905
      - TZ=${TZ}
    restart: unless-stopped

Some extra info

/dev/dri$ lspci -v -s $(lspci | grep VGA | cut -d" " -f 1)
00:02.0 VGA compatible controller: Intel Corporation RocketLake-S GT1 [UHD Graphics 750] (rev 04) (prog-if 00 [VGA controller])
        DeviceName: Onboard - Video
        Subsystem: ASUSTeK Computer Inc. RocketLake-S GT1 [UHD Graphics 750]
        Flags: bus master, fast devsel, latency 0, IRQ 146, IOMMU group 1
        Memory at 6000000000 (64-bit, non-prefetchable) [size=16M]
        Memory at 4000000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 7000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

I’ve toggled between versions/containers by alternating the two commented lines

PUID and PGID environment variables are both equal to 1001 which is my “dockeruser” which belongs to both the video and render groups

/dev/dri$ ls -l
drwxr-xr-x 2 root root         80 Apr  6 11:06 by-path
crw-rw---- 1 root video  226,   0 Apr  6 11:06 card0
crw-rw---- 1 root render 226, 128 Apr  6 11:06 renderD128
/dev/dri$ groups dockeruser
dockeruser : dockeruser tty uucp dialout video render docker

From inside the linuxserver/plex container with latest version

/dev/dri$ ls -l
crw-rw---- 1 root video     226,   0 Apr  9 02:51 card0
crw-rw---- 1 root videox2sb 226, 128 Apr  9 02:51 renderD128

/dev/dri$ groups abc
abc : abc video users videox2sb

Docker logs linuxserver/plex container

plex             | **** creating video group videox2sb with id 108 ****
plex             | **** adding /dev/dri/renderD128 to video group videox2sb with id 108 ****
plex             | **** adding /dev/dri/card0 to video group video with id 44 ****

And from inside the plexinc/pms-docker:beta container

/dev/dri$ ls -l
crw-rw---- 1 root video  226,   0 Apr  9 02:47 card0
crw-rw---- 1 root video1 226, 128 Apr  9 02:47 renderD128

/dev/dri$ groups plex
plex : plex video users video1

Docker log plexinc/pms-docker:beta container

plex             | [cont-init.d] 45-plex-hw-transcode-and-connected-tuner: executing...
plex             | [cont-init.d] 45-plex-hw-transcode-and-connected-tuner: exited 0.

The fact that HW acceleration with tone mapping works fine on 1.27 and works fine with tone mapping disabled on all future versions made me suspect it wasn’t a passthrough issue but not sure if the requirements differ once tone mapping is on in some way. Verified HW works using both the Plex dashboard using intel-gpu-top/cpu usage monitoring in those scenarios

Look at the group assignments you have.

  1. card0 → video
  2. renderD128 → render

You created a different group which really isn’t the answer here.

Put the plex user in groups video and video2sb (which is really strange)

On the native ubuntu host they are:

drwxr-xr-x   2 root root        120 Apr  4 02:33 by-path/
crw-rw----+  1 root render 226,   0 Apr  8 20:38 card0
crw-rw----+  1 root render 226,   1 Apr  9 11:00 card1
crw-rw----+  1 root render 226, 128 Apr  8 20:38 renderD128
crw-rw----+  1 root render 226, 129 Apr  8 20:38 renderD129
[chuck@lizum Downloads.2019]$ 

I create a lsio container and get

Error response from daemon: No such container: lsioplex
Unable to find image 'lscr.io/linuxserver/plex:latest' locally
latest: Pulling from linuxserver/plex
38a8b9979b0c: Pull complete 
48f754c837b5: Pull complete 
e62f0384a36b: Pull complete 
776e56018534: Pull complete 
22883c3dda69: Pull complete 
dfd306c9b291: Pull complete 
498a4c6d29a4: Pull complete 
Digest: sha256:0ca1bee9673525ad1a4b27e8f3431b435a0a58db05582d20f22a56a06b414d6d
Status: Downloaded newer image for lscr.io/linuxserver/plex:latest
db3ac1e95811082057711cbf8b47ba98cc5e5b51955671a800d159beb3577ebb
[chuck@lizum docker.2026]$ sudo chmod 6755 /usr/bin/docker
[chuck@lizum docker.2027]$ docker list
docker: 'list' is not a docker command.
See 'docker --help'
[chuck@lizum docker.2028]$ docker container list
CONTAINER ID   IMAGE                      COMMAND   CREATED          STATUS          PORTS     NAMES
db3ac1e95811   lscr.io/linuxserver/plex   "/init"   20 seconds ago   Up 18 seconds             lsioplex
[chuck@lizum docker.2029]$ docker exec -it lsioplex bash
root@lsioplex:/# ls -la /dev/dri
total 0
drwxr-xr-x 2 root root           120 Apr  9 17:02 .
drwxr-xr-x 6 root root           360 Apr  9 17:02 ..
crw-rw---- 1 root videotzar 226,   0 Apr  9 17:02 card0
crw-rw---- 1 root videotzar 226,   1 Apr  9 17:02 card1
crw-rw---- 1 root videotzar 226, 128 Apr  9 17:02 renderD128
crw-rw---- 1 root videotzar 226, 129 Apr  9 17:02 renderD129
root@lsioplex:/# 

repeating for plexinc/pms-docker

[chuck@lizum docker.2031]$ ./dockerplex
plex
plex
Error response from daemon: No such container: plex
Error response from daemon: No such container: plex
Error response from daemon: No such container: plex
Untagged: lscr.io/linuxserver/plex:latest
Untagged: lscr.io/linuxserver/plex@sha256:0ca1bee9673525ad1a4b27e8f3431b435a0a58db05582d20f22a56a06b414d6d
Deleted: sha256:d54af5dea20d78cceabe2e3a304f3e35dcc71fbbee543f2bcc51e652120f3e1f
Untagged: cr.hotio.dev/hotio/plex:latest
Untagged: cr.hotio.dev/hotio/plex@sha256:5cf2e82bc2d250b646fb045450d9c1bee4e66d489fbfad1777a69834f76b025b
Deleted: sha256:1ee42293bba92d3783edcccb1fbfad5538f941602e1338c2eeb16bdfc0bae161
Untagged: plexinc/pms-docker:plexpass
Untagged: plexinc/pms-docker@sha256:8aeb4a982ea564ad309861dd251cd9e218aac3f4e4d3da21375568341be1b16f
Deleted: sha256:bd2a705539fb8e5a051e7754a97e7345e542e6e1aa374bf6d7cff0c2601034bd
Unable to find image 'plexinc/pms-docker:plexpass' locally
plexpass: Pulling from plexinc/pms-docker
a70d879fa598: Already exists 
c4394a92d1f8: Already exists 
10e6159c56c0: Already exists 
d1042fe57e96: Already exists 
ac5317c7b384: Already exists 
47414e89d67b: Already exists 
Digest: sha256:8aeb4a982ea564ad309861dd251cd9e218aac3f4e4d3da21375568341be1b16f
Status: Downloaded newer image for plexinc/pms-docker:plexpass
d2b0eaf84c31d548bfc04e09d5289b15805cd9b30d91229dbed42b3983db3d64
[chuck@lizum docker.2032]$ docker container list
CONTAINER ID   IMAGE                         COMMAND   CREATED          STATUS                    PORTS     NAMES
d2b0eaf84c31   plexinc/pms-docker:plexpass   "/init"   16 seconds ago   Up 14 seconds (healthy)             plex
[chuck@lizum docker.2033]$ docker exec -it plex bash
root@dockerplex:/# ls -la /dev/dri
total 0
drwxr-xr-x 2 root root        120 Apr  9 17:03 .
drwxr-xr-x 6 root root        360 Apr  9 17:03 ..
crw-rw---- 1 root video1 226,   0 Apr  9 17:03 card0
crw-rw---- 1 root video1 226,   1 Apr  9 17:03 card1
crw-rw---- 1 root video1 226, 128 Apr  9 17:03 renderD128
crw-rw---- 1 root video1 226, 129 Apr  9 17:03 renderD129
root@dockerplex:/# 

Suggest you go figure out what’s wrong with the base host.
That failing, Put PMS in a PUID which a member of both groups – applied INSIDE the container.

Still don’t think this is a permission issue. The video and render groups are the default in Debian that wasn’t something custom

Similarly, the videox2sb group isn’t something custom I’ve implemented, but a randomly generated group created by the lsio container as part of this startup script

Even though it appears a little strange it still results in the user having both read and write access to both devices/paths

Either way, I changed the card0 device to be owned by the render group so now both are owned by render

drwxr-xr-x 2 root root         80 Apr  9 04:18 by-path
crw-rw---- 1 root render 226,   0 Apr  9 04:18 card0
crw-rw---- 1 root render 226, 128 Apr  9 04:18 renderD128

Which gives inside lsio container

crw-rw---- 1 root videofcrf 226,   0 Apr  9 19:22 card0
crw-rw---- 1 root videofcrf 226, 128 Apr  9 19:22 renderD128

Plexinc container

crw-rw---- 1 root video1 226,   0 Apr  9 19:27 card0
crw-rw---- 1 root video1 226, 128 Apr  9 19:27 renderD128

So essentially mirroring what you have. Still no change in tone mapping breaking hardware transcoding. Still works fine on 1.27

And for the sake of really trying to eliminate permissions as the underlying problem, I chmod 777 card0 and renderD128 and this made no improvement, still broken with tone mapping enabled on any container

If chmod 777 inside and outside the container made NO improvement, there’s a deeper problem.

To investigate, (since my last reply)

  1. Setup Debian 11 on my ESXi system again (NUC8-i7-HVK)

  2. Native or Docker – Debian 11.6 – PMS 1.32.0 – NO hardware works.
    – but it sees the hardware.
    – The /dev/dri nodes are ALL FUBAR named.

  3. Using my workstation (NUC8-i7-HVK – I have 3 of them)

  4. Native or Docker – Ubuntu 22.04.5 LTS - works

Continuing my investigation.

EDIT: I’m an idiot – Forgot ESXI reverses the enumerations in /dev/dri. Still not making progress. Today is holiday for me… I’ll deal with tomorrow.

This is BS, TOTAL BS

total 0
drwxr-xr-x 2 root root           120 Apr  9 20:43 .
drwxr-xr-x 6 root root           360 Apr  9 20:43 ..
crw-rw---- 1 root videoo9rp 226,   0 Apr  9 20:43 card0
crw-rw---- 1 root videoo9rp 226,   1 Apr  9 20:43 card1
crw-rw---- 1 root videoo9rp 226, 128 Apr  9 20:43 renderD128
crw-rw---- 1 root videoo9rp 226, 129 Apr  9 20:43 renderD129
root@lsioplex:/config/Library/Application Support/Plex Media Server# 

the group changes randomly.

Also I appear to have been incorrect about which version seems to break things

I just went through each one and it appears the transition happens at slightly different versions depending on LSIO vs Plexinc container and the Plexinc container never actually works. Tested a ton of different versions and trying to note where the transition point takes place

LSIO
1.29.1.6313-f4cdfea9c = hw tone mapping breaks, forced software
1.29.0.6244-819d3678c = hw tone mapping works

Plexinc
1.28.1.6092-87136b92b- hw tone mapping breaks, forced software
1.28.0.5999-97678ded3 - 1.26.2.5797-5bd057d2b - Reports hw transcoding on dashboard but no output on client, just endless loading

Disabling tone mapping on any of those above versions and hw transcoding works fine

Included logs from the Plexinc version of the containers
Plex Media Server Logs_2023-04-09_21-43-40 (1.28.0.5999).zip (1.0 MB)
Plex Media Server Logs_2023-04-09_21-45-21 (1.28.1.6092).zip (1.0 MB)

Also in the process of rebuilding my container so many times I appear to have broken HTTPs somehow and can only access my webui locally through HTTP after changing it from required to preferred in Preferences.xml, I’ll have to sort that out now

Sorry. can’t buy that it breaks at 1.28.x and 1.29.x when everyone else has been running stable plus our RaptorLake is running


We’ll figure out what it is but it’s not those versions.
There’s something else going on.

For what its worth in my initial attempts to debug this myself I stumbled across a few reddit posts where people were having a similar issue and the general recommendation was to just use these older versions. Not a great solution and the posts are dated but I may not be the only one. I’m sure there’s some underlying issue or incompatibility somewhere on my system that’s interfering with certain versions

https://www.reddit.com/r/PleX/comments/1039c9m/hardware_transcoding_not_working_in_docker/

I did spin up a jellyfin container just to see if the problem was happening there too and that’s not having any issues, hdr tone mapping working fine with hardware, though not sure if any conclusions can be drawn from that

After 1.28.0, Plex started providing its own HDR tone mapping and Intel Compute Runtime libraries.

Now, and well established by 1.29.2.6364, you don’t need to preinstall anything for all servers up through RaptorLake.

If you try to force it, you’ll likely break it and that may be what’s happening.

I also just went back, adjusted my preferences and I’ve got HW transcode and tone mapping running just fine again.

Screenshot from 2023-04-09 22-07-43

I can spin up Plex docker here without issue on this NUC (which has dual GPUs)
I really am suspecting an LSIO problem based on this:

permitted by applicable law.
Last login: Sun Apr  9 21:35:53 2023 from 192.168.0.13
chuck@debian-11:~$ uname -a
Linux debian-11 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
chuck@debian-11:~$ ls -la /dev/dri
total 0
drwxr-xr-x   3 root root        140 Apr  9 21:29 .
drwxr-xr-x  18 root root       3200 Apr  9 21:29 ..
drwxr-xr-x   2 root root        120 Apr  9 21:29 by-path
crw-rw----+  1 root render 226,   0 Apr  9 22:04 card0
crw-rw----+  1 root render 226,   1 Apr  9 22:04 card1
crw-rw----+  1 root render 226, 128 Apr  9 22:04 renderD128
crw-rw----+  1 root render 226, 129 Apr  9 22:04 renderD129
chuck@debian-11:~$ 

Notice how the UID & GID are exactly per standard naming

So I decided to just wipe my /config directory by doing

    volumes:
      - /opt/appdata/plex2:/config

Essentially making a new instance and server and now it seems to be working again, confirmed tone mapping enabled too

Screenshot 2023-04-09 224709

Suppose I’ll have to recreate my library and reshare my server with this approach but at least its a potential avenue to fixing this

On the old directory (/opt/appdata/plex) I tried wiping out the Cache and Codecs directory to see if that would have an impact and it did not. I also now can’t get that instance to connect via HTTPS not sure if you have any suggestions for things I can delete from that instance that would clear those certs and/or clear out whatever might be screwing up tone mapping hardware transcoding so I don’t have to redo my whole library but if not I’ll start rebuilding. I guess something in the persistent store was somehow breaking things.

I was able to restore my original config folder

There was a bunch of ./custom-cont-init.d* and ./custom-services.d* folders that had been created by the LSIO images in the /config directory (or /opt/appdata/plex on host), not sure why they were there but I wiped them out. Interestingly I see these same kinds of folders on some other unrelated containers from LSIO. They all appeared to be empty though.

I also removed Codecs, Cache, Drivers, and Scanners and was then able to restart and HTTPS was restored and hw transcoding is working now on the original persistent volume

Both LSIO and Plexinc containers working appropriately on latest versions with tone mapping and hw transcoding, so I’m guessing it must have been something that made its way into the persistent volume that was interfering

Thanks again for all your help. Not only on this thread but I think every thread I found when researching potential solutions had you posting very insightful and in depth technical solutions. However much they’re paying you, its not enough

Also, for what its worth, after restarting the /dev/dri permission on host reverted back to

crw-rw---- 1 root video  226,   0 Apr  9 22:06 card0
crw-rw---- 1 root render 226, 128 Apr  9 22:06 renderD128

but this didn’t cause any problem and its working fine on both containers

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