Plex Media Server on Ubuntu 21.10 with Intel 12th Gen (Alder Lake)

After days of messing around with a new build to replace my very old Plex server, I almost got everything working. I wrote up what I did that worked here:

https://tomthegreat.com/blog/setting-up-ubuntu-20-04-lts-for-plex-with-intel-gen-12-cpu/

I tried lots of variations of Ubuntu versions, kernel versions, hacks, etc, and what I ended up with was the easiest to get everything working. Well mostly. Everything works except for 4K HEVC transcoding with HDR Tone Mapping enabled. Turning that off allows 4K to transcode in hardware.

I found this one the forums related to this.

https://forums.plex.tv/t/4k-hdr-hardware-transcode/765846/38

I am using the latest Intel Compute packages, so I am going to try to downgrade those to the 21.49.21786 and try that.

4 Likes

I tried downgrading the Intel Compute packages to the 21.49.21786 version, and hardware transcoding is still non-functional when HDR Tone Mapping is enabled.

@ChuckPa or anyone else have any suggestions or anything you would like me to try?

May I see the debug logs please which capture the start of playback?

There are known problems with Ubuntu 21.x just because it’s Ubuntu 21 (problems also existed with Ubuntu 19 and Ubuntu 17 just because it’s the odd year where they add , and break, lots of stuff)

Plex Media Server Logs_2022-01-02_21-06-43.zip (8.8 MB)

Logs attached. I played the first 30 seconds of the content. Roughly around 21:06 or about in the timestamp. Maybe a few minutes earlier.

Thanks for the logs.

From what I see, It’s a case of what’s happening with the Intel Compute Runtime Libraries

The current version of the libraries from Intel break Plex . These are the libraries which add support for Adler Lake (Released in Nov 4th).

I will confirm with Engineering when they’re back in the office

1 Like

Thank you for checking this issue with engineering.

While you research this issue, could you also to try to give us an preliminary timeframe on how long it would take the Plex team to fix this issue (add 4K HEVC HDR tonemapping support for Alder Lake CPUs, the Intel iGPU 7XX series)?

It’s impossible to give a timeframe.

The CPU was released only 2 months ago then came the holidays and we don’t know if upstream ICR is stable yet.

All we do know is upstream broke what exists so that has to be fixed first.

Riding the bleeding edge is going to be painful.

Quick update. I tried with Intel Compute Runtime 22.01.22131 released on 1/10/2022. Same issue. No 4K hardware transcoding when HDR tone mapping is enabled.

1 Like

Intel Compute Runtime 22.10.22597 still does not work with HDR mapping

I have asked Engineering for some info.

1 Like

Any news?

To all following here.

The root cause of the failures for all versions above 20.04/ ICR 21.49 has been identified.

In a nutshell, Intel changed the ICR API after 21.49 release.

If you compare their changes on github, you can clearly see where several function’s call args were changed.

They further changed from using “Version 11” of the API to “Version 12” after the 21.49 release. ICR was new to all of us for these new processors and it was already “version 11” ?

I don’t know the current status (I prefer not to interrupt if avoidable).

The only thing I am certain of is the team is now deep in figuring out how to resolve.
There are some questions to answer:

  1. Maintain 20.04/21.49 compatibility and ICR’s latest? (don’t think this is viable)
  2. Upgrade PMS to API v12 and have everyone update their ICR version to current (think this is better)?
  3. In light of the bugs in ICR, which is best for all processors ?
7 Likes

Thanks for the update and the insights.

@ChuckPa thank you for the update. This related issue seems to be plaguing the Plex via unraid community as well. The unraid team has stated that if you guys find a solution that requires some changes on their side, they are happy to take a look. Thanks for your input.

The current beta release of PMS 1.26.1, in conjunction with ICR 21.49.21786, should be working for you just fine.

Engineering was able to complete their work in time for 1.26.1 release.

There is a minor change in the DEB file coming (my work was lagging just a bit) which clarifies which ICR packages to install. (with download link)

This has been tested on Ubuntu 22.04 with a Beast Canyon NUC and works

Tested the beta also on Alder Lake i5-12500 with Kernel 5.16.20 on Fedora and linuxserver.io-included ICR 21.49.21786, but still crashing after several minutes.

There is also some interesting going on at Intel Github: ffmpeg HW acceleration crashes GPU on ADL · Issue #1342 · intel/media-driver · GitHub

It seems that there were similar crashes observed, maybe related to this issue here?

@cryptoluks

My take on that is crashing due to GPU hang. (which is a known issue)

– I could be wrong on this so will apologize now if my info is dated or incorrect –

IIRC, 5.17 / 5.18 kernels will have that support worked out.

AFAIK, AlderLake support in ICR with 5.16 kernel isn’t complete – waiting for the upstream kernel changes which is that 5.17/5.18 target discussed for Ubuntu

By

Engineering was able to complete their work in time for 1.26.1 release.

do you mean that newer versions of ICR should work now with the 1.26.1 and later releases?

If so I am happy to test it out. I just updated from 21.10 to 22.04 and migrated to kernel 5.17.5 which is the latest stable release that should have Alder Lake support now.

There have been some random crashes after migrating to 22.04, but that was with 5.15.0 kernel, so I am going to test more with 5.17.5.

-TS

One of the Ninjas was able to test 1.26.1 on fresh installation of Ubuntu 22.04, using ICR 21.49.21786, on a Beast Canyon.

HW transcoding and tone mapping worked correctly.

This is the work I am referring to. Previously, no Ubuntu versions above 20.04 worked correctly.

IIRC, that ninja is anxiously awaiting delivery of a Dragon Canyon NUC (12). I’m envious. :smiling_imp:

Yeah, but isn’t the current PMS version also working for ICR 21.49 (old version)? If so, what difference does PMS 1.26.1 offer in terms of API upgrades to be compatible with the latest ICR?