Plex hw transcoding is not working with iGPU (10710U) under Debian 11

Server Version#: 1.26.1.5798
Player Version#: 4.80.0
setup: CPU: 10710U

Good day,

I stayed a long time on Debian 10, now I moved to Debian 11. I use Plex in a docker container and my hw transcoding was working fine on Debian 10.

Somehow now Plex does not use transcoding anymore.

thats the output of: ls -l /dev/dri

drwxr-xr-x 2 root root 80 12. Mai 10:28 by-path
crw-rw---- 1 root video 226, 0 12. Mai 10:28 card0
crw-rw---- 1 root render 226, 128 12. Mai 10:28 renderD128

I assigned already my docker user to the video and render group.

When I look into the Plex logfile in docker I always get this out of it:

[cont-init.d] 50-gid-video: executing...
**** permissions for /dev/dri/renderD128 are good ****
**** permissions for /dev/dri/card0 are good ****

But as soon as I start to transcode something it crashes:

> Abort was called at 39 line in file: /opt/src/opencl/shared/source/gmm_helper/client_context/gmm_client_context.cpp

Also for sure /dev/dri is into my container config as a device

thats vainfo:

error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
root@OMV:/dev/dri#

Any ideas about? Do I need to change to a specific driver or reinstall drivers etc? I am a littlebit frustrated to be honest.

Thanks

I checked with Engineering.

PMS 1.26.1.5798-99a4a6ac9 contains the Intel Compute Runtime modules in the container.

What are you seeing? Do you have a debug log file zip which captures the failure to transcode ?

I think thats the part you are looking for? (Got it from Plex Media Server.log) What I am wondering is, that it says no hw decoder found. Plus the Plex Token is XXXXXX (did not changed anything, is it thats why maybe)

May 13, 2022 05:50:26.589 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] We're in a seek: asked for 633, min/max available was 0/1
May 13, 2022 05:50:26.589 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] Segment #633 WON.
May 13, 2022 05:50:26.589 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] Killing job.
May 13, 2022 05:50:26.589 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] Signalling job ID 5042 with 9
May 13, 2022 05:50:26.590 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] Job was already killed, not killing again.
May 13, 2022 05:50:26.590 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] Stopping transcode session 2eedeoqeo6lyez9tn8d388w9
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] Starting a transcode session 2eedeoqeo6lyez9tn8d388w9 at offset 1899.0 (state=3)
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [Universal] Using local file path instead of URL: /movies/****.mkv
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] Codecs: hardware transcoding: testing API vaapi
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x41524742 -> bgra.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x42475241 -> argb.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x41424752 -> rgba.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x52474241 -> abgr.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x58524742 -> bgr0.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x42475258 -> 0rgb.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x58424752 -> rgb0.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x52474258 -> 0bgr.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x30335241 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x30334241 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x30335258 -> x2rgb10le.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x30334258 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x36314752 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x50424752 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x50524742 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x56555941 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x30303859 -> gray.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x3231564e -> nv12.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x3132564e -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x32595559 -> yuyv422.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x59565955 -> uyvy422.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x32315659 -> yuv420p.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x30323449 -> yuv420p.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x50313134 -> yuv411p.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x48323234 -> yuv422p.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x56323234 -> yuv440p.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x50343434 -> yuv444p.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x33434d49 -> unknown.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Format 0x30313050 -> p010le.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Created surface 0.
May 13, 2022 05:50:26.591 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] [FFMPEG] - Direct mapping possible.
May 13, 2022 05:50:26.592 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9] TPU: hardware transcoding: final decoder: , final encoder: 
May 13, 2022 05:50:26.592 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/994f4ee-4301-linux-x86_64/' LIBVA_DRIVERS_PATH=/usr/lib/plexmediaserver/lib/dri X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 hevc -codec:1 dca -ss 1899 -analyzeduration 20000000 -probesize 20000000 -i /movies/***.mkv -filter_complex "[0:0]scale=w=2276:h=1280:force_divisible_by=4[0];[0]format=p010,tonemap=mobius[1];[1]format=pix_fmts=yuv420p|nv12[2]" -map "[2]" -codec:0 libx264 -crf:0 16 -r:0 23.975999999999999 -preset:0 veryfast -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=hex:8x8dct=0:partitions=none -force_key_frames:0 "expr:gte(t,n_forced*3)" -filter_complex "[0:1] aresample=async=1:ocl='stereo':rematrix_maxval=0.000000dB:osr=48000[3]" -map "[3]" -metadata:s:1 language=deu -codec:1 aac -b:1 256k -f dash -seg_duration 3 -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 634 -time_delta 0.0625 -manifest_name "http://127.0.0.1:32400/video/:/transcode/session/2eedeoqeo6lyez9tn8d388w9/c611d730-5b76-4216-a524-8b4188c13dac/manifest?X-Plex-Http-Pipeline=infinite" -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -init_hw_device vaapi=vaapi: -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/2eedeoqeo6lyez9tn8d388w9/c611d730-5b76-4216-a524-8b4188c13dac/progress
May 13, 2022 05:50:26.592 [0x7fa6f34acb38] DEBUG - [Transcode/2eedeoqeo6lyez9tn8d388w9/JobRunner] Jobs: Starting child process with pid 5092

You’re correct, PMS can’t see the device node.

If QSV is working, you’ll see the transcoder probe the device and obtain its capabilities.

I was thinking about this and thing I have it.

[chuck@lizum ~.2000]$ ls -la /dev/dri
total 0
drwxr-xr-x   3 root root        140 May 13 15:48 ./
drwxr-xr-x  22 root root       5320 May 13 15:48 ../
drwxr-xr-x   2 root root        120 May 13 15:48 by-path/
crw-rw----+  1 root render 226,   0 May 13 15:48 card0
crw-rw----+  1 root render 226,   1 May 13 15:48 card1
crw-rw----+  1 root render 226, 128 May 13 15:48 renderD128
crw-rw----+  1 root render 226, 129 May 13 15:48 renderD129
[chuck@lizum ~.2001]$
  1. Why are card0 and renderD128 not in the same group?

  2. More importantly, is the Docker UID a member of video and render
    – OR –

  3. Do you run directly with the PGID/PLEX_GID matching /dev/dri ?

You can make a quick test:

sudo chmod 666 /dev/dri/render* /dev/dri/card*

This will disappear at next boot.

If it works, you have a PGID mismatch somewhere or the --device=/dev/dri:/dev/dri clause has a syntax error somewhere

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