Add Intel iGPU QSV Quick Sync Encoding to Official Plex-Media-Server the easy way.


DemoRic

Recommended Posts

NOTE: Not all intel CPU's have QUICK SYNC encoding capabilities (most do, but you'll have to check)

 

Install the following apps on your UNRAID server:  

  • Intel-GPU-TOP  (Search for ich777 to find the repository and then find Intel-GPU-TOP)
  • Plex-Media-Server
  • GPU Statistics  (GPU Statistics isn't required but is nice to have)

 

CONFIGURE PLEX ON UNRAID:  (I won't cover everything on how to install PLEX, just how to enable QSV hardware encoding.)

  1. Once you've configured PLEX to work already you will need to add the ability to use hardware encoding. 
  2. On your UNRAID Server, Goto DOCKER and left-click on the PLEX icon and select Edit. 
  3. Then "Add another Path, Port, Variable, Label or Device", name it (whatever you'd like Intel iGPU or -device /dev/dri it doesn't really matter) and give it the value:  /dev/dri/

image.thumb.png.f2b38026e16ab8bd6a628ec99f979962.png

 

PLEX ENABLE HARDWARE ENCODING:

  1. Use PLEX's WebUI and login to the admin account. Then go to settings (the little wrench icon at the top right).
  2. Then on the left panel go to Settings > Transcoder. Enable "User hardware acceleration when available"

image.thumb.png.57cc68864cc35002973506673b1a8737.png

 

*CONFIGURE GPU STATISTICS 

On UNRAID server go to Settings, and then click on GPU Statistics in the User Utilities area.

In the Vendor section change it to Intel

 

Still Not working?

If you're using ARC or multiple GPU's you may have to do some additional changes (see thread below)

 

Standing on the Shoulders of Giants:  Thanks b3rs3rk, ich777 for your work on the Apps, and Cpt. Chaz with his video showing how to do this for linuxserver's PLEX app. This easy tutorial wouldn't be possible without your work.

Edited by DemoRic
minor text revision
  • Like 7
  • Thanks 2
  • Upvote 1
Link to comment
  • 2 months later...

My server is a NUC with a Celeron N5095 processor (4/4), Unraid version 6.11.5, I followed this tutorial and it didn't work, the plex kept doing the transcode without Quicksync. I spent days trying to solve it until I found a solution in another thread. I had to access the terminal and enter 3 commands:

 

rmmod i915
echo "options i915 enable_fbc=1 enable_guc=3" > /etc/modprobe.d/i915.conf
modprobe i915

 

I had a problem when I typed rmmod i915, the terminal replied that it was in use. Even stopping all server processes it still told me that it was in use, I solved this by adding these 3 commands to the /boot/config/go file so that these commands were executed during system startup.

 

I don't know if this is the easiest and most safe way to solve it because I'm a linux newbie, but that's what worked for me here.

Link to comment
1 hour ago, francispb said:

I had a problem when I typed rmmod i915, the terminal replied that it was in use. Even stopping all server processes it still told me that it was in use, I solved this by adding these 3 commands to the /boot/config/go file so that these commands were executed during system startup.

Please don't do it that way, it would be better to remove the lines from the go file, execute these commands from a Unraid terminal and reboot afterwards:

mkdir -p /boot/config/modprobe.d
echo "options i915 enable_fbc=1 enable_guc=3" > /boot/config/modprobe.d/i915.conf

 

With that you ensure that the module is loaded with these options without any messing around with the module when it's already loaded. ;)

  • Like 1
  • Thanks 2
  • Upvote 1
Link to comment
On 11/27/2022 at 4:32 PM, DemoRic said:

name it

I would recommend that you change the name in the screenshot to something like: "Intel GPU" and remove the description because it's not really needed anyways and could confuse users so that they maybe believe the have to put in the description.

 

Maybe also add a note at the end if a user has multiple GPUs installed like mentioned in the post over here (at the end from this post):

Because you can't specify which card Plex has to use you have to maybe map it to a different card/render-device.

  • Like 1
Link to comment
25 minutes ago, ich777 said:

Please don't do it that way, it would be better to remove the lines from the go file, execute these commands from a Unraid terminal and reboot afterwards:

mkdir -p /boot/config/modprobe.d
echo "options i915 enable_fbc=1 enable_guc=3" > /boot/config/modprobe.d/i915.conf

 

With that you ensure that the module is loaded with these options without any messing around with the module when it's already loaded. ;)

 

 

I tested it and it worked very well

  • Like 1
Link to comment
1 hour ago, ich777 said:

I would recommend that you change the name in the screenshot to something like: "Intel GPU" and remove the description because it's not really needed anyways and could confuse users so that they maybe believe the have to put in the description.

It was more a reference to myself if I ever needed to hunt down more info.  Also this was shared for the integrated on chip iGPU, but I can see there could be a bit of confusion with intel Arc cards.  Thanks for expanding on it's use in this thread.

  • Like 1
Link to comment
1 hour ago, ich777 said:

The classic thread is really outdated since modprobe isn't needed anymore or any modification to the go file, I really wouldn't recommend to send people to this thread... ;)

My post here:

 

 

And Hoopseter's post are the most relevant parts at this time:

 

 

As addendums to the original first post.

 

  • Like 1
  • Thanks 1
Link to comment
  • 1 month later...

For some reason I can't seem to get this to work for me.
Just added an i5-13600k to my server
Installed Intel_gpu_top
image.thumb.png.e6594791f64b30f3083803215570709e.png

iGPU shows up fine in GPU statistics 
image.png.0a0b2979bd2990c082f89163d18be562.png

 

I've tried adding the extra parameter "--device=/dev/dri" in multiple different types of ways from every thread I could find with no luck.

Only thing that I can think of is ls in /dev/dri populates card0, card1, card2, renderD128, and renderD129 
image.png.5b4e739e2df4889145990e75b9a24584.png

 

I still have my Nvidia Quadro P400 installed in my system as I'd like to keep using that for Tdarr and just have Plex on the Intel iGPU

Here's some of the examples I've tried:

--device=/dev/dri/renderD129:/dev/dri/renderD128 --device=/dev/dri/card1:/dev/dri/card0

--device=/dev/dri/renderD129:/dev/dri/renderD128 --device=/dev/dri/card2:/dev/dri/card0

--device=/dev/dri/card2

--device=/dev/dri:/dev/dri

Nothing seems to actually get the Plex docker container to use the iGPU but switching my extra parameter back to "--runtime=nvidia" and hardware transcoding works fine again.
Not sure what I'm missing here but hopefully I'm just overlooking something.

 

Edited by Rjwaters147
Link to comment
10 minutes ago, Rjwaters147 said:

For some reason I can't seem to get this to work for me.
Just added an i5-13600k to my server
Installed Intel_gpu_top
image.thumb.png.e6594791f64b30f3083803215570709e.png

iGPU shows up fine in GPU statistics 
image.png.0a0b2979bd2990c082f89163d18be562.png

 

I've tried adding the extra parameter "--device=/dev/dri" in multiple different types of ways from every thread I could find with no luck.

Only thing that I can think of is ls in /dev/dri populates card0, card1, card2, renderD128, and renderD129 
image.png.5b4e739e2df4889145990e75b9a24584.png

 

I still have my Nvidia Quadro P400 installed in my system as I'd like to keep using that for Tdarr and just have Plex on the Intel iGPU

Here's some of the examples I've tried:

--device=/dev/dri/renderD129:/dev/dri/renderD128 --device=/dev/dri/card1:/dev/dri/card0

--device=/dev/dri/renderD129:/dev/dri/renderD128 --device=/dev/dri/card2:/dev/dri/card0

--device=/dev/dri/card2

--device=/dev/dri:/dev/dri

Nothing seems to actually get the Plex docker container to use the iGPU but switching my extra parameter back to "--runtime=nvidia" and hardware transcoding works fine again.
Not sure what I'm missing here but hopefully I'm just overlooking something.

 

 

For when you have multiple GPUs

https://forums.plex.tv/t/preferred-hw-transcoder-linux/593507/11

 

  • Like 1
  • Thanks 1
  • Upvote 1
Link to comment

Wow that worked!
image.png.1bcf87fb5ca0574727b8d01cde035b46.png

I hadn't even thought about the possibility of it being something with Plex itself.

Adding HardwareDevicePath="/dev/dri/renderD129" to the Preferences.xml file and restarting plex instantly resolved the issue.

I had to have read almost every thread on this subject to date and it did not occur to me to check the plex forms at all, thank you a ton @david279!

  • Like 2
Link to comment
  • 3 weeks later...

Hi together, 

maybe someone can help me here. 

I switched my hardware from an old 7700k with GTX1650 to a new i5 13500. 

Everything worked fine with the additional value for the container:  /dev/dri/, HW Transcoding and HDR Tonemapping, I had no problems. 

Than I switched to a new Cache NVMe, so I moved the appdata folder from the old NVMe to the new one.  I started all my dockers and also Plex and than I was wondering why my CPU is near 100% when I am watching an HDR/DV Movie/Series on my Tablet... the HDR Tonemapping stopped working via QuickSync the normal Transcoding works fine.

I also tried Adding HardwareDevicePath="/dev/dri/renderD128" to the Preferences.xml but nothing changed. (I reverted the changes to value /dev/dri/) 

 

Here is also a screenshot from my logs with HDR Tonemapping ontanscode.thumb.png.936d44de940e723f3bd310178a9472ae.png

Link to comment
  • 4 weeks later...
On 4/16/2023 at 5:52 PM, Nerdcloud said:

Hi together, 

maybe someone can help me here. 

I switched my hardware from an old 7700k with GTX1650 to a new i5 13500. 

Everything worked fine with the additional value for the container:  /dev/dri/, HW Transcoding and HDR Tonemapping, I had no problems. 

Than I switched to a new Cache NVMe, so I moved the appdata folder from the old NVMe to the new one.  I started all my dockers and also Plex and than I was wondering why my CPU is near 100% when I am watching an HDR/DV Movie/Series on my Tablet... the HDR Tonemapping stopped working via QuickSync the normal Transcoding works fine.

I also tried Adding HardwareDevicePath="/dev/dri/renderD128" to the Preferences.xml but nothing changed. (I reverted the changes to value /dev/dri/) 

 

Here is also a screenshot from my logs with HDR Tonemapping ontanscode.thumb.png.936d44de940e723f3bd310178a9472ae.png

I am having a similar issue after changing the Cache drive my appdata folder was on.  Were you able to find a resolution?  I thought it might be a permission issue, but I've tried 777 to no avail

 

EDIT: Also running an nvidia GPU as well, but before changing my cache drive, I had no issues (Using the HardwareDevicePath field in Preferences.XML to select my iGPU for quicksynk, in my case D129).  Now, I can't use the iGPU or the Nvidia, Plex goes straight to CPU/software encoding.

 

EDIT 2: Removing the container and image, uninstalling Nvidia and Intel TOP and drivers, and then recreating the container has worked for me. I did not yet reinstall TOP or any driver. Hopefully that helps someone else.

Edited by Wake
fix found
Link to comment
On 5/17/2023 at 3:49 AM, Wake said:

I am having a similar issue after changing the Cache drive my appdata folder was on.  Were you able to find a resolution?  I thought it might be a permission issue, but I've tried 777 to no avail

 

EDIT: Also running an nvidia GPU as well, but before changing my cache drive, I had no issues (Using the HardwareDevicePath field in Preferences.XML to select my iGPU for quicksynk, in my case D129).  Now, I can't use the iGPU or the Nvidia, Plex goes straight to CPU/software encoding.

 

EDIT 2: Removing the container and image, uninstalling Nvidia and Intel TOP and drivers, and then recreating the container has worked for me. I did not yet reinstall TOP or any driver. Hopefully that helps someone else.

my problem is also fixed with the newst update 1.32.2.7100 :)

  • Thanks 1
