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


324 posts in this topic Last Reply

Recommended Posts

5 hours ago, DannyDonahue said:

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

Are you using stock Unraid or the Linuxserver version?

Link to post
  • Replies 323
  • 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

6 hours ago, lotetreemedia said:

Are you using stock Unraid or the Linuxserver version?

I can only get intel quicksync to work if the video card is physically removed from the machine, or if I install stock unraid (removing the nvidia drivers).  Of course, if the nvidia drivers are uninstalled, I can't use the video cards that are installed for protein folding, etc.

Link to post
2 minutes ago, DannyDonahue said:

I can only get intel quicksync to work if the video card is physically removed from the machine, or if I install stock unraid (removing the nvidia drivers).  Of course, if the nvidia drivers are uninstalled, I can't use the video cards that are installed for protein folding, etc.

Do you have the latest bios? Do you have a monitor plugged into the motherboard when you’re booting UnRAID? I have an ASUS PRIME H370M-PLUS. I have to have a monitor plugged into the motherboard or else it makes my PCIe video card primary and QuickSync is disabled.

Link to post
33 minutes ago, Taddeusz said:

Do you have the latest bios? Do you have a monitor plugged into the motherboard when you’re booting UnRAID? I have an ASUS PRIME H370M-PLUS. I have to have a monitor plugged into the motherboard or else it makes my PCIe video card primary and QuickSync is disabled.

I have a monitor (TV) plugged in to the mobo, but not the video card.  And yes, it's the most recent BIOS.

Edited by DannyDonahue
Link to post
2 hours ago, DannyDonahue said:

I have a monitor (TV) plugged in to the mobo, but not the video card.  And yes, it's the most recent BIOS.

Unless there's a specific option for QuickSync this sounds like a weird BIOS limitation that disables QuickSync whenever there's a PCIe video card present no matter which is set to be primary.

Link to post
40 minutes ago, Taddeusz said:

Unless there's a specific option for QuickSync this sounds like a weird BIOS limitation that disables QuickSync whenever there's a PCIe video card present no matter which is set to be primary.

@DannyDonahue This could be.  There are motherboards/BIOS that behave this way; i.e. they will always prefer a PCIe video card, if present, over iGPU and there is no BIOS setting or jumper to change that.  I suggest it is worth contacting ASUS to see if they can give you any more information on how your motherboard/BIOS behaves in your scenario.

 

I have an ASRock motherboard for which BIOS tweaks were intentionally provided in order to allow the iGPU to be used for transcoding only (no video output) while still allowing the BMC/IMPI video output and PCIe video cards to function for other purposes.  SuperMicro has a similar BIOS, but this is for server/workstation motherboards.

 

I don't know enough about ASUS UEFI/BIOS to know how it may behave.

Link to post
2 hours ago, Hoopster said:

@DannyDonahue This could be.  There are motherboards/BIOS that behave this way; i.e. they will always prefer a PCIe video card, if present, over iGPU and there is no BIOS setting or jumper to change that.  I suggest it is worth contacting ASUS to see if they can give you any more information on how your motherboard/BIOS behaves in your scenario.

 

I have an ASRock motherboard for which BIOS tweaks were intentionally provided in order to allow the iGPU to be used for transcoding only (no video output) while still allowing the BMC/IMPI video output and PCIe video cards to function for other purposes.  SuperMicro has a similar BIOS, but this is for server/workstation motherboards.

 

I don't know enough about ASUS UEFI/BIOS to know how it may behave.

I reached out to Asus support and described the situation. They informed me that it should be working with both iGPU and the video card.  Supposedly they are going to test in their lab.  I won't be holding my breath.  In the meantime, if anyone has some ideas, I'm all ears.  Thanks for all the help.

Link to post
On 7/6/2020 at 10:20 AM, Hoopster said:

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

I appreciate the detailed instructions, I got it working.  I'm guessing Handbrake is still CPU intensive?  I am transcoding a TV show from .TS to h.264 and it's giving my CPU a workout.

Link to post
2 hours ago, DannyDonahue said:
I appreciate the detailed instructions, I got it working.  I'm guessing Handbrake is still CPU intensive?  I am transcoding a TV show from .TS to h.264 and it's giving my CPU a workout.


