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


312 posts in this topic Last Reply

Recommended Posts

  • Replies 311
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

***Update*** : Apologies, it seems like there was an update to the Unraid forums which removed the carriage returns in my code blocks. This was causing people to get errors when typing commands verbat

Please be courteous and respectful to one another. Thank you

You might find this useful (Yes means the iGPU can both encode and decode.):   BTW: this chart is from the Quick Sync Video Wikipedia page.  

Posted Images

Hi, as this is somewhat cryptic in the guide, do I need PlexPass for Hardware-Transcoding or not?

Cryptic?

 

I’m not sure what’s more explicit than it being number one on the pre-requisites.

 

Let me know which part you found confusing and I’ll try to elaborate more smile.png&key=d7bc0bbbfa2056a2a63af437c1f4a1188d2d7eb0deb5aa11e8f34aa88765e668

Link to post
5 hours ago, techsperion said:

Cryptic?

 

I’m not sure what’s more explicit than it being number one on the pre-requisites.

 

Let me know which part you found confusing and I’ll try to elaborate more smile.png&key=d7bc0bbbfa2056a2a63af437c1f4a1188d2d7eb0deb5aa11e8f34aa88765e668

Now that i read it again, it seems pretty clear. I was working the whole day on the unraid-server so i guess I was just tired and susceptible for misunderstanding things. Sorry for that.

I remember that i thought PlexPass is required for a test-utility which tests if your hardware is capable of hardware-encoding. 😅

Edited by Greyberry
Link to post

I've got my server up and running. I have a 9900k and I've got the IGPU enabled in the bios, and the server is plugged directly into my TV and I have a video signal.  HW transcoding is enabled in plex, I have a plexpass, but some reason I do not see the directory: cd /dev/dri

 

It tells me it doesn't exist. Any suggestions?

Link to post
I've got my server up and running. I have a 9900k and I've got the IGPU enabled in the bios, and the server is plugged directly into my TV and I have a video signal.  HW transcoding is enabled in plex, I have a plexpass, but some reason I do not see the directory: cd /dev/dri
 
It tells me it doesn't exist. Any suggestions?

Did you run the mod probe command?
Link to post
  • 2 weeks later...
14 minutes ago, momoz said:

Can you not have QuickSync or HW decode in both docker and VMs?

Nope, not possible.  If a VM is using a resource, nothing else (VM, docker container, host OS) can use it at the same time.  It's the same issue with the unRAID Nvidia transcoding build with support for discrete Nvidia GPUs.   In some cases, a server reboot may be required in order to use the GPU again once you try to use it with both a docker container and VM.

 

With just docker containers, multiple containers can use the iGPU simultaneously.  I have had HandBrake and Plex both using the iGPU at the same time for hw transcoding.

Link to post

First of all, this is the best tutorial I've found to set this up step by step.

So, I've been trying to make this work for 2 months now using tutorial over tutorial and always leading to the same weird issue. New to Unraid and new to Plex but I have some knowledge on Ubuntu, docker and networking. 

 

Machine hw is:

i7-6700k running at stock,

On a Asus z170 Sabertooth Mark 1 on most recent bios version,

32 Gb of Ddr4 at 2133Mhz,

With 6 hdd and 2 ssd in an array.

All of that on a 650w psu.

 

My problem:

I can do every steps and validate that they are done by having the device in the container's file system. As soon as I setup hardware decoding in plex's settings and test it with any file, server crashes, immediately close and has a bad time booting back up (some times taking 3-4 restarts before starting bios and then unraid). I can transcode on cpu fine but to a max of 2-3 streams and my other containers (which I disabled to test plex) can become slow-ish. I really don't know what I'm doing wrong and what logs or screen captures I could give to diagnose this as everything instantly closes.

 

image.png.3d2314e945e86c700c1589e906ff7d13.png

 

Ysma500

A sad Canadian.

Edited by ysma500
added motherboard's chipset and dev/dri bypass in terminal.
Link to post
First of all, this is the best tutorial I've found to set this up step by step.
So, I've been trying to make this work for 2 months now using tutorial over tutorial and always leading to the same weird issue. New to Unraid and new to Plex but I have some knowledge on Ubuntu, docker and networking. 
 
