Alder Lake hw transcoding causing server to crash

Server Version#: 1.25.4.5487
Player Version#: 1.40.1.2823-6f60f3a7

I recently upgraded to an i5-12600k for QuickSync hw transcoding. However, if I turn on hw acceleration (with or without decoding) my server will inevitably crash at some point after it starts transcoding videos. Everything seems fine until the crash eventually happens. The last two lines of the server log are always as follows:

Feb 01, 2022 14:56:57.227 [0x7f87e065bb38] DEBUG - [Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi
Feb 01, 2022 14:56:57.228 [0x7f87e065bb38] DEBUG - [Transcode] Codecs: hardware transcoding: testing API vaapi

Is this a known issue? I’m having real trouble diagnosing this.

Alder Lake CPUs are bleeding edge in both the kernel and Intel Compute Runtime (which is the HW transcoding driver from Intel).

There have been many problems with breakage for all the Intel -10xxx and above with Intel’s latest releases.

My only recommendation is to try version 21.49 and see if that remedies the problem.
(download from the github Intel-Compute-Runtime project)

Thanks for the advice.

I installed 21.49 of the compute runtime but it won’t transcode using hw acceleration now. I think 21.49 doesn’t support Alder Lake at all.

I suppose I should just stick with sw encoding until Alder Lake is officially supported?

Might be best.

By watching the GitHub repo, you’ll know when to update your drivers.

What kernel version are you using? I am able to do hardware transcoding with my Alder Lake using the 5.13.0-28-generic kernel. I haven’t had a lot of luck using and of the newer kernels, but they are supposed to have better/more support for Alder Lake CPU’s.

Well, that’s interesting. What version of the Intel Compute Runtime are you using?

I’m currently using the 5.16.3-051603-generic kernel. I wonder if I should try downgrading.

I am using 5.13.0.28-generic.

AlderLake CPUs need the latest & greatest ICR libraries. (if it works – which Intel is still working on)

This is contrary to the needs for everyone else who need 21.49 until Intel can pull all the changes together into a single working library release

Team; I’ve been playing a little further on this. I’m currently running later kernel (5.16.9-051609-generic). Seems to load Alder Lake graphics fine.

I’ve installed 21.49.

HW Transcoding works fine - except for HDR tonemapping. When I turn that on, I get a segfault from the transcoder:

[Mon Feb 21 10:16:53 2022] Plex Transcoder[1854807]: segfault at 0 ip 00007fa1eb7ef81b sp 00007ffcdc30af50 error 4 in libstdc++.so.6.0.29[7fa1eb7db000+103000]
[Mon Feb 21 10:16:53 2022] Code: 10 00 00 00 5d e9 85 36 ff ff 0f 1f 44 00 00 f3 0f 1e fa 0f b6 07 84 c0 75 4d 55 53 48 89 fb 48 83 ec 08 48 8b 05 bd 41 16 00 <80> 38 00 75 20 31 c0 ba 00 01 00 00 f0 0f b1 17 75 2e 48 83 c4 08

Running PMS: 1.25.6.5545-c8bd13540

Any troubleshooting I can help with?

i have an alder lake as well and so far not many problem it’s pretty stable
don’t use rod for now because that will break hw
share your full specs please

What specs are you looking for?

yours to see if i can help u make pms stable cause mine is

Hi all,

This is not directly related to plex, but should help. I was having similar transcoding problems with ffmpeg raw ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i /tmp/sample.mkv -c:v:0 hevc_vaapi /tmp/sample-out.mkv - the latest build of jellyfin-ffmpeg fixed this issue for me /usr/lib/jellyfin-ffmpeg/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i /tmp/sample.mkv -c:v:0 hevc_vaapi /tmp/sample-out.mkv .

Specifically related to this patch: Add fixes for corrupted hevc-vaapi on TGL by nyanmisaka · Pull Request #104 · jellyfin/jellyfin-ffmpeg · GitHub

I would suggest this could be used for transcoding within plex as well…

I have forwarded to Engineering but be advised, at this time, Plex does not encode to HEVC output.

Hi @chuckpa, good callout - the patch did seem to fix other hardware encoding issues for me on Alder Lake, so may be helpful in general.

Are we making progress on TGL/AL in general?

Thanks

I’m not sure of their progress. I’ve been busy elsewhere

If I may ask, what did it fix?

Sorry - v silly of me. The default ffmpeg transcode using vaapi to hevc would produce total garbage - nothing viewable, I’ll try to go back and get a screenshot.

The parched ffmpeg produced proper output.

It wasn’t dissimilar to some of the issues I’ve seen on Plex transcoding on alder lake, so I thought it might have a similar root cause.