Jump to content

***GUIDE*** Plex Hardware Acceleration using Intel Quick Sync


Recommended Posts

Posted
34 minutes ago, niietzshe said:

Thanks for this.

I'd upgraded my CPU to a supported chip, was going to spend money on a full build just to get an extra pci slot of graphics card, so this has saved me a lot of bother and money.

C

I actually purchased this CoffeeLake refresh CPU 2 years ago for the same reasons... So I'm happy if it helped you as well...   

I mean, wether I have much respect for AMD and Nvidia for CPU and GPU, at the end of the day Intel with integrated HW GPU remains the most effective solution in terms of heat/noise/performance/price ratio, for a family/friends shared Unraid/Plex NAS.

I tried many other options like FreeNAS, OMV, Win10, WinSBS2kxx, at the end of the day, nothing competes against Unraid, I believe.

And the main difference is the community, by far !!! 😎 👍👍

 

Posted

Just followed this guide and added device /dev/dri to plexpass container.  After hitting apply the container restarts but now Plex is in a continuous loop with these messages. 

 

Starting Plex Media Server.
s6-applyuidgid: fatal: unable to exec /usr/lib/plexmediaserver/Plex Media Server: No such file or directory
Stopping Plex Media Server.

 

Tried removing the device and reapplying but still the same loop

Any ideas, would really hate to have to build this all over again after multiple years of use.

Posted

Just followed this guide and added device /dev/dri to plexpass container.  After hitting apply the container restarts but now Plex is in a continuous loop with these messages. 

 

Starting Plex Media Server.
s6-applyuidgid: fatal: unable to exec /usr/lib/plexmediaserver/Plex Media Server: No such file or directory
Stopping Plex Media Server.

 

Tried removing the device and reapplying but still the same loop

Any ideas, would really hate to have to build this all over again after multiple years of use.

 

 

Solved it.  Not sure why though.  I am on 6.9.0 beta 35 fyi... It was the chmod -R 777 /dev/dri in the /boot/config/go file that it didn't like.  Must need the permissions to be set differently???  But after removing that and rebooting unraid it is now running ok.

Posted
8 minutes ago, thedman said:

Solved it.  Not sure why though.  I am on 6.9.0 beta 35 fyi... It was the chmod -R 777 /dev/dri in the /boot/config/go file that it didn't like.  Must need the permissions to be set differently???  But after removing that and rebooting unraid it is now running ok

With new 6.9.0, it seems chmod and go file modification is not required anymore, at least for me.

Just:

touch /boot/config/modprobe.d/i915.conf

As per mentioned here:

 

Posted

Hi There,

 

I just updated the User Script I made a few days ago to enable intel HW GPU acceleration on Intel 9th Gen + CPU.

I just added a couple of lines to remove and cleanup the dev environment at the end of the script to keep the plex container as small as possible.

 

You can grab it here:

 

Posted

I am able to get this to work. Thank you for the instruction. I am having one issue I need help with. After modifying the "GO" file I hit control X and Y to save it, but when I exit the terminal, it gives me a warning that if I exit my changes might not be saved. Sure enough when I go back into the "GO" file, the script is not at the bottom. It's not that big of a deal to go back in and add the script after each reboot, but I was wondering what I am doing wrong when exiting the terminal? I am very new at this. 

Posted
On 12/6/2020 at 12:59 PM, mmz06 said:

 

It finishes with these lines:


