Working Rocket Lake GPU with HDR the easy way both docker and bare metal!

Server Version#:1.23.2.4656

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.

Capture

The full steps of what i did:
Installed 21.04 from the vanilla ubuntu iso
apt update && apt upgrade -y
Install the intel compute runtime binaries: Release 21.22.19967 · intel/compute-runtime · GitHub

mkdir neo
cd neo

wget https://github.com/intel/compute-runtime/releases/download/21.22.19967/intel-gmmlib_21.1.3_amd64.deb
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.7423/intel-igc-core_1.0.7423_amd64.deb
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.7423/intel-igc-opencl_1.0.7423_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/21.22.19967/intel-opencl_21.22.19967_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/21.22.19967/intel-ocloc_21.22.19967_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/21.22.19967/intel-level-zero-gpu_1.1.19967_amd64.deb

dpkg -i *.deb

rebooted for good measure
download and install plex
wget https://downloads.plex.tv/plex-media-server-new/1.23.2.4656-85f0adf5b/debian/plexmediaserver_1.23.2.4656-85f0adf5b_amd64.deb
dpkg -i plexmediaserver_1.23.2.4656-85f0adf5b_amd64.deb

I’ll be testing the docker image next and will post an update with its status.

3 Likes

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)

4 Likes

Nice!

Well crap! Is not working for me! I’m going to cry now!

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?

Hi

Running Ubuntu server 20.04 LTS with Kernel 5.8.0.55 .

If i would like my Tigerlake to work with hw transcoding, what should I do then ? :slight_smile:

My server is crashing with hw transcoding enabled.

Thanks :slight_smile:

Whats your setup? I can share any or all of mine to see whats different.

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.

I’m running an i5-11400 and with a vanilla 21.04 install +the current neo runtimes ( Release 21.22.19967 · intel/compute-runtime (github.com) Thats all it took for the bare metal install to work.

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.

https://wiki.ubuntu.com/Kernel/OEMKernel

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.

This is what I got:

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):

Setting dangerous option enable_guc - tainting kernel
i915 0000:00:02.0: [drm] GuC firmware i915/tgl_guc_49.0.1.bin version 49.0 submission:disabled
i915 0000:00:02.0: [drm] HuC firmware i915/tgl_huc_7.5.0.bin version 7.5 authenticated:yes

For more info on GuC/HuC:
Firmware | 01.org
drm/i915 Intel GFX Driver — The Linux Kernel documentation

I don’t have any messages about GuC or HuC that i can find.

I have a few less packages installed for the intel and openCL stuff. This is also a headless box so i don’t have xorg installed either.

root@hermes:/var/log# 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
++±====================-===========================-============-===================================================
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™
ii intel-igc-opencl 1.0.7423 amd64 Intel(R) Graphics Compiler for OpenCL™
ii intel-level-zero-gpu 1.1.19967 amd64 Intel(R) Graphics Compute Runtime
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

Also here is the full output for my proc:

root@hermes:/var/log# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 167
model name : 11th Gen Intel(R) Core™ i5-11400 @ 2.60GHz
stepping : 1
microcode : 0x2c
cpu MHz : 2600.000
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 0
cpu cores : 6
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 27
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap avx512ifma clflushopt intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm md_clear flush_l1d arch_capabilities
vmx flags : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple pml ept_mode_based_exec tsc_scaling
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs
bogomips : 5184.00
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:

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

Hmmmmm, curious, you don’t have the intel-media-va-driver installed? How is that even working without the iHD driver?