Plex on Debian 11 on Intel NUC 11 not hardware transcoding

Server Version#: 1.30.2.6563
Player Version#: Plex Web 4.99.2 through Firefox

image

Latest PMS logs: gist:72669a8a2b7b8e7f1c10944dedbd1ead · GitHub

I’m setting up a Plex Server for a friend. The system is an Intel NUC 11 which supports Intel Quicksync. Plex is installed natively in Debian 11 but when I try transcoding, hw transcoding is not working as shown in the dashboard screenshot above.

I have the same setup but with a NUC 10 and everything is working. @ChuckPa do you have any ideas?

Jan 29 22:47:16 mediaserver logger[4809]: PlexMediaServer install: PlexMediaServer-1.30.2.6563-3d4dc0cce - Installation starting.
Jan 29 22:47:16 mediaserver logger[4811]: PlexMediaServer install: Now installing based on:
Jan 29 22:47:16 mediaserver logger[4815]: PlexMediaServer install:   Installation Type:   Update
Jan 29 22:47:16 mediaserver logger[4817]: PlexMediaServer install:   Process Control:     systemd
Jan 29 22:47:16 mediaserver logger[4819]: PlexMediaServer install:   Plex User:           plex
Jan 29 22:47:16 mediaserver logger[4821]: PlexMediaServer install:   Plex Group:          plex
Jan 29 22:47:16 mediaserver logger[4823]: PlexMediaServer install:   Video Group:         render
Jan 29 22:47:16 mediaserver logger[4825]: PlexMediaServer install:   Metadata Dir:        /home/plex/Library/Application Support
Jan 29 22:47:16 mediaserver logger[4827]: PlexMediaServer install:   Temp Directory:      /dev/shm/transcoding  (set in Preferences.xml)
Jan 29 22:47:16 mediaserver logger[4829]: PlexMediaServer install:   Lang Encoding:       en_US.UTF-8
Jan 29 22:47:16 mediaserver logger[4831]: PlexMediaServer install:   Processor:           11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Jan 29 22:47:16 mediaserver logger[4837]: PlexMediaServer install:   Config file used:    /etc/systemd/system/plexmediaserver.service.d/override.conf
Jan 29 22:47:16 mediaserver logger[4839]: PlexMediaServer install:   Intel i915 Hardware: Found
Jan 29 22:47:16 mediaserver logger[4841]: PlexMediaServer install:   Nvidia GPU card:     Not Found
Jan 29 22:47:16 mediaserver logger[4843]: PlexMediaServer install:

Are the Intel compute libraries still needed? I thought they weren’t anymore? I mean the installer doesn’t complain about them anymore and I read in another thread that the newest Plex version don’t need them anymore. I don’t have them installed in this NUC 11.

@anon18523487 please help

@kevindd992002

The user-installed packages are no longer required.

PMS now includes the Intel Compute Runtime libraries it needs

You can confirm by looking in the “Drivers” directory under “Plex Media Server”

@ChuckPa

Yeah, that’s what I thought:

Any ideas why hw transcoding is not working then?

Ensure DEBUG logging is on.
Make certain you aren’t trying to play something with subtitles in it.
Attempt the playback in the browser (Plex/web).
Stop playback
Download the logs.

Attach here. I’ll look at what it printed

I wasn’t sure if you wanted the debug logs for the PMS or the plex web client but here’s both. I played Black Adam for about 40 seconds before I stopped the playback.

Client logs
Plex Media Server.zip (184.6 KB)

Thanks for the logs.

Your server logs (sorry for not being specific) show you’re getting HW transcoding