plex
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 Gen OCL Driver
`-- Device #0: Intel(R) UHD Graphics Coffee Lake Desktop GT2
Platform #1: Intel Gen OCL Driver
Script Finished Dec 10, 2020 09:53.34

Enjoy !!!

 

😄

for me it finishes like this or maybe its not finished yet?

its stuck in this state for 10 minutes now.


Plex-Media-Server
Device open failed, aborting...
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)
Device open failed, aborting...
Device open failed, aborting...
Device open failed, aborting...
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)
Device open failed, aborting...
cl_get_gt_device(): error, unknown device: ffffffff
cl_get_gt_device(): error, unknown device: ffffffff
cl_get_gt_device(): error, unknown device: ffffffff
Platform #0: Intel Gen OCL Driver
Platform #1: Intel Gen OCL Driver

 

Posted

@Pixel5 it seems the compilation didn't go right for your CPU...

Which CPU are you using ?

This requires Linuxserver.io

Are you using this plex version  or another one?

 

Should you provide the 20 lines of the execution above the one you provides ?

 

Posted
32 minutes ago, mmz06 said:

@Pixel5 it seems the compilation didn't go right for your CPU...

Which CPU are you using ?

This requires Linuxserver.io

Are you using this plex version  or another one?

 

Should you provide the 20 lines of the execution above the one you provides ?

 

initially i was using another plex container but i switched over to linuxserver.io with the exact same result.

The CPU im using is the i3-10100

above these lines is a big empty section and the next that follows above is this

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
binfmt-support binutils binutils-common binutils-x86-64-linux-gnu cmake-data
cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 gcc-9-base git-man less
lib32gcc-s1 lib32stdc++6 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libarchive13 libasan5 libatomic1 libbinutils
libbsd-dev libc-dev-bin libc6-dev libc6-i386 libcbor0.6 libcc1-0
libclang-common-7-dev libclang1-7 libcrypt-dev libctf-nobfd0 libctf0
libcurl3-gnutls libdpkg-perl libdrm-amdgpu1 libdrm-nouveau2 libdrm-radeon1
libedit2 libegl-dev libegl-mesa0 libegl1 libelf1 liberror-perl libfakeroot
libffi-dev libfido2-1 libfile-fcntllock-perl libgbm1 libgc1c2 libgcc-9-dev
libgdbm-compat4 libgdbm6 libgl-dev libgl1 libgl1-mesa-dri libglapi-mesa
libgles-dev libgles1 libgles2 libglib2.0-0 libglib2.0-data libglvnd-dev
libglvnd0 libglx-dev libglx-mesa0 libglx0 libgomp1 libicu66 libisl22 libitm1
libjsoncpp1 libllvm10 libllvm7 liblocale-gettext-perl liblsan0 libmpc3
libmpfr6 libncurses-dev libobjc-9-dev libobjc4 libomp-7-dev libomp5-7
libopengl-dev libopengl0 libperl5.30 libpipeline1 libpthread-stubs0-dev
libquadmath0 librhash0 libsensors-config libsensors5 libstdc++-9-dev
libtsan0 libubsan1 libuv1 libvulkan1 libwayland-client0 libwayland-server0
libx11-dev libx11-xcb1 libxau-dev libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0
libxcb-present0 libxcb-randr0 libxcb-sync1 libxcb-xfixes0 libxcb1-dev
libxdamage1 libxdmcp-dev libxml2 libxmuu1 libxshmfence1 libxxf86vm1
linux-libc-dev llvm-7 llvm-7-runtime make manpages manpages-dev
mesa-vulkan-drivers netbase opencl-c-headers openssh-client patch perl
perl-modules-5.30 shared-mime-info x11proto-core-dev x11proto-dev
x11proto-xext-dev xauth xdg-user-dirs xorg-sgml-doctools xtrans-dev
0 upgraded, 0 newly installed, 140 to remove and 7 not upgraded.
After this operation, 835 MB disk space will be freed.

 

Posted (edited)

@Pixel5

CPU should work and container also....

Should you provide the lines before those ones?

Actually, I'd need the end of the compilation, showing the result and supposedly the failure of it, so it maybe possible to investigate.

Edited by mmz06
Posted (edited)

@Pixel5

Compilation and everything looks good.

So maybe your GPU is not correctly exposed inside the container.

Should you try  (with the correct container name)

docker exec -it plex ls -lh /dev/dri

Mine returns this :

root@Plex4:~# docker exec -it plex ls -lh /dev/dri
total 0
crw-rw---- 1 root videoScqPbdA6 226,   0 Dec 13 18:05 card0
crw-rw---- 1 root videoScqPbdA6 226, 128 Dec 13 18:05 renderD128

So if all this is fine, it may signify your GPU is not already supported by this unsupported driver...

Just checked the code on GitHub and you GPU PCI-ID is in it, so it should work.

Did you also update Unraid to last 6.9.0-beta35 ?

Edited by mmz06
Posted

@mmz06

the dev/dri directory doesnt exist for me sadly, thats another thing i can figure out why.

 

Currently im running the latest stable release, does all of this only work on the latest beta?

can i also use the latest RC release that just came out?

Posted

Yes 6.9+ is required.

Last 6.9.0-rc works as well, I just did the update before answering to you.

Take care to follow the new path to expose your GPU to the container as explained a few posts before:

 

 

Posted (edited)

@mmz06

how long did the reboot after updating take for you?

im waiting for like 5 minutes now for it to reboot and i fear its stuck booting for some reason now.

ignore that i figured it out, it was booting fine but it used the onboard NIC as the primary so i couldnt connect to it.

 

finally got everything up and running again and ran your script again, this time with the expected result and i can also see the iGPU going to work when i run a video.

 

So your script is the solution but requires the latest RC to work, do i need to do anything after a reboot or should all changes be permanent?

Edited by Pixel5
Posted
23 hours ago, Pixel5 said:

So your script is the solution but requires the latest RC to work, do i need to do anything after a reboot or should all changes be permanent?

It will be fine for a reboot, but it's not permanent, it will require to be applied again in case of Plex container update

Posted (edited)

*** Update ***

So by investigate further, I could find that:

  • Plex team did update their code to support official Intel  NEO Runtime drivers
  • But the required minimal version for these Intel NEO Runtime drivers is 20.36 which are not just so simple to install
  • There was a new branch created on Linuxserver's Plex GitHub, allowing easy installation of this.

But it's not directly available from them using their Plex container app, yet.

Then I guess it will not take long to get this formerly available from them.

 

Waiting for that, if you want to go ahead and give it a try, there is a very simple way of installing this new release, which is much nicer than the script I proposed a few days ago:

Just run the following at your plex server prompt and wait for it to complete (like a few minutes)

docker build -t linuxserver/plex:opencl https://github.com/linuxserver/docker-plex.git#opencl

Change the image your container is pointing to by editing it and add ":opencl" at the end of the Repository option like in this picture:

Opencl.thumb.png.4da76c556c3c63cbebcd690f421635fc.png

 

It should take a few seconds to update your container using this new image.

 

Final Steps:

  • To update the container you need to build the image again, and go to Advanced View in the container listing tab, and force update for your Plex Container. 
 docker build --pull -t linuxserver/plex:opencl https://github.com/linuxserver/docker-plex.git#opencl
  • To revert back to the original container, just remove the ":opencl" at the end of the Repository option.

 

Enjoy !

Edited by mmz06
Posted

BTW, the whole purpose of the script I proposed before was to achieve the same:

4K transcode with HDR to SDR tone mapping.
So this new approach is meant to be easier.

Posted
23 minutes ago, mmz06 said:

BTW, the whole purpose of the script I proposed before was to achieve the same:

4K transcode with HDR to SDR tone mapping.
So this new approach is meant to be easier.

well if that is the case there still seems to be something wrong with my setup.

i got hardware transcoding up and running and i can see the iGPU doing its work but when i play a 4K HDR movie via the PLEX app on my Android TV it just instantly throws an error without any meaning full message and doesnt even try to transcode anything.

Same thing happened in the plex app on my 4k none HDR TV

 

Any idea if this is still related to hardware transcoding or usually something else?

Posted
Any idea if this is still related to hardware transcoding or usually something else?

I would try using just a laptop/desktop browser like chrome or Firefox, to see if it works. If it does, then you face a client issue, if not it’s a server one...

 

 

Envoyé de mon iPhone en utilisant Tapatalk

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...