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


Recommended Posts

3 hours ago, drogg said:

So we don't need to run your script anymore (which worked wonders btw) and can instead just follow the new docker image?

Actually, the old script doing compilation eats CPU and takes long time to execute, at least in my environment, but it has the nice ability to be really adapted to Docker in Unraid, so it actually doesn't break anything (hopefully), and so can be used still.

 

The new script on the other hand, is much faster as no requiring compilation, and the GPU driver is officially supported by Intel, so by many aspect it's providing a better solution. But it's not fully adapted to Docker GUI in Unraid, and brakes the fancy container update process, so it requires a manual process for each upgrade of the LSIO Plex container

 

This is the full formal upgrade process by using this script:

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

Then from Unraid Docker tab, switch to ADVANCED VIEW mode with the little switch on the top right.

And then click on "force update" for the Plex container.

 

At the end you can choose which solution suits best your needs !

😉

Link to comment

What's the long term solution here?  Is it an update in the Unraid core, or simply an updated Plex container (or both)?  For now, the set of commands requiring compilation works perfectly for me, but I have to run them when I update the Plex container (I think).  In the future, will the new container handle this?

Link to comment

Hello,

 

It seems LSIO updated its Plex container which now includes up-to-date intel drivers, working with the last Plex version with HW transcoding and HDR tone mapping support.

If you previously used my 1st script, you can remove it and update Plex container, if you used the one which requires to create an intermediate image, just edit the container configuration, and remove ":opencl" at the end of "Repository" keeping only "linuxserver/plex", then click on apply.

It should download properly everything again and put you back in the original track.

This may leave you with 2 orphan images visible in the docker tab, which can be removed from the advanced view.

 

Link to comment
  • 3 weeks later...
On 12/10/2020 at 6:32 AM, Jbail804 said:

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. 

I'm having the same issue

Link to comment
  • 2 weeks later...

Hi. Thanks for posting detailed guide.

I have i-8700 with ASUS B360-I

 

I could not get hw to work.

My Bios: iGPU is enabled

terminal commands in UNRAID execute correctly.

edited Plex container and added Drive with mapping

Name: /dev/dri

Value:/dev/dri

 

Transcoding doesn't show (hw)

 

Also tried

Name: /dev/dri

Value:/dev/dri/     (note ending forward slash which was auto added, since I picked the folder from a dropdown list)

 

doesn't work.

 

Also tried

Name: /dev/dri/

Value:/dev/dri/ 

 

doesn't work.

 

Any help?

6045D845-05B4-4CF7-B0AD-A12FB2711176.jpg

Link to comment
29 minutes ago, tmor2 said:

edited Plex container and added Drive with mapping

You have Plex Pass and have enabled hardware acceleration in Plex server, correct? I assume so since it is mentioned in the guide. but we just need to verify this.

 

I use the Extra Parameters method, but, the device method should also work.

 

image.thumb.png.35b8f7797f934a759b8b6e05526abf21.png

Edited by Hoopster
Link to comment
10 hours ago, Hoopster said:

You have Plex Pass and have enabled hardware acceleration in Plex server, correct? I assume so since it is mentioned in the guide. but we just need to verify this.

 

I use the Extra Parameters method, but, the device method should also work.

 

image.thumb.png.35b8f7797f934a759b8b6e05526abf21.png

 

Ops. I don't have Plexpass. I'll get one though.

Edited by tmor2
Link to comment
On 1/17/2021 at 3:10 PM, tmor2 said:

 

Ops. I don't have Plexpass. I'll get one though.

@tmor2 Did this fix it?  I have the same CPU as you, and I'm considering to move it to my unraid tower.  Any chance you could confirm if you can get HW x265 4k HDR --> 1080p SDR with tone mapping encoding to work with the iGPU?  Very much appreciated.

Link to comment
On 1/20/2021 at 10:23 PM, DingHo said:

@tmor2 Did this fix it?  I have the same CPU as you, and I'm considering to move it to my unraid tower.  Any chance you could confirm if you can get HW x265 4k HDR --> 1080p SDR with tone mapping encoding to work with the iGPU?  Very much appreciated.

I haven't gotten Plex Pass yet, so I cannot confirm it works for Plex.

I did add the path for HW acceleration driver for Jellyfin docker, but it is still transcoding without HWA. Maybe Jellyfin doesn't support HWA?

Link to comment
8 hours ago, tmor2 said:

I haven't gotten Plex Pass yet, so I cannot confirm it works for Plex.

I did add the path for HW acceleration driver for Jellyfin docker, but it is still transcoding without HWA. Maybe Jellyfin doesn't support HWA?

@tmor2 I can confirm HW accel does work when you get the plex pass.  I've got your exact setting above, and it works great.  However I'm still on on old i5-3570k so I'm really curious about the 4k encoding on the newer processor.  Let us know when you can.

Link to comment
15 minutes ago, DingHo said:

@tmor2 I can confirm HW accel does work when you get the plex pass.  I've got your exact setting above, and it works great.  However I'm still on on old i5-3570k so I'm really curious about the 4k encoding on the newer processor.  Let us know when you can.

 

I can transcode in hardware 5 4K HDR streams concurrently on my i5-9600k with embedded UHD630, as I mentioned a few weeks ago:

 

Link to comment
  • 5 weeks later...

To anyone who is having trouble with the modified go file saving the changes after a system restart, you may be making the same stupid mistake as me. When you edit your go file via the terminal with "nano /boot/config/go", you then add the line "modprobe i915", and the you press CTRL+X to save, followed by Y to accept. According to the first post of this thread, "And you should be golden!"