Yep, with QSV my handbrake encodes are using CPU in the 65-75% range. It all depends on audio, video and subtitle encoding needs.

Without QSV, it will use CPU in 90-95% range.


Sent from my iPhone using Tapatalk

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

I'm guessing Handbrake is still CPU intensive?

As explained by this statement from the HandBrake documentation (only video encoding is performed by the iGPU. In Plex, both decode and encode is performed by iGPU):

 

"Only video encoding is performed by the hardware encoder. Every stage prior to and after video encoding including decoding, filters, audio/video sync, audio encoding, muxing, etc., is performed by the CPU. As a result, it is normal to have high (even 100%) CPU utilisation during encodes."

Link to post

So now I do have a question after all.  Once this is done, I only get a blank screen when unRAID finishes booting up (durring boot I see all the normal text).  Then, normally when I would see the login prompt, the screen goes black.  I think this is because of my motherboard's implementation; it's a Supermicro X11SSH-LN4F.  I tried this:

 

Quote

If you have on-board Aspeed IPMI you may find that IPMI loses video or changes color during the boot process.  To resolve this, go to Main -> Boot Device -> Flash -> Syslinux Config and add "nomodeset" to your "append" line (and reboot).  It should look something like this:

 

label unRAID OS   kernel /bzimage   append initrd=/bzroot nomodeset

 

You'll probably want to repeat that on each of the other append lines in this file.

 

 

After that, I do get my unRAID VGA port back after booting, but not surprisingly the PLEX docker no longer functions unless I remove the /dev/dri device.

 

So is there any way to get my VGA port to work at the same time as Quick Sync on my motherboard?  My full system is in my sig.

 

Thanks for any help!

craigr

Link to post

@craigr Yep, this is all normal.  That's the way it works. 

 

Once 'modprobe i915' is executed from the go file the iGPU has video control; however, the iGPU is not associated with the VGA output of your motherboard.

 

Basically, you just took away the video output of the ASPEED 2400 which controls your BMC/IPMI/VGA port.  By loading i915 drivers you also lose console output in IPMI and it will also be blank.  This should not be a problem as either the unRAID terminal or something like PuTTY will give you terminal output.

 

If you use the 'nomodeset' parameter, you are killing i915 drivers and giving control back to the ASPEED 2400 VGA output but this causes /dev/dri to not load which Plex does not like because you told it to load something that is not found.

 

You have to make a choice between i915 and iGPU video transcoding or console/IPMI video output via the VGA port.  You can't have both.

Edited by Hoopster
Link to post
1 hour ago, Hoopster said:

@craigr Yep, this is all normal.  That's the way it works. 

 

Once 'modprobe i915' is executed from the go file the iGPU has video control; however, the iGPU is not associated with the VGA output of your motherboard.

 

Basically, you just took away the video output of the ASPEED 2400 which controls your BMC/IPMI/VGA port.  By loading i915 drivers you also lose console output in IPMI and it will also be blank.  This should not be a problem as either the unRAID terminal or something like PuTTY will give you terminal output.

 

If you use the 'nomodeset' parameter, you are killing i915 drivers and giving control back to the ASPEED 2400 VGA output but this causes /dev/dri to not load which Plex does not like because you told it to load something that is not found.

 

You have to make a choice between i915 and iGPU video transcoding or console/IPMI video output via the VGA port.  You can't have both.

Yup, thanks for your confirmation.  I was just hoping for a workaround.  Oh well, not a big deal to use PuTTY.  Only disadvantage I see is the loss of the GUI from the VGA, but that is a relatively new feature anyway.

 

Best regards,

craigr

Link to post

EDIT: Never mind.  I took Quick Sync away from PLEX and it did not solve the problem.

 

Well, perhaps the saga continues for me.  I tried to setup a Win10 VM today and I cannot connect to it through VNC.  Is this the reason?  When I click VNC Remote on my VM I get the error "Failed to connect to server."  Or is this unrelated?

 

Thanks again,

craigr

Edited by craigr
Link to post
  • 4 weeks later...
On 7/13/2020 at 9:29 PM, craigr said:

EDIT: Never mind.  I took Quick Sync away from PLEX and it did not solve the problem.

 

