Sorry, the DEBUG logging didn’t show.
Did you click SAVE at the bottom ? ![]()
@ChuckPa I think so?..
Please check these.
Plex Media Server Logs_2022-08-08_19-55-09.zip (380.2 KB)
In any case, was there any extra step I should have taken? Should I have installed additional packages or different versions of those? Do I need to force some CPU/GPU features?
Hardware transcoding is working .
Please see here. This is H264
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] [FFMPEG] - Format 0x50343434 -> yuv444p.
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] [FFMPEG] - Format 0x33434d49 -> unknown.
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] [FFMPEG] - Format 0x30313050 -> p010le.
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] [FFMPEG] - Format 0x30313259 -> y210le.
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] [FFMPEG] - Format 0x30313459 -> unknown.
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] [FFMPEG] - Created surface 0.
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] [FFMPEG] - Direct mapping possible.
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Aug 08, 2022 19:54:37.660 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/d53cb63-4339-linux-x86_64/' LIBVA_DRIVERS_PATH=/usr/lib/plexmediaserver/lib/dri X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 h264 -hwaccel:0 vaapi -hwaccel_fallback_threshold:0 10 -hwaccel_output_format:0 vaapi -hwaccel_device:0 vaapi -codec:1 dca -ss 860 -analyzeduration 20000000 -probesize 20000000 -i "/media/rafael/MediaStorage/Movies/Perfect Blue (1997)/Perfect.Blue.1997.BluRay.1080p.DTS-HD.MA.5.1.AVC.REMUX-FraMeSToR.mkv" -filter_complex "[0:0]hwupload[0];[0]scale_vaapi=w=1920:h=1080:format=nv12[1];[1]hwupload[2]" -map "[2]" -codec:0 h264_vaapi -b:0 13682k -maxrate:0 18243k -bufsize:0 36486k -r:0 23.975999999999999 -filter_complex "[0:1] aresample=async=1:ocl='5.1':rematrix_maxval=0.000000dB:osr=48000[3]" -map "[3]" -metadata:s:1 language=jpn -codec:1 libopus -b:1 687k -f segment -segment_format matroska -segment_format_options live=1 -segment_time 1 -segment_header_filename header -segment_start_number 0 -segment_list "http://127.0.0.1:32400/video/:/transcode/session/kqcr1wyzgi01ioggb4twr726/0ab17390-6ea7-4fad-9dea-ed1d759d9474/manifest?X-Plex-Http-Pipeline=infinite" -segment_list_type csv -segment_list_unfinished 1 -segment_list_size 5 -segment_list_separate_stream_times 1 -avoid_negative_ts disabled -map_metadata:g -1 -map_metadata:c -1 -map_chapters -1 "chunk-%05d" -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/kqcr1wyzgi01ioggb4twr726/0ab17390-6ea7-4fad-9dea-ed1d759d9474/progress
Aug 08, 2022 19:54:37.661 [0x7fb28c8e6b38] DEBUG - [Req#a0/Transcode/JobRunner] Jobs: Starting child process with pid 3889
Aug 08, 2022 19:54:37.663 [0x7fb28c87fb38] DEBUG - Request: [127.0.0.1:43998 (Loopback)] PUT /video/:/transcode/session/kqcr1wyzgi01ioggb4twr726/0ab17390-6ea7-4fad-9dea-ed1d759d9474/progress?status=startup (12 live) #29b Signed-in Token (Phaellow) (upsilon) (range: bytes=0-)
Aug 08, 2022 19:54:37.664 [0x7fb28bd0fb38] DEBUG - Completed: [127.0.0.1:43998] 204 PUT /video/:/transcode/session/kqcr1wyzgi01ioggb4twr726/0ab17390-6ea7-4fad-9dea-ed1d759d9474/progress?status=startup (12 live) 0ms 203 bytes (pipelined: 1) (range: bytes=0-)
Aug 08, 2022 19:54:37.667 [0x7fb28c87fb38] DEBUG - Request: [127.0.0.1:43998 (Loopback)] PUT /video/:/transcode/session/kqcr1wyzgi01ioggb4twr726/0ab17390-6ea7-4fad-9dea-ed1d759d9474/progress?status=startup (12 live) #303 Signed-in Token (Phaellow) (upsilon) (range: bytes=0-)
vaapi is the Video Acceleration API.
It can’t possibly be working. Circling back to the examples I previously used to show HW tone-mapping was not working, I can show you the output of integrated GPU and CPU usages:
intel-gpu-top - 0/ 0 MHz; 100% RC6; ----- (null); 0 irqs/s
IMC reads: ------ (null)/s
IMC writes: ------ (null)/s
ENGINE BUSY MI_SEMA MI_WAIT
Render/3D/0 0.00% | | 0% 0%
Blitter/0 0.00% | | 0% 0%
Video/0 0.00% | | 0% 0%
VideoEnhance/0 0.00% | | 0% 0%
Compare and contrast with the previous information I gave you when we were getting tone-mapping to work some months ago: 4K HDR → SDR transcode was 20% of CPU usage. There’s just no way I’m getting HW transcode with 100% usage on an h264 1080p file ![]()
That’s not in the logs you gave me. H.264 doesn’t tone map.
I did find a problem with 1.28.1 and reported it early on. 1.28. 1 is not yet updated with any fixes.
Last I know which works is 1.28.0 but 1.28.1 PACKAGING configures the ICR libraries correctly
@ChuckPa Sorry, the “previous” in my response refered to #46 on this thread, i.e. the previous issue we discussed some months ago, in which I had HW transcode working, but not HW tone mapping. I mean to show that before, when it was hardware trancoding, you could see activity on intel_gpu_top: Can Jasper Lake N6005 use hardware transcoding? - #46 by Phaellow. However, now I have absolutely no activity there.
The screenshots of the usage I sent now are of the transcode that you have shown in the logs.
I do have 1.28.0 installed:
![]()
So again, in short: I installed Ubuntu 20.04.4, ICR 21.49.21786 and PMS 1.28.0.5999 (and did nothing else). As is, I get no transcode acceleration whatsoever.
A few lines under the ones you have shown from the logs:
Aug 08, 2022 19:54:37.857 [0x7fb28c87fb38] ERROR - [Req#350] [Transcoder] [h264 @ 0x7f586c3f7940] mmco: unref short failure
Aug 08, 2022 19:54:37.909 [0x7fb28c87fb38] ERROR - [Req#363] [Transcoder] [h264_vaapi @ 0x7f586c4cedc0] Driver does not support any RC mode compatible with selected options (supported modes: CQP).
Aug 08, 2022 19:54:37.910 [0x7fb28c87fb38] ERROR - [Req#367] [Transcoder] Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Aug 08, 2022 19:54:37.930 [0x7fb28d0e0b38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 3889 is 1 (failure)
Aug 08, 2022 19:54:37.930 [0x7fb28bad6b38] DEBUG - Streaming Resource: Changing client to use software decoding
Which kernel version do you have installed ?
Type: modinfo i915 | grep guc and share the reported value please.
Intel tried to push everyone back to automatic mode (which doesn’t work well based on kernel)
Here’s the info you requested:
rafael@upsilon:~$ uname -a
Linux upsilon 5.15.0-43-generic #46~20.04.1-Ubuntu SMP Thu Jul 14 15:20:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
rafael@upsilon:~$ modinfo i915 | grep guc
firmware: i915/skl_guc_62.0.0.bin
firmware: i915/bxt_guc_62.0.0.bin
firmware: i915/kbl_guc_62.0.0.bin
firmware: i915/glk_guc_62.0.0.bin
firmware: i915/kbl_guc_62.0.0.bin
firmware: i915/kbl_guc_62.0.0.bin
firmware: i915/cml_guc_62.0.0.bin
firmware: i915/icl_guc_62.0.0.bin
firmware: i915/ehl_guc_62.0.0.bin
firmware: i915/ehl_guc_62.0.0.bin
firmware: i915/tgl_guc_62.0.0.bin
firmware: i915/tgl_guc_62.0.0.bin
firmware: i915/tgl_guc_62.0.0.bin
firmware: i915/adlp_guc_62.0.3.bin
parm: enable_guc:Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int)
parm: guc_log_level:GuC firmware logging level. Requires GuC to be loaded. (-1=auto [default], 0=disable, 1..4=enable with verbosity min..max) (int)
parm: guc_firmware_path:GuC firmware path to use instead of the default one (charp)
Thank you … That’s starting to make sense. It’s in “Auto” mode. That seems to be the problem.
This is an educated experiment. I don’t have a cometlake to test with.
We can set it manually.
options i915 enable_guc=3
Setting GuC to 3:
rafael@upsilon:~$ cat /etc/modprobe.d/i915.conf
options i915 enable_guc=3
rafael@upsilon:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.15.0-43-generic
rafael@upsilon:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-43-generic
Found initrd image: /boot/initrd.img-5.15.0-43-generic
Found linux image: /boot/vmlinuz-5.13.0-30-generic
Found initrd image: /boot/initrd.img-5.13.0-30-generic
Adding boot menu entry for UEFI Firmware Settings
done
Still the same, I’m afraid… 100% CPU usage, no reported iGPU usage.
Plex Media Server Logs_2022-08-08_21-32-29.zip (611.9 KB)
It fails the same way, but doesn’t complain about the driver anymore:
Aug 08, 2022 21:27:23.161 [0x7f387ecc4b38] ERROR - [Req#f3] [Transcoder] [h264 @ 0x7f389e001040] mmco: unref short failure
Aug 08, 2022 21:27:23.279 [0x7f387ec1cb38] DEBUG - [Req#fa/Transcode/rg2nxg0z16midda2pkcc95ce/20d9c7f4-dc14-44af-9c6a-d6a9268be260] Transcoder: session rg2nxg0z16midda2pkcc95ce indicated fallback to software decoding
I can tell you setting the GuC to 2 has the same behavior (even though this was what made it work a couple of months ago).
What I can also add is that something is definitely not right at the moment: opening the settings causes Xorg to crash, so something is very wrong at driver level. Should I be using intel-media-va-driver-non-free, insted of the normal variant that comes installed by default?
I just got our NUC10 updated and am testing now.
I’ll work through this and figure out where / how it’s breaking.
Thank you! I can see that you are also troubleshooting what appears to be the exact same issue in Ubuntu Intel N5105 QSC HW Transcoder not detected, with exact same architecture, as far as I can tell.
Let me know if you have any update or if there is anything I can do for you (like setting up remote access to the machine).
I’m using a CometLake i5
vendor_id : GenuineIntel
cpu family : 6
model : 142
model name : Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
Testing on the NUC10 (now that it’s updated)
PMS 1.28.0 (not 1.28.1 – which fails)
This is the LG UHD New York demo file.
Did it work for you?
I think the architecture for our processors is actually more similar to 11th Gen (since it actually includes 11th Gen GPU).
Intel is a mess. Both N5095 (mine) and N5105 (from the other guy’s thread) are from the former Jasper Lake architecture, now called Tremont together with a bunch of others.
Ice Lake, even though in the same “10th Gen” as your NUC, has 10nm lithography and 11th Gen GPU, unlike your Comet Lake (which has 14nm lithography and 9.5 (?) Gen GPU).
Do you have any Ice Lake NUC to test?
I agree Intel is all over the map
All the CPUs, going by SKU only, Up through the 9th gen (-9xxx) CPUs/QSV ASICs, you don’t need Intel Compute Runtime.
Beginning with all 10th Gen (-10xxx), you must use Intel Compute Runtime.
Until this breakage in the iHD driver, everything through 11th Gen (RocketLake and mobile processors) worked correctly.
Only AlderLake (-12xxx) has the issue. If that N6005 JasperLake is more AlderLake than what I read, now I understand.
That’s the puzzle. I know it works because users have reported it
Two things changed:
That’s what I’m sorting now.
I confirm:
If we can match up the QSV ASIC model numbers, we’ll have our answer.
I have this:
Processor Graphics ‡
Intel® UHD Graphics for 10th Gen Intel® Processors
Where I’m at right now is I have confirmed , 100% breakage when I upgrade from 1.28.0 → 1.28.1
As further test – Turn HDR Tone mapping OFF . See if HW transcoding works.
It should.
You are absolutely right: it’s the kernel. I just did a fresh install with 20.04.4 (offline) with 5.13, PMS 1.28.0 and enabled GuC (2). No funny Xorg business and, surprise surprise, hardware transcoding works. Tone mapping is a different thing, but I assume getting ICR setup with the right version will work.
This is insane, it’s a big regression. Do you know if the i915 driver changes were introduced in 5.14 or 5.15? In any case, I really feel like just keeping this kernel version, but I need to find a good way to achieve this…
From my experience, HW transcoding really is hit or miss given different kernel versions. I’ve now settled with Ubuntu 22.04 with 5.18.0 mainline kernel. 5.15.x kernels probably won’t work. More recent 5.18.x and 5.19.x kernels seem to break it again.
i have a nuc11atkc4 and I can’t get HW Transcoding to work at all let alone with tonemapping.
If I try “sudo echo “options i915 enable_guc=2” >> /etc/modprobe.d/i915.conf
update-initramfs -u” I get back “bash: /etc/modprobe.d/i915.conf: Permission denied”
I tried it with a fresh install of the current 22.04 Ubuntu (Desktop) and now I’m on 20.04 since I read that 22.04 was the problem but on both I’m stuck on the same spot.
Also if I navigate to the etc/modprobe.d folder I can’t find a file called i915.conf. Haven’t really played around with Linux in a while though so I don’t know whether thats normal or not. Any idea on how I should proceed?
edit: i fixed the permission denied problem by doing sudo -i first and then doing the echo command. It still didn’t help. Neither normal 1080p h264 nor 4k HEVC Main 10 gets hardware transcoded