I’ve been trying to get GPU support with HDR working for a couple days now and after trying multiple ways wanted to post the easy way if your running ubuntu since i didn’t find anything clearly posted in the forums.
Install 21.04, that’s it.
I’m a LST person in general but 21.04 running 5.11.0-18-generic (out of the box kernel) with the intel compute runtime packages installed has GPU offload with HDR working.
Initial tests with the plexinc/pms-docker container were unsuccessful. I was able to edit the dockerfile to reflect my bare metal install and now it’s working as expected.
I’m attaching my dockerfile that i used to build the image. you need to clone the plexinc/pms-docker repo and build the image with the attached dockerfile. Dockerfile.rocketlake.txt (2.6 KB)
I have i5 11600k running LTS 20.04 server, with OEM 5.10, with the latest intel compute runtime installed…and I’m still having “green artifacts” while transcoding (no matter what). Could you please tell me if that’s not happening anymore with your version?
I had the exact same behavior, just different locations for the green artifacts. I read someone posting about how kernel 5.11 is the minimum you need to get it to work. I tried to use 5.12 from the ubuntu kernel ppa but it didn’t play nice, i also found out they since they provide those ones for “testing” none of the os specific patches are included.
In order to get the docker container working i had to change the pms-docker file from their repo to match my 21.04 install. I changed the base image to be from 21.04, removed all references to beignet, updated the neo references to the latest version and added the additional neo packages that are not in the install. You can reference all of that from the file in my first post.
There wasn’t anything extra i had to do to make it work.
I couldn’t get 20.04 to work correctly. I’d rather be running on the LTS but I also want to be able to utilize the processor i just bought (i5-11400). If you can install 21.04, add the latest intel compute runtimes and the bare metal version should work. If you want the docker version to work do the same but also rebuild the docker image using my dockerfile from the first post.
This is the performance profile under load. I ran 5 transcodes from a 4k file (2160p 10bit HEVC HDR 65Mbps) to different bitrates ranging from 2-20Mbps (PC, Vizio Smartcast, Roku, Nvidia Shield and an Ipad as clients).
I can confirm installing linux-oem-20.04b (currently v5.10) in Ubuntu server 20.04 LTS will work, but the green artifacts around the screen will remains.
Yup, Thats the exact same behavior i had in with oem-20.04b. The 5.11 kernel seems to resolve the green artifacts, its also the default kernel installed with ubuntu 21.04. Once 5.11/12 are fully backported to ubuntu 20.04 i plan on redeploying everything back to the LTS but for now this is allowing everything to work. This is the last screenshot i have of them before trying 21.04. The hardware transcode was working and i could see it in intel_gpu_top but the output was corrupted.
jerry@mooncake:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.04
Release: 21.04
Codename: hirsute
jerry@mooncake:~$ cat /proc/cpuinfo | head
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 167
model name : 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz
stepping : 1
microcode : 0x3c
cpu MHz : 3900.000
cache size : 12288 KB
physical id : 0
jerry@mooncake:~$ uname -a
Linux mooncake 5.11.0-18-generic #19-Ubuntu SMP Fri May 7 14:22:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
jerry@mooncake:~$ dpkg -l '*intel*' '*opencl*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================================-===============================-============-====================================================================
un beignet-opencl-icd <none> <none> (no description available)
ii intel-gmmlib 21.1.3 amd64 Intel(R) Graphics Memory Management Library Package
ii intel-igc-core 1.0.7423 amd64 Intel(R) Graphics Compiler for OpenCL(TM)
ii intel-igc-opencl 1.0.7423 amd64 Intel(R) Graphics Compiler for OpenCL(TM)
ii intel-level-zero-gpu 1.1.19967 amd64 Intel(R) Graphics Compute Runtime
un intel-media-va-driver <none> <none> (no description available)
ii intel-media-va-driver-non-free:amd64 21.2.0+i557~u20.04 amd64 VAAPI driver for the Intel GEN8+ Graphics family
ii intel-microcode 3.20210216.0ubuntu0.21.04.1 amd64 Processor microcode firmware for Intel CPUs
ii intel-ocloc 21.22.19967 amd64 Intel(R) Graphics Compute Runtime
ii intel-opencl 21.22.19967 amd64 Intel(R) Graphics Compute Runtime
ii libdrm-intel1:amd64 2.4.105-1022 amd64 Userspace interface to intel-specific kernel DRM services -- runtime
un libopencl-1.1-1 <none> <none> (no description available)
un libopencl-1.2-1 <none> <none> (no description available)
un libopencl-2.0-1 <none> <none> (no description available)
un libopencl-2.1-1 <none> <none> (no description available)
un libopencl-2.2-1 <none> <none> (no description available)
un libopencl-3.0-1 <none> <none> (no description available)
un libopencl1 <none> <none> (no description available)
un nvidia-libopencl1-dev <none> <none> (no description available)
ii ocl-icd-libopencl1:amd64 2.2.14-2 amd64 Generic OpenCL ICD Loader
un opencl-icd <none> <none> (no description available)
ii xserver-xorg-video-intel 2:2.99.917+git20200714-1ubuntu1 amd64 X.Org X server -- Intel i8xx, i9xx display driver
Maybe this weekend I’ll format my drive and start fresh. I’ve been working on this problem for several months now, I had a i5-11600K on launch day! I have it working very well right now, EXCEPT, HW HDR transcode doesn’t work, it falls back to software HDR. Plex thinks it has HW, it works in all instances EXCEPT when it needs to do HDR tonemapping.
I’m on Tiger Lake UP3-class CPU (mobile), so a bit different that yours but still same Xe architecture, and got a question for you:
Is your GuC/HuC firmware loaded for low-power AVC/HEVC encoding?
It’s not enabled by default, even if Intel is still trying to enforce it.
You need kernel i915 enable_guc=2 option set.
In dmesg you will find lines like these if successfully enabled (won’t be tgl in your case):
Are you getting the green blocks or is it not working all together? Another thing i saw from your output are nvidia drivers, do you have 2 graphics cards in the box? Whats your /dev/dri directory contain? I know lots of questions but your setup is close to mine so i don’t see why it wouldn’t work.
I do not have nvidia drivers installed (‘un’ means uninstalled status), Yes I have a minimum GUI install because I run a RDP daemon on the box allowing me to do remote desktops from Windows. And yes, I have had this working with the corrupted video using an older version of the Plex server, but for some reason the newest version of the Plex server seg faults even though others have reported it works! See my post here: https://forums.plex.tv/t/4k-hdr-hevc-hw-transcoding-is-broken-on-i5-11600k-rocket-lake/707057/10