Well, perhaps the saga continues for me.  I tried to setup a Win10 VM today and I cannot connect to it through VNC.  Is this the reason?  When I click VNC Remote on my VM I get the error "Failed to connect to server."  Or is this unrelated?

 

Thanks again,

craigr

I have a X11SCH-LN4F and as soon as I type modprobe i915 in the console, I lose video output in the console. I didn't have that issue on my older ASRock Rack motherboard but that one had a separated GPU chip onboard on top of the IGP from the CPU.

 

Anyways, personally I don't need the console image once Unraid is booted up so that's not too much of an issue. If you really want a workaround, I guess that would be to get a dedicated GPU and have both the IGP and the GPU enabled, the IGP being used for the console video output.

Link to post
8 hours ago, dnLL said:

I have a X11SCH-LN4F and as soon as I type modprobe i915 in the console, I lose video output in the console. I didn't have that issue on my older ASRock Rack motherboard but that one had a separated GPU chip onboard on top of the IGP from the CPU.

 

Anyways, personally I don't need the console image once Unraid is booted up so that's not too much of an issue. If you really want a workaround, I guess that would be to get a dedicated GPU and have both the IGP and the GPU enabled, the IGP being used for the console video output.

Thanks.

 

I can live with it as-is since the web based terminal or Putty is easy enough.

 

I do have another GPU, but it's allocated to my Windows 10 VM.

 

Kind regards,

craigr

Link to post
  • 2 weeks later...

Thank you @lotetreemedia for this well written instruction guide.

 

Just used it with my server to enable hw transcode.  I am using an Intel i5-8400 and this has vastly improved my Plex performance.  Plex can now transcode several streams without any transcoding issues or performance impacts on other containers or VMs.

Thanks!

Link to post
55 minutes ago, charlescc1000 said:

Thank you @lotetreemedia for this well written instruction guide.

 

Just used it with my server to enable hw transcode.  I am using an Intel i5-8400 and this has vastly improved my Plex performance.  Plex can now transcode several streams without any transcoding issues or performance impacts on other containers or VMs.

Thanks!

No problem at all :)

 

I mainly plagiarised @Hoopster ;)  but i'll take it

Edited by lotetreemedia
Link to post
2 minutes ago, lotetreemedia said:

No problem at all :)

 

I mainly plagiarised @Hoopster ;)  but i'll take it

You organized my posted responses scattered across multiple forum threads into in an easy-to-follow, step-by-step guide, so you can take all the credit you get! 😁

 

You probably did it better than I would have done it anyway so, the praise is well deserved.

  • Like 1
  • Haha 1
Link to post
  • 3 weeks later...
On 8/9/2020 at 1:43 AM, dnLL said:

I have a X11SCH-LN4F and as soon as I type modprobe i915 in the console, I lose video output in the console. I didn't have that issue on my older ASRock Rack motherboard but that one had a separated GPU chip onboard on top of the IGP from the CPU.

 

Anyways, personally I don't need the console image once Unraid is booted up so that's not too much of an issue. If you really want a workaround, I guess that would be to get a dedicated GPU and have both the IGP and the GPU enabled, the IGP being used for the console video output.

What CPU do you have? 

 

I just changed from an E3-1275 v5 to the same but v6.  The v6 can hardware encode hvec.  I am however now frustrated because with the new v6 CPU no /dev/dri folder is created after typing modprobe i915.  I even tried modprobe -r i915 and then redid modprobe i915 with no lock.  There is just no dri folder ever created.  Does the v6 have something other than i915?

 

Any thoughts as to how I can get this running with the E3-1275 v6?

 

Thanks,

craigr

Edited by craigr
Too tired I guess
Link to post

Looks like it uses the i965?  I tried this:

root@unRAID:~# modprobe i965
modprobe: FATAL: Module i965 not found in directory /lib/modules/4.19.107-Unraid
root@unRAID:~#

I checked and I don't even have a "lib" directory, just some other directories that start with lib.

 

Do have the i965 driver in unRAID though.

 

i965.png

Edited by craigr
Just too tired...
Link to post

So changing the CPU caused the MB to also automatically change settings back to defaults in the BIOS.  I just had to go back in and turn on my onboard graphics.

 

The i915 and i965 both use the same module so that could never have been it.

 

Best,

craigr

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.