Machine hw is:
i7-6700k running at stock,
On a Asus z170 Sabertooth Mark 1 on most recent bios version,
32 Gb of Ddr4 at 2133Mhz,
With 6 hdd and 2 ssd in an array.
All of that on a 650w psu.
 
My problem:
I can do every steps and validate that they are done by having the device in the container's file system. As soon as I setup hardware decoding in plex's settings and test it with any file, server crashes, immediately close and has a bad time booting back up (some times taking 3-4 restarts before starting bios and then unraid). I can transcode on cpu fine but to a max of 2-3 streams and my other containers (which I disabled to test plex) can become slow-ish. I really don't know what I'm doing wrong and what logs or screen captures I could give to diagnose this as everything instantly closes.
 
image.png.3d2314e945e86c700c1589e906ff7d13.png
 
Ysma500
A sad Canadian.

Damn that is strange and would bug me out too.

I almost never say this but I’m wondering if it’s a hardware issue. Only reason I’m thinking that is you’re having a difficult time getting to BIOS.

QuickSync should really help by making your machine more efficient and not slowing down the other containers when transcoding. Shot in the dark here but you wouldn’t happen to have another CPU to test?

Another shot in the dark is your NAS plugged directly into the wall socket and getting clean power? Quick Sync shouldn’t be drawing too much power but I’ve also seen weird issues crop on when machines aren’t getting clean power, more on GPUs though
Link to post
11 hours ago, techsperion said:


Damn that is strange and would bug me out too.

I almost never say this but I’m wondering if it’s a hardware issue. Only reason I’m thinking that is you’re having a difficult time getting to BIOS.

QuickSync should really help by making your machine more efficient and not slowing down the other containers when transcoding. Shot in the dark here but you wouldn’t happen to have another CPU to test?

Another shot in the dark is your NAS plugged directly into the wall socket and getting clean power? Quick Sync shouldn’t be drawing too much power but I’ve also seen weird issues crop on when machines aren’t getting clean power, more on GPUs though

So yeah, I was wondering if I was doing something wrong before putting the blame on hardware.

 

I didn't explained my idea clearly about "cpu transcoding". What I meant was that I can transcode using cpu cores instead of Quicksync, but then it is making my machine slower because of cpu usage. I've been using this method for the last 3 weeks without any crash.

 

For the "clean power" part of things, my box is connected to a UPS CyberPower 1500VA battery side to keep it running clean:

image.png.593c983d57e5029f7b8c955a4d115bbf.png

here's Unraid info read of the ups.

 

Really tried stuff over here... wondering if my "iGPU enabling" in BIOS isn't done the right way. I'm more of a AMD guy and not that familiar with Intel Bios setup. This was my brother's PC, and this motherboard is like no one I've ever seen, wondering if Asus played a little with the standard feature sets of z170 bios.

 

Here's my dashboard to have an overview of my setup:

image.thumb.png.a0f395e4125549ada3e3248cdf59ca1e.png

 

Thank you for the fast reply,

 

Ysma500
A slightly less bummed Canadian.

Edited by ysma500
Added dashboard snip-it
Link to post
  • 4 weeks later...
  • 1 month later...
On 4/30/2020 at 1:46 PM, Hoopster said:

Nope, not possible.  If a VM is using a resource, nothing else (VM, docker container, host OS) can use it at the same time.  It's the same issue with the unRAID Nvidia transcoding build with support for discrete Nvidia GPUs.   In some cases, a server reboot may be required in order to use the GPU again once you try to use it with both a docker container and VM.

 

With just docker containers, multiple containers can use the iGPU simultaneously.  I have had HandBrake and Plex both using the iGPU at the same time for hw transcoding.

Do you have a link to a guide on how you got handbrake to use the iGPU for transcoding?

 

Also, I finally got my unraid server to use the iGPU for Plex transcoding.  I was having issues because I had a couple of graphics cards installed.  Is it possible to use iGPU for Plex, and keep those cards plugged in for protein folding with FAH and maybe to be used as a passthrough GPU in a VM?  I tried everything that I could think of and the only way I was able to get it working was removing the GPU's.

 

My setup is a Asus z170-AR with a i3-7350k.

 

