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


Recommended Posts

  • 2 weeks later...
7 hours ago, maR1o said:

My internal GPU is not showing in my system devices or in lspci

Usually means that it is not enabled in the BIOS.  On many systems "Onboard graphics" or something similar must also be set as the primary graphics adapter in order for the /dev/dri directory and contents to be created.

Link to comment

Hi folks,

 

just want to share this one:

I had big issues to get HW acceleration working.

This is my setup: ASUS PN41 with Intel Celeron N5100 (very nice mini PC)

Docker setup and permissions of /dev/dri were correct but never the less HWA was not working.

I spent hours investigating this.

Finally I got it.

Do following, if you have a similar setup:

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

Then check Plex again

image.png.c85b9480bb20c3f25ee66130636e0a26.png

Works now like a charm for me.

 

For persistence add the "echo" line into /boot/config/go

 

Good luck!

 

-------

I forgot a mutual thing:

Inside the docker container I also installed "vainfo" to check if the GPU and driver is working as expected.

This seams to install some drives which help to enable HW acceleration.

 

apt install vainfo

(within the docker)

 

To make this persistent check this URL for the linuxserver.io container: https://docs.linuxserver.io/general/container-customization

 

This is my script I start on each container start:

#!/bin/bash

echo ##### Install vainfo packages
dpkg -l vainfo > /dev/null 2>&1 || ( apt update && apt install -y vainfo && apt clean )

 

 

Edited by Unpack5920
  • Like 2
Link to comment
12 hours ago, Hoopster said:

Usually means that it is not enabled in the BIOS.  On many systems "Onboard graphics" or something similar must also be set as the primary graphics adapter in order for the /dev/dri directory and contents to be created.

Even with a separate video card and the iGPU set as primary my ASUS Prime H370M-Plus requires a monitor be plugged into the motherboard for the iGPU to be enabled. If no monitor is plugged into the motherboard it automatically sets my RX 470 as primary.

Link to comment
Even with a separate video card and the iGPU set as primary my ASUS Prime H370M-Plus requires a monitor be plugged into the motherboard for the iGPU to be enabled. If no monitor is plugged into the motherboard it automatically sets my RX 470 as primary.

Many use dummy plugs to get around this issue. Fortunately none of my motherboards have required that.


Sent from my iPhone using Tapatalk
Link to comment
On 10/17/2022 at 5:12 PM, AGpennypacker said:

nvm, h264 hw encoding is working but most of my new files i've encoded in h265 and my 12700 does not engage hw for transcoding those on 264 clients.

Any clue what the fix is for this? Do we have to wait for a Plex update, Unraid update (I'm on 6.11.1), or is there some config we can update?

Link to comment
On 10/16/2022 at 11:28 AM, Unpack5920 said:

Hi folks,

 

just want to share this one:

I had big issues to get HW acceleration working.

This is my setup: ASUS PN41 with Intel Celeron N5100 (very nice mini PC)

Docker setup and permissions of /dev/dri were correct but never the less HWA was not working.

I spent hours investigating this.

Finally I got it.

Do following, if you have a similar setup:

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

Then check Plex again

image.png.c85b9480bb20c3f25ee66130636e0a26.png

Works now like a charm for me.

 

For persistence add the "echo" line into /boot/config/go

 

Good luck!

 

-------

I forgot a mutual thing:

Inside the docker container I also installed "vainfo" to check if the GPU and driver is working as expected.

This seams to install some drives which help to enable HW acceleration.

 

apt install vainfo

(within the docker)

 

To make this persistent check this URL for the linuxserver.io container: https://docs.linuxserver.io/general/container-customization

 

This is my script I start on each container start:

#!/bin/bash

echo ##### Install vainfo packages
dpkg -l vainfo > /dev/null 2>&1 || ( apt update && apt install -y vainfo && apt clean )

 

 

My setup have a Pentium N6005, and it took some changes based on your guide to get it work, but I don't know if this is correct.


1- I have added string "blacklist i915" in - /boot/config/modprobe.d/i915.conf

 

2- I edited the "go" file and added the following strings...

-> just the "echo" line doesn't work <-

 

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

 

If I don't put the "i915" on a black list, "rmmod" and "modprobe" commands return a message saying the i915 is in use.

 

Any guess?

 

 

----------edit--------

 

I'm getting an error message and I don't know if I should be worried as everything is working fine.

 

zlRmFTo.png

 

 

Edited by Vattar
Link to comment
  • 3 weeks later...
On 10/23/2022 at 5:07 AM, Vattar said:

 

My setup have a Pentium N6005, and it took some changes based on your guide to get it work, but I don't know if this is correct.


1- I have added string "blacklist i915" in - /boot/config/modprobe.d/i915.conf

 

2- I edited the "go" file and added the following strings...

-> just the "echo" line doesn't work <-

 

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

 

If I don't put the "i915" on a black list, "rmmod" and "modprobe" commands return a message saying the i915 is in use.

 

Any guess?

 

 

----------edit--------

 

I'm getting an error message and I don't know if I should be worried as everything is working fine.

 

zlRmFTo.png

 

 

 

Hi,

 

the blacklist is not a good idea. ;-)

If i915 is in use, you should ensure that Plex is stopped before you make the changes.

 

Try these lines in the console:

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

 

cat /etc/modprobe.d/i915.conf


should show you the new settings for the driver which will be loaded with "mod probe i915"

 

Looks like HW-Acceleration works fine for you.

The settings in the "go" files should ensure, that the setting will be automatically done after reboot.

 

Which kind of error-message do you get?

 

 

  • Like 2