Link to comment

Hi Guys,
I'm new to UnRaid. Installed it last week and just tried to enable HW encoding for my test Plex build - following this guide.

I have all the config in place and HW encoding isn't working:
image.png.b1a7453329dcb782051ada2fd665984c.png

image.png.1072c0596488b1a342205d916da4c718.png

image.png.9612032f81a80310048f5b89a29702a2.png

image.thumb.png.e4bf7bc5767b780668ba217ffc46945f.png

I'm running Xeon E3-1265L v3 without any additional GPU.
Any idea on what to check here to figure it out ?

Thanks
 

Link to comment
1 hour ago, pkoz79 said:

Xeon E3-1265L v3

That is a 4th generation Haswell CPU and, as you can see in the chart below, it has very limited Quick Sync Video encode/decode capabilities.  Basically, will get MPEG-2 as a format that matter for most movies.

 

image.thumb.png.79dc52215d7bd25d978cf7c466fb94fc.png

 

Technically, Plex supports 2nd gen. or later CPUs with QSV but they recommend 5th generation or later:

 

From Plex documentation requirements for hardware accelerated transcoding:

 

A recent Intel CPU meeting these requirements:

  • 2nd-generation Intel Core (Sandy Bridge, 2011) or newer (we recommend 5th-gen Broadwell or newer for the best experience; Sandy Bridge, in particular, is known to sometimes have poor visual output on some systems)

Personally, and I am not saying this is an issue for you, I could never get things working properly with Intel GPU Top plugin so I uninstalled it and loaded the i915 drivers in the way recommended for the particular Unraid version I was running.

Link to comment

Thanks. Its just a test setup but I wanted to try out to see how things work.

AVC is quite popular for media content as well so Haswell would do the job there but I couldn't get it to work in the end ...
Put an old Quadro p400 in and it worked without any issues thought :) 

 

  • Like 1
Link to comment
  • 1 month later...

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.