[SOLVED] Plex doesnt do HW transcoding on Ubuntu 18.04 with i9-9900 (tone mapping related)

Got the solution.

So for anyone who attempts to get hw transcoding with tone mapping working on Ubuntu 18.04 with Intel CPUs from 9000 series and newer:

Install these:

Then build this library (you only need to go point 6 to point 8 since 18.04 has already a newer kernel):

Then you need to build and update the beignet drivers:

Go to a Directory where you want to build drivers like /home/%USERNAME%/Downloads

sudo apt -y install cmake pkg-config python ocl-icd-dev libegl1-mesa-dev ocl-icd-opencl-dev libdrm-dev libxfixes-dev libxext-dev llvm-7-dev clang-7 libclang-7-dev libtinfo-dev libedit-dev zlib1g-dev build-essential git clinfo

git clone --branch comet-lake https://github.com/rcombs/beignet.git

cd beignet

mkdir build

cd build

cmake -DLLVM_INSTALL_DIR=/usr/lib/llvm-7/bin ..

make -j8

sudo make install

sudo service plexmediaserver restart

Finally you can execute this command

sudo clinfo -l

It should show some output similar to this:

beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
Platform #0: Intel(R) OpenCL HD Graphics
 `-- Device #0: Intel(R) UHD Graphics 630 [0x3e98]
Platform #1: Intel Gen OCL Driver
 `-- Device #0: Intel(R) UHD Graphics Coffee Lake Desktop GT2
Platform #2: Intel Gen OCL Driver

This is what you want to see:

Platform #0: Intel(R) OpenCL HD Graphics
 `-- Device #0: Intel(R) UHD Graphics 630 [0x3e98]
Platform #1: Intel Gen OCL Driver
 `-- Device #0: Intel(R) UHD Graphics Coffee Lake Desktop GT2
Platform #2: Intel Gen OCL Driver

Then HEVC HDR10 bit HW Transcoding with tone mapping should work.

CPU utilization with a H.265 65mbit 4k/HDR Video Stream is around 9% from plex with 6 threads for transcoding on a i9-9900k

2 Likes