Any help would be appreciated.  Thanks.

Link to post
12 hours ago, DannyDonahue said:
On 4/30/2020 at 12:46 PM, Hoopster said:

 

Do you have a link to a guide on how you got handbrake to use the iGPU for transcoding?

1. Configure /dev/dri as a container device in the HandBrake docker container configuration:

image.png.25ba16b5dc87bbd8ec0899dfa3e50ccc.png

 

2. Create a preset in HandBrake that uses QSV as video encoder (will only appear if /dev/dri is passed through as a container device):

image.png.8a7c183bac0c51a0949645ad258feb4a.png

 

3. If desired, set the custom QSV preset as the Automatic Video Converter Preset in HandBrake container:

image.thumb.png.263aca73fea373751137a1e7a8d51fa2.png

Edited by Hoopster
Link to post
12 hours ago, DannyDonahue said:

Is it possible to use iGPU for Plex, and keep those cards plugged in for protein folding with FAH and maybe to be used as a passthrough GPU in a VM?

In your BIOS, you need to set your Primary Display to IGFX (Auto will not work):

 

You should also enable IGPU Multi-Monitor

 

iGPU needs to be the primary (or only) graphics display in order to load /dev/dri drivers for transcoding.  Auto is going to select a different graphics adapter if you have a PCIe adapter installed and it doesn't work to load drivers even if iGPU is only graphics display.

 

With IGFX as primary and other PCIe graphics cards present, you should be able to assign PCIe graphics cards for other uses.

Link to post

@DannyDonahue It may also be necessary to have a monitor attached to an iGFX port. When no monitor is attached to an iGFX port my motherboard will auto select the PCIe graphics card even though it's set to boot with the iGFX as the primary. What I ended up doing was connecting the VGA port to the motherboard and HDMI to the PCIe graphics card for my VM.

Link to post
1 hour ago, Taddeusz said:

It may also be necessary to have a monitor attached to an iGFX port

@DannyDonahue Yeah, my motherboard does not need that.

 

However, if yours does and you don't want to attach a monitor, you could try a dummy plug such as this (or similar for your video output connector type):

 

https://www.amazon.com/Headless-Display-Emulator-Headless-1920x1080-Generation/dp/B06XT1Z9TF/ref=pd_lpo_147_t_0/136-1464902-8612348?_encoding=UTF8&pd_rd_i=B06XT1Z9TF&pd_rd_r=1eafd493-ce7d-41f2-bedd-4df136b1313f&pd_rd_w=UmzJz&pd_rd_wg=AncpK&pf_rd_p=7b36d496-f366-4631-94d3-61b87b52511b&pf_rd_r=E30JHGPE77AJASSAFZCB&psc=1&refRID=E30JHGPE77AJASSAFZCB

Edited by Hoopster
Link to post
9 hours ago, Hoopster said:

In your BIOS, you need to set your Primary Display to IGFX (Auto will not work):

 

You should also enable IGPU Multi-Monitor

 

iGPU needs to be the primary (or only) graphics display in order to load /dev/dri drivers for transcoding.  Auto is going to select a different graphics adapter if you have a PCIe adapter installed and it doesn't work to load drivers even if iGPU is only graphics display.

 

With IGFX as primary and other PCIe graphics cards present, you should be able to assign PCIe graphics cards for other uses.

I appreciate the help.  I'll try the handbrake settings.

 

As for Plex, I'm still having the same issue.  I did as you suggested, but it reverts back to using the CPU for transcoding, and not the iGPU.

Prior to setting up the iGPU, I was using a GTX1070 for plex, and a 750ti for folding.  I used SpaceInvader's tutorials and had those working perfectly.  When I read about intel quicksync, I decided to use the 1070 for something else.  Any ideas on what to try now?  Am I having problems because of the nvidia drivers?  I attached a picture of my BIOS, my container settings, as well as the ls results from the terminal and what Plex looks like while transcoding.

photo_2020-07-06_20-22-11.jpg

photo_2020-07-06_20-22-07.jpg

photo_2020-07-06_20-22-04.jpg

Annotation 2020-07-06 202242.png

Edited by DannyDonahue
Link to post

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.