Feb 01, 2023 14:02:36.301 [0x7fdf3a7d5b38] DEBUG - [Req#3c3/Transcode] [FFMPEG] - Direct mapping possible.
Feb 01, 2023 14:02:36.301 [0x7fdf3a7d5b38] DEBUG - [Req#3c3/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Feb 01, 2023 14:02:36.301 [0x7fdf3a7d5b38] DEBUG - [Req#3c3/Transcode/JobRunner] Job running: EAE_ROOT=/tmp/pms-f7ed3182-6518-4746-a7eb-0180ff7837ff/EasyAudioEncoder FFMPEG_EXTERNAL_LIBS='/home/plex/Library/Application\ Support/Plex\ Media\ Server/Codecs/acf6c67-4446-linux-x86_64/' LIBVA_DRIVERS_PATH=/usr/lib/plexmediaserver/lib/dri OCL_ICD_VENDORS="/home/plex/Library/Application Support/Plex Media Server/Cache/CL-ICDs" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxx4357-8e93-cf70064a195c cl_cache_dir="/home/plex/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 truehd_eae -eae_prefix:1 5c7vkrng5ezplutf1pxtat5q_ -analyzeduration 20000000 -probesize 20000000 -i "/mnt/data/media/movies/Black Adam (2022) {imdb-tt6443346}/Black Adam (2022) {imdb-tt6443346} [Remux-2160p][DV HDR10][TrueHD Atmos 7.1][HEVC]-playBD.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]" -codec:0 h264_vaapi -b:0 20000k -r:0 23.975999999999999 -force_key_frames:0 "expr:gte(t,n_forced*3)" -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 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 1 -time_delta 0.0625 -manifest_name "http://127.0.0.1:32400/video/:/transcode/session/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd/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/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd/progress

but it can’t get to the openCL for tone mapping.

Feb 01, 2023 14:02:36.718 [0x7fdf3d751b38] DEBUG - [Req#3f4] [Now] Adding 1 sessions.
Feb 01, 2023 14:02:36.720 [0x7fdf3fff6b38] DEBUG - Completed: [192.168.20.210:60157] 200 GET /status/sessions (10 live) TLS GZIP 1ms 4975 bytes (pipelined: 18)
Feb 01, 2023 14:02:36.778 [0x7fdf3a7d5b38] ERROR - [Req#3eb/Transcode/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd] [AVHWDeviceContext @ 0x7fbf48081740] Failed to get number of OpenCL platforms: -1001.
Feb 01, 2023 14:02:36.779 [0x7fdf3c90eb38] ERROR - [Req#3f7/Transcode/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd] [AVHWDeviceContext @ 0x7fbf48081740] Failed to get number of OpenCL platforms: -1001.
Feb 01, 2023 14:02:36.779 [0x7fdf3d751b38] ERROR - [Req#3f8/Transcode/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd] [Parsed_hwmap_2 @ 0x7fbf4ed15040] Failed to created derived device context: -19.
Feb 01, 2023 14:02:36.779 [0x7fdf3a7d5b38] ERROR - [Req#3f9/Transcode/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd] [Parsed_hwmap_2 @ 0x7fbf4ed15040] Failed to configure output pad on Parsed_hwmap_2
Feb 01, 2023 14:02:36.780 [0x7fdf3c90eb38] ERROR - [Req#3fa/Transcode/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd] Error reinitializing filters!
Feb 01, 2023 14:02:36.780 [0x7fdf3d751b38] ERROR - [Req#3fb/Transcode/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd] Failed to inject frame into filter network: No such device
Feb 01, 2023 14:02:36.780 [0x7fdf3a7d5b38] ERROR - [Req#3fc/Transcode/5c7vkrng5ezplutf1pxtat5q/97df1446-3838-4cb4-91b3-40c7e62f2dcd] Error while processing the decoded data for stream #0:0
Feb 01, 2023 14:02:36.793 [0x7fdf401f9b38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 35019 is 1 (failure)
Feb 01, 2023 14:02:36.793 [0x7fdf3ea48b38] DEBUG - Streaming Resource: Changing client to use software decoding

Basic questions:

  1. If you turn off tone mapping, will it HW transcode?
  2. If so, do you have the onboard GPU disabled ?

No worries.

  1. Turning off tone mapping did fix the HW transcode issue, yes.
  2. No, I have it enabled. If I have it disabled, HW transcode with tone mapping turned off won’t work, will it?

#2 reminded me that a headless server should have a dummy HDMI device plugged into it to avoid any GPU issues like this. So I thought that was the issue. I plugged in a real monitor (just to test), restarted the server, and it still didn’t HW transcode if I have tone mapping turned on.

You can have the GPU disabled (no display) but still see the QSV ASIC

You have:

  1. QSV works
  2. GPU OpenCL fails - No GPU to run OpenCL on.

Ok, so what is wrong with the system then? With my NUC 10 PMS, HW transcoding with tone mapping works whether there is a display plugged in the HDMI port or not. With this new NUC 11 PMS, it doesn’t work for both scenarios.

@kevindd992002

Install PMS 1.29.2.6364 and retest

Can I install this lower version on top of the existing latest version without any detrimental effects?

Yes. you can

Same thing:

image

@ChuckPa you have any other ideas by any chance?

@ChuckPa just wanted to remind you again on this. Do you need more troubleshooting from my side?

Look at your transcoder temp.

 /dev/shm/transcoding

Do you have that created by shell script at each startup?

You should be setting (if you have enough ram) /dev/shm.

PMS will create what’s needed below that.

Also recommend, CUDA 11.x drivers (470 → 515.86.01) for PMS 1.29.2

PS: been sick here and took weekend off.

No, I don’t but I use the same /dev/shm/transcoding path on my NUC 10 and Plex always just create the folder for me on the fly. Is this a significant issue that I should just use /dev/shm instead?

How do I make sure that the CUDA drivers I have are of that version? And why do you recommend the older 1.29.2 instead of the newer 1.30.x versions?

No worries, hopefully you’re better now.