tros
May 12, 2024, 3:17pm
1
Running into a new issue when transcoding on an 11th Gen Intel 11500. Running linuxserver Plex as a docker container on Unraid.
It seems to affect most applications, not just Plex, but figured someone may have some ideas.
When transcoding (HDR tone map/HW accel/HW accel encoding enabled), iGPU usage goes to 100%, and CPU spikes up. Playback is not possible as transcode speed is limited to 0.1-0.6.
Files that previously ran with +4 4k HDR/audio transcodes can now not even run a single one with direct stream audio.
Have tried running Plex 1.29/1.31.3 (current)/1.40, all displaying the same issue. Plex 1.29 used to work perfectly on previous Unraid versions, but not entirely sure what update broke it - possibly kernel related?
Other transcode applications are showing identical behaviour, with the exception of Tdarr.
Any ideas?
May we have the server debug logs ZIP file which captures the start of a problematic playback?
This will tell us a lot of what’s happening.
tros
May 12, 2024, 5:14pm
3
Here you go.
Started with Direct Stream and then forced a video transcode.
thanks.
Unraid 6.1 kernel – which has had a problem for some time. For others, kernels up to 6.5 work ok.
The iGPU is not being detected in all cases (tonemapping fails intermittently)
May 12, 2024 19:08:22.281 [0x148e7948cb38] DEBUG - [Req#ed/Transcode/Req#ee] Audio Stream: 32703, Subtitle Stream: 0
May 12, 2024 19:08:22.284 [0x148e7948cb38] DEBUG - [Req#ed/Transcode] Found session GUID of 1k5rgsz8fw3vmt6djgbj9nqk in session start.
May 12, 2024 19:08:22.284 [0x148e7948cb38] DEBUG - [Req#ed/Transcode] Cleaning directory for session 1k5rgsz8fw3vmt6djgbj9nqk ()
May 12, 2024 19:08:22.284 [0x148e7948cb38] DEBUG - [Req#ed/Transcode] Starting a transcode session 1k5rgsz8fw3vmt6djgbj9nqk at offset -1.0 (state=3)
May 12, 2024 19:08:22.286 [0x148e78f94b38] DEBUG - Request: [192.168.123.126:54743 (Subnet)] OPTIONS /photo/:/transcode?width=360&height=195&minSize=1&upscale=1&url=%2Flibrary%2Fparts%2F8007%2Findexes%2Fsd%2F6781000%3FX-Plex-Token%3Dxxxxxxxxxxxxxxxxxxxx (10 live) #a4 TLS GZIP Signed-in Token ()
May 12, 2024 19:08:22.286 [0x148e7f1f3b38] DEBUG - Completed: [192.168.123.126:54743] 200 OPTIONS /photo/:/transcode?width=360&height=195&minSize=1&upscale=1&url=%2Flibrary%2Fparts%2F8007%2Findexes%2Fsd%2F6781000%3FX-Plex-Token%3Dxxxxxxxxxxxxxxxxxxxx (10 live) #a4 TLS GZIP 0ms 376 bytes (pipelined: 9)
May 12, 2024 19:08:22.287 [0x148e7948cb38] DEBUG - [Req#ed/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
May 12, 2024 19:08:22.287 [0x148e7948cb38] DEBUG - [Req#ed/Transcode] [Universal] Using local file path instead of URL: /movies/The Adventures of Baron Munchausen (1988)/The Adventures of Baron Munchausen (1988) Criterion (2160p BluRay x265 HEVC 10bit HDR AAC 5.1 Tigole) [QxR].mkv
May 12, 2024 19:08:22.287 [0x148e7948cb38] DEBUG - [Req#ed/Transcode] TPU: hardware transcoding: final decoder: , final encoder:
May 12, 2024 19:08:22.287 [0x148e7ed7fb38] DEBUG - Request: [192.168.123.126:54743 (Subnet)] GET /photo/:/transcode?width=360&height=195&minSize=1&upscale=1&url=%2Flibrary%2Fparts%2F8007%2Findexes%2Fsd%2F6781000%3FX-Plex-Token%3Dxxxxxxxxxxxxxxxxxxxx (10 live) #f0 TLS GZIP Signed-in Token (turkanr) (Microsoft Edge)
May 12, 2024 19:08:22.287 [0x148e7ed7fb38] DEBUG - [Req#f0] Photo transcoder: Request for url [/library/parts/8007/indexes/sd/6781000?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx] (is local: 1 upscaled: 1)
May 12, 2024 19:08:22.289 [0x148e7948cb38] DEBUG - [Req#ed/Transcode/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/2584b51-4483-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxx41d6-a3b0-138cebf3ff1a "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 hevc -noaccurate_seek -analyzeduration 20000000 -probesize 20000000 -i "/movies/The Adventures of Baron Munchausen (1988)/The Adventures of Baron Munchausen (1988) Criterion (2160p BluRay x265 HEVC 10bit HDR AAC 5.1 Tigole) [QxR].mkv" -map 0:0 -codec:0 copy -map 0:2 -metadata:s:1 language=eng -codec:1 copy -f dash -seg_duration 5 -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/1k5rgsz8fw3vmt6djgbj9nqk/39440426-e060-43b0-89e5-85083e297e8c/manifest?X-Plex-Http-Pipeline=infinite" -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/1k5rgsz8fw3vmt6djgbj9nqk/39440426-e060-43b0-89e5-85083e297e8c/progress
May 12, 2024 19:08:22.289 [0x148e7948cb38] DEBUG - [Req#ed/Transcode/JobRunner] In directory: "/config/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-1k5rgsz8fw3vmt6djgbj9nqk-39440426-e060-43b0-89e5-85083e297e8c"
–versus–
May 12, 2024 19:08:26.109 [0x148e787adb38] DEBUG - [Req#1c3/Transcode] [FFMPEG] - Created surface 0.
May 12, 2024 19:08:26.109 [0x148e787adb38] DEBUG - [Req#1c3/Transcode] [FFMPEG] - Direct mapping possible.
May 12, 2024 19:08:26.126 [0x148e787adb38] DEBUG - [Req#1c3/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
May 12, 2024 19:08:26.129 [0x148e787adb38] DEBUG - [Req#1c3/Transcode/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/2584b51-4483-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=xxxxxxxxxxxxxxxxxxxx41d6-a3b0-138cebf3ff1a 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 -analyzeduration 20000000 -probesize 20000000 -i "/movies/The Adventures of Baron Munchausen (1988)/The Adventures of Baron Munchausen (1988) Criterion (2160p BluRay x265 HEVC 10bit HDR AAC 5.1 Tigole) [QxR].mkv" -filter_complex "[0:0]hwupload[0];[0]scale_vaapi=w=1920:h=1038: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 7020k -maxrate:0 9360k -bufsize:0 18720k -r:0 23.975999999999999 -force_key_frames:0 "expr:gte(t,n_forced*1)" -map 0:2 -metadata:s:1 language=eng -codec:1 copy -copypriorss:1 0 -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/yn6tl2m8ook7cpqvtvcajvu8/90bb97b1-1719-4566-9add-8e28cbbe3810/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/yn6tl2m8ook7cpqvtvcajvu8/90bb97b1-1719-4566-9add-8e28cbbe3810/progress
May 12, 2024 19:08:26.129 [0x148e787adb38] DEBUG - [Req#1c3/Transcode/JobRunner] In directory: "/config/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-yn6tl2m8ook7cpqvtvcajvu8-90bb97b1-1719-4566-9add-8e28cbbe3810"
May 12, 2024 19:08:26.130 [0x148e787adb38] DEBUG - [Req#1c3/Transcode/JobRunner] Jobs: Starting child process with pid 425
May 12, 2024 19:08:26.136 [0x148e7948cb38] DEBUG - Request: [127.0.0.1:57560 (Loopback)] PUT /video/:/transcode/session/yn6tl2m8ook7cpqvtvcajvu8/90bb97b1-1719-4566-9add-8e28cbbe3810/progress?status=startup (7 live) #1b7 Signed-in Token (turkanr) (range: bytes=0-)
May 12, 2024 19:08:26.137 [0x148e7f1f3b38] DEBUG - Completed: [127.0.0.1:57560] 204 PUT /video/:/transcode/session/yn6tl2m8ook7cpqvtvcajvu8/90bb97b1-1719-4566-9add-8e28cbbe3810/progress?status=startup (7 live) #1b7 0ms 203 bytes (pipelined: 1) (range: bytes=0-)
May 12, 2024 19:08:26.149 [0x148e79a95b38] DEBUG - [Req#1b2/Transcode] Whacked session 1k5rgsz8fw3vmt6djgbj9nqk, 0 remaining.
We are doing major work on the transcoder now because the new 6.8 Linux kernel breaks for everyone.
If you turn off Tonemapping, does it HW transcode OK (or transcode 1080p ok)?
tros
May 12, 2024, 5:48pm
5
Thank you for clarifying. Tested with Unraid v6.12.6 (kernel 6.1.64) and v6.12.10 (kernel 6.1.79).
Identical result with HDR tone mapping turned off :
Files with 1080p base to 720p work as expected:
I have both GeminiLake (UGH) and JasperLake machines with Unraid development licenses. They behave the same as you demonstrate now.
tros
May 12, 2024, 10:48pm
7
Downgraded to Unraid v6.11.5 (kernel 5.19.17). PMS 1.31.3.
HDR transcode works for a single stream, although transcoding sporadically locks up.
But impossible to have more than one transcode going. On PMS 1.31.3, tried 1.32.8 as well.
What am I missing here? What versions are you able to run without issues?
I used to run older Unraid/PMS (probably 1.28) that did not display this issue. May have to roll back even further.
Added logs.
Plex Media Server Logs_2024-05-13_00-30-11.zip (2.0 MB)
Doesn’t help resolve your issue but for info I’m running unRAID 6.12.10 (Kernel 6.1.79) with official PMS Docker 1.40.2.8395, and transcoding 4K DoVi/HDR 10 to 1080P H264 is working fine.
Running an old Intel i7 7700 (Kaby Lake)
The root of the problem with the Intel iGPU machines is:
As of TigerLake, Intel changed the architecture for HW transcoding in the chip
Intel Compute Runtime was created to provide a common software interface for us (newer vs older)
Plex’s original tone mapping was done in HW using OpenCL
Intel doesn’t support (or allow or has a bug) OpenCL with the new kernels.
We are working through that now.
– Older CPUs are fine (They can use the ‘i965’ VAAPI driver and direct to OpenCL.
– Newer CPUs don’t have that option.
– Trying to find out if/when Intel is going to update their ICR for 6.8 kernel.
tros
May 14, 2024, 5:46pm
10
Tried a bunch of Unraid versions and kernel combinations. The only thing that semi-worked on 6.12.5 was upgrading to 6.12.5 from an older 6.11.5 backup and using the latest PMS.
Semi-worked meaning one tonemapped 4k stream without buffering,
Any other combination or fresh install of Unraid (6.11.5, 6.12.4/5, 6.12.5) and kernel (5.19, 6.1, 6.2, 6.5) did not work.
Leaving it on the latest versions and hope it gets fixed in the near future. Will also give try passthrough on Ubuntu and see what how that ends up doing.
Thank you for the assistance.
system
Closed
August 12, 2024, 5:46pm
11
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.