If you are new to all this, like me, you have probably just closed the window afterwards thinking all was good. After many unsuccessful attempts, I finally noticed that after following these steps, a line of text appears in the bottom of the command window the terminal :unraid.thumb.jpg.329ca32523b360d3ef40a01e8f9bf4f7.jpg

At this point, you just need to press Enter and the file will be saved. And then you can close the window...

This must seem pretty basic for most of you, but hey...you gotta start somewhere :)

 

Edited by gustomucho
  • Like 3
Link to comment
25 minutes ago, gustomucho said:

To anyone who is having trouble with the modified go file

Or you could just export your flash drive (secure or private if there are other users who have access to your server on the LAN) and edit it with Notepad or Notepad++ on Windows.  No dealing with nano, vi or other command line driven Linux text editors.

 

That's what I do.

Link to comment

Gah; I can't get mine working! I can see the listing in /dev/dri -> ls, did a modprobe i915, added the /dev/dri to devices in the settings. When I used "docker exec -it plex ls -lh /dev/dri" in the console, it returns both my iGPU as well as my PCIE GPU: image.png.e327778a0e94457b582364e6159cef2c.png

Still, it doesn't work off the iGPU and instead continues to software transcode. I made sure to as well establish the transcoding is enabled in Plex.

image.png.6e57389180842f0065d4f103d64ec358.png

 

For context, I'm using the ASRock C236 WSI paired with the i7-7700K, with my 3060ti thrown into the PCIe slot.

I assume that the iGPU does exist and is usable, since I went ahead and installed Handbrake and added the /dev/dri to its devices. It does show it as an option in the Video Encoder: image.png.1cff21d5af87789384fd34596bd2265a.png

Edited by Zendikar
Link to comment

hi, sorry in advance for my english, i hope to be able to explain myself well.
I have a problem with plex transcoding.
my build is:

 

Unraid 6.9.0 (i had the same problem with 6.8)

linuxserver/plex

ASUS Prime H310I-PLUS R2.0 
I3-9100
Crucial RAM CT16G4DFRA266 16GB DDR4 2666


I believe I have configured everything correctly as follows:

 

Untitled.jpg.d273babda29b006344ccb8520d172709.jpg


The appdata use cache pool.

 

But it doesn't work, i see the trascode in plex

 

TranscodeHW.jpg.16e5915c9dce484083097d242f597431.jpg

 

the stream never starts and seems just to buffer up to 8 seconds.

 

NeverStarts.jpg.74cf3f52bbe90b15ef31dec1a7327085.jpg
 

I tried to look for the plex logs a bit (tail -f PlexMediaServer.log | grep Transcode
), below a printscreen

 

log.thumb.jpg.5138efe729827c487e2b6104c06df074.jpg

 

Anyone have any suggestions?

Edited by Arte83
missing info
Link to comment
  • 2 weeks later...

This guide by lotetreemedia has been very helpful for me, but starting with unRAID 6.9.x the steps that are unraid specific should be done differently because unRAID has implemented GPU drivers.  Everything lotetreemedia says to do in PLEX is still valid, but activating the driver is different.  If you have lines in your "go" file you should remove them and change unRAID as follows:

 

https://wiki.unraid.net/Unraid_OS_6.9.0#GPU_Driver_Integration

 

Quote

Unraid OS now includes selected in-tree GPU drivers: ast (Aspeed), i915 (Intel), amdgpu and radeon (AMD).  For backward compatibility, these drivers are blacklisted by default via corresponding conf files in /etc/modprobe.d:




/etc/modprobe.d/ast.conf

/etc/modprobe.d/i915.conf

/etc/modprobe.d/amdgpu.conf

/etc/modprobe.d/radeon.conf

 

Each of these files has a single line that blacklists the driver, preventing it from being loaded by the Linux kernel.

It is possible to override the settings in these files by creating a custom conf file in the config/modprobe.d directory on your USB flash boot device.  For example, to un-blacklist the amdgpu driver create an empty file by typing this command in a Terminal session:




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

This only needs to be done once, it does not need to be added to your go script.


In 6.9.1, if your go script contains a modprobe command for your GPU and/or a command to fix the permissions on /dev/dri, you should remove them:



modprobe amdgpu 
chmod -R 777 /dev/dri

In 6.9.0, if the docker you are using is unable to access the GPU, add/keep this line to your go script:

 



chmod -R 777 
/dev/dri

but remove this one:



modprobe amdgpu

 

 

After completing lotetreemedia 's steps in the PLEX docker, all I had to do to get QuickSync working with 6.9.1 was remove the lines from my "go" file and create a file in \flash\config\modprobe.d\i915.conf.  The i915.conf file is just empty.

 

craigr

Edited by craigr
  • Like 1
  • Thanks 1
Link to comment
On 3/15/2021 at 5:20 PM, craigr said:

This guide by lotetreemedia has been very helpful for me, but starting with unRAID 6.9.x the steps that are unraid specific should be done differently because unRAID has implemented GPU drivers.  Everything lotetreemedia says to do in PLEX is still valid, but activating the driver is different.  If you have lines in your "go" file you should remove them and change unRAID as follows:

 

https://wiki.unraid.net/Unraid_OS_6.9.0#GPU_Driver_Integration

 

 

After completing lotetreemedia 's steps in the PLEX docker, all I had to do to get QuickSync working with 6.9.1 was remove the lines from my "go" file and create a file in \flash\config\modprobe.d\i915.conf.  The i915.conf file is just empty.

 

craigr

 

Thanks a lot @Craig, I should have payed more attention to the release note. After completing the steps you linked all is back to normal.

 

Thanks again!

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.