Link to comment
  • 4 weeks later...
On 10/16/2022 at 4:28 PM, Unpack5920 said:

 

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

 

 

Thanx a bunch for this...I've struggled with my Docker/Plex setup on my Unraid instance on a Asustor Lockerstor 4 Gen 2 AS6704T with a Celeron N5105. Your suggestion did it!

 

And to make it permanent and survive reboots you could:

 

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

 

 

 

Edited by BarbaGrump
  • Like 2
Link to comment
  • 2 weeks later...
On 2/28/2022 at 12:46 PM, Dural said:

 

I seem to be having the same issue with an 11500T, h264 starts up immediately and shows hw encoding.  When I try to do the same on an h265 file it shows it starts and shows hw encoding but the client just sits there spinning.  It looks like the cpu has one thread that goes to 100% while the gpu shows no load.

 

edit-Just figured it out, uncheck Use hardware accelerated video encoding but leave Use hardware acceleration when available checked.  Immediately worked after doing this and cpu load is <20% (4 threads being used for VM so not necessarily just from transcoding) while gpu video load is ~8%.

 

On 2/28/2022 at 3:15 PM, Dural said:

So what it appears to be doing is using the QS hardware for decoding but the CPU for encoding.  If I turn the hardware encoding on it will work for anything h264 but h265 just spins, plex shows it's transcoding but nothing happens and 1 CPU thread is maxed out.  Issue with the current drivers for 11th gen hardware?

 

 

So I decided to try the hardware accelerated encoding again and it now works.  I haven't changed anything other than updating Plex, so it must have been a Plex issue.  I've got HW for both the decode and encode now, gpu gets hit hard and the cpu isn't doing anything.

Link to comment
  • 2 weeks later...

Hoping for some help. I was able to use nano /boot/config/go and add the 2 lines. However, when I hit Ctrl-X and confirm to save the change, it's not actually saving over the original Go file. When I open Go again on nano, my additions are gone. Looking at the directory, it seems that nano saves my change as "go.save" instead. Is anyone else running into this problem?

Link to comment
Hoping for some help. I was able to use nano /boot/config/go and add the 2 lines. However, when I hit Ctrl-X and confirm to save the change, it's not actually saving over the original Go file. When I open Go again on nano, my additions are gone. Looking at the directory, it seems that nano saves my change as "go.save" instead. Is anyone else running into this problem?

If you are running UnRAID 6.9.x or greater, no go file modifications are needed. See the release notes for the version you are running to see how it deals with i915 drivers.


Sent from my iPhone using Tapatalk
Link to comment
On 1/7/2022 at 5:34 PM, Hoopster said:

In the case of the last few motherboards I have used with hardware transcoding, setting the primary graphics adapter to onboard, iGFX, IGD, etc. according to the BIOS is all that was needed to cause /dev/dri to show up.  Do not set primary graphics adapter to Auto if that is an option.

 

Intel GPU Top appeared be messing with my i915 drivers so I uninstalled it.  You might want to do that until you get /dev/dri with the proper contents to show up.

 

image.png.7151cdf09cf35462bbeaf6854201003a.png

 

At one point I had /dev/dri without renderD128 but you need that for transcoding.  Uninstalling Intel GPU top and recreating the i915.conf with the 'touch' method resolved it for me.

 

I will try reinstalling Intel GPU Top now that I know I have /dev/dri and i915 drivers working properly.

Haven't needed PLEX in a while, in fact since before I upgraded my server MB last.  Yesterday I needed PLEX and hardware acceleration was not working...  grrrrr

 

Anyway, Hoopster's work around of setting the iGFX to primary worked for me and fixed the problem.  Sort of annoying that I can't see unRAID boot up on the same video card that my VM's run on, but what can you do?

 

Thanks Hoopser.

 

craigr

Link to comment
  • 3 weeks later...
On 1/25/2023 at 9:15 PM, de Techneut said:

I have a intel 12600k and nvidia 1050ti in my system. When I do: 

ls /dev/dri

ls /dev/dri

 

image.png.04501a0f9b23fc175ca9f92dfceb172a.png

 

I see both the intel gpu and nvidia gpu. How do I correctly point the Intel GPU to Plex? 

 

I found the solution. When you type:

ls -l /sys/class/drm/renderD*/device/driver

you get the following result:

1612077101_AfbeeldingvanWhatsAppop2023-01-26om21_00_08.jpg.36361cd3dd27acb8d934d3b693867eb3.jpg

 

There I could see renderD129 was the intel device. 

 

To let PLEX use this, you need to add the following to the Preferences.xml file in de appdata folder of PLEX:

HardwareDevicePath="/dev/dri/renderD129"

Which looks like this:

93249927_AfbeeldingvanWhatsAppop2023-01-26om21_00_56.jpg.e46fbb1cb1f1375327b8dcbcaca50fd4.jpg

 

Then a reboot of PLEX, and the iGPU does the transcoding. 

 

 

 

Link to comment
  • 2 weeks later...
On 2/28/2022 at 7:46 PM, Dural said:

 

I seem to be having the same issue with an 11500T, h264 starts up immediately and shows hw encoding.  When I try to do the same on an h265 file it shows it starts and shows hw encoding but the client just sits there spinning.  It looks like the cpu has one thread that goes to 100% while the gpu shows no load.

 

edit-Just figured it out, uncheck Use hardware accelerated vid

eo encoding but leave Use hardware acceleration when available checked.  Immediately worked after doing this and cpu load is <20% (4 threads being used for VM so not necessarily just from transcoding) while gpu video load is ~8%.

 

This just helped me, thank you!

Link to comment

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.