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


Recommended Posts

Hell Unraid community. I've had my setup for a few years now and am finally configuring my rig (or trying) to enable hardware transcoding (not just for Plex but for other apps like Photoprism as well), but I'm not getting anywhere so I'm asking for help.

 

The problem I'm having is in /dev/dri/ I only see by-path/ and card0 nothing else. I also checked my bios and only have an 'onboard' or off board option, so I have 'onboard' selected. Not sure if this is the right choice since the mobo does have Matrox onboard graphics, but not sure if off board would work (there's also a jumper for vga on the motherboard that is set to on). If anybody had an idea, I'm all ears.

 

Here are my diagnostics zuse-diagnostics-20240212-2148.zip, but in short my CPU is a Quick Sync supported Xeon E31260L 2.40GHz installed on a Supermicro X9SCM-F motherboard 

 

The supermicro has the latest bios (2.3a) and my Unraid is on 6.12.6. I also have intel-gpu-top and I blacklisted i915 via

echo "blacklist i915" > /boot/config/modprobe.d/i915.conf 

and rebooted.

 

Again I'm all ears for idea, thanks in advance!

Link to comment
  • 1 month later...

Hi there -- I have a Beelink SEi12 with an i5 12450H in it.  I installed the Plex-Media-Server container and moved my plex data over from my Synology.  So far, so good. What isn't good is that nothing I do will make the container use the iGPU.  It is always using the CPU to transcode. I have a plex pass.  I am passing /dev/dri as a device.  Nothing.  I am at wits end and about to abandon this unraid adventure as it shouldn't take a day to make something work.  I could use some advice/help on what I can look at. If I can't solve it this weekend, I'm going to just buy a bigger synology and move on with my life.

Link to comment
59 minutes ago, rickeames said:

I am at wits end and about to abandon this unraid adventure as it shouldn't take a day to make something work

You make the assumption this has something to do with Unraid.  The only thing Unraid has to do with Plex transcoding is loading the i915 drivers.

 

On some motherboard BIOS (I am not familiar with yours), the primary graphics adapter must be set to the iGPU.  If set to Auto, the i915 drivers will not load.

 

Every once in a while Plex breaks transcoding.  I just tested it with Unraid 6.12.9 and Plex and transcoding is working properly for me.

 

- It is unclear exactly which Plex docker container you have installed.  There are several in Apps.  Which one are you using?

 

I assume much of this is setup correctly or you would not get CPU transcoding.

 

- Have you verified that i915 drivers are active and that /dev/dri is being created with the proper contents?  Should look similar to image below (don't worry if card1 is missing). Passing /dev/dri as a device does nothing if no /dev/dri and its contents exist. 

image.png.a1c1cc275cf886dd38e82a611f1f4fb4.png

 

- What does your docker run command look like?  Any errors?

 

- Have you set up a transcode path in Plex docker config and are you using it in Plex configuration? Mine looks like this as I am transcoding in RAM

 

image.png.8ed0f48b35157d6fadad025dbfb8600a.png

 

In Plex config:

image.png.c4d7ab135cb20fd0a3148a7a090d7a3d.png

 

if all of this is setup properly, Plex should hardware (iGPU) transcode media that is not in a format that can direct play in the client.

 

 

Edited by Hoopster
Link to comment

Thank you for responding. Here is my /dev/dri directory:

 

image.png.1d244f7238a157b3d2daf2d3cb5b0888.png

 

I have tried both binhex-plexpass and Plex-Media-Server (official). Here is my setting for transcodes:

 

image.thumb.png.5bdc9518e2ba1ef9051236767e9ffd95.png

 

image.thumb.png.7054da627806775105c01d1f4a6b43ba.png

 

All of this set, and when I play a file and downgrade it on purpose to transcode:

 

image.png.96da69f57c99725c247f776cb4dc82a8.png

 

Are there logs somewhere that would show me errors or what could possibly be going wrong?  Everyone else seems to think this is solved by just doing --device='/dev/dri' yet that hasn't done anything for me.  

 

Again, thank you for the help.

 

Link to comment

FWIW, I can get tdarr to use the iGPU, also via docker, by putting "device='/dev/dri'" just fine.  It's plex, which is making me start to wonder if somehow my "plex pass" isn't granting the container the rights to use the hardware encoding. Not sure how to debug that.  I moved my Plex folder over from my old install.  Plex is supposed to look for your plex pass and grant the container permission...but how do you check it?

Link to comment
12 hours ago, rickeames said:

Everyone else seems to think this is solved by just doing --device='/dev/dri' yet that hasn't done anything for me.  

How are you passing /dev/dri to Plex container?  It appears from what you are saying that /dev/dri exists but is not being used by your Plex docker container.

 

Are you putting ---device /dev/dri:/dev/dri in the Extra Parameters line of the container config? (may depend on Plex container you are using)

image.thumb.png.fc330222cc0f76126b4c5f503ceb5d5a.png

 

Or are you adding it as a device like this?

image.png.d7290dfb575350a5501db90f46a0aa4c.png

 

I have used both methods but I am currently using the second (device configuration) method.

 

I am using the Linuxserver version of the Plex docker so, perhaps whatever you are using may have slightly different configuration options.

 

Do you see these checkboxes in the Plex Transcoder configuration? if you see these and can select them, that usually means you have an active Plex Pass.

image.thumb.png.1f1d5c1c48c644e812a3aca6985962c4.png

 

Link to comment

Hi all. I've read through most of this thread, but I'm still having trouble. I'm running the binhex-plex image of Plex 1.40.1.8227 on Unraid 6.12.9 running on Topton motherboard with Intel N5105. I have the INTEL-GPU-TOP and GPU Statistics plugins installed.

 

The Unraid OS portion of my /boot/syslinux/syslinux.cfg file:
 

label Unraid OS
  menu default
  kernel /bzimage
  append i915.enable_fbc=1 i915.enable_guc=2
  append initrd=/bzroot

 

The contents of my /boot/config/modprobe.d/i915.conf file:
 

options i915 enable_fbc=1 enable_guc=2

 

After adding those, as specified in a previous post, I rebooted my server and I then had the /dev/dri directory. I added the device to my Plex config and when I loaded Plex, I was able to select my Jasper Lake GPU as the transcoder. I thought everything was going great until I found that media is buffering a lot whenever I have "Use hardware-accelerated video encoding" checked.

 

- Without that box checked, media plays without issue, but is heavy on my CPU. Running intel-gpu-top shows that the "Video" engine is working heavily, but no other engines are active. Dashboard shows that hardware transcoding is only taking place on decoding.

- With it checked, the CPU utilization goes down significantly, but I get a lot of buffering. Running intel-gpu-top shows that the "Video" and "VideoEnhance" engines are both active. Dashboard shows that hardware transcoding is taking place on both decoding and encoding

 

Subtitle burn-in isn't an issue, as I've confirmed the same behavior when subtitles are used with external SRT and when they're off completely. 

 

I'm not sure what other info to provide. Any help would be much appreciated. Thanks!

Link to comment

Yeah, I am seeing those...after a lot of dinking around last night, I finally saw this in the plex logs whenever I try to force a transcode.  I am certain, at this point, that something inside the container is having issues getting to the drivers properly. I am, once again, going to try a fresh transfer and see what the problem is.  Tdarr finds the iGPU just fine, so the problem isn't in unraid, it's in the plex container.  

 

 

[Req#6a7/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error)

Req#6a7/Transcode] [FFMPEG] - libva: /config/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64/i965_drv_video.so init failed

 

When I cleared the cache and rebooted the container, I just get the "Failed to initialise VAAPI..." message.  

 

I suspect when I copied over my Plex Media Server folder, as they instruct you to do on the plex site when moving between machines, something messed up the install.  As I tried the same folder with both binhex and the "official" container, that has to the be issue.  I just wanted to preserve my playlists and "watched/unwatched." 

 

Update: tonight I started over and rescanned everything instead of moving the Plex folder from my old install.  That solved the problem.  I followed the plex directions entirely and it completely didn't work.  Weird. Thanks for the help everyone...live and learn every single day with this.

 

Edited by rickeames
Link to comment
  • 4 weeks 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.