Popular Post lotetreemedia Posted February 13, 2019 Popular Post Posted February 13, 2019 (edited) ***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 verbatim. I've fixed the code blocks below and all should be Plexing perfectly now Y =========== Granted this has been covered in a few other posts but I just wanted to have it with a little bit of layout and structure. Special thanks to [mention=9167]Hoopster[/mention] whose post(s) I took this from. What is Plex Hardware Acceleration? When streaming media from Plex, a few things are happening. Plex will check against the device trying to play the media: Media is stored in a compatible file container Media is encoded in a compatible bitrate Media is encoded with compatible codecs Media is a compatible resolution Bandwith is sufficient If all of the above is met, Plex will Direct Play or send the media directly to the client without being changed. This is great in most cases as there will be very little if any overhead on your CPU. This should be okay in most cases, but you may be accessing Plex remotely or on a device that is having difficulty with the source media. You could either manually convert each file or get Plex to transcode the file on the fly into another format to be played. A simple example: Your source file is stored in 1080p. You're away from home and you have a crappy internet connection. Playing the file in 1080p is taking up too much bandwith so to get a better experience you can watch your media in glorious 240p without stuttering / buffering on your little mobile device by getting Plex to transcode the file first. This is because a 240p file will require considerably less bandwith compared to a 1080p file. The issue is that depending on which format your transcoding from and to, this can absolutely pin all your CPU cores at 100% which means you're gonna have a bad time. Fortunately Intel CPUs have a little thing called Quick Sync which is their native hardware encoding and decoding core. This can dramatically reduce the CPU overhead required for transcoding and Plex can leverage this using their Hardware Acceleration feature. How Do I Know If I'm Transcoding? You're able to see how media is being served by playing a first something on a device. Log into Plex and go to Settings > Status > Now Playing As you can see this file is being direct played, so there's no transcoding happening. If you see (throttled) it's a good sign. It just means is that your Plex Media Server is able to perform the transcode faster than is necessary. To initiate some transcoding, go to where your media is playing. Click on Settings > Quality > Show All > Choose a Quality that isn't the Default one If you head back to the Now Playing section in Plex you will see that the stream is now being Transcoded. I have Quick Sync enabled hence the "(hw)" which stands for, you guessed it, Hardware. "(hw)" will not be shown if Quick Sync isn't being used in transcoding. PreRequisites 1. A Plex Pass - If you require Plex Hardware Acceleration Test to see if your system is capable before buying a Plex Pass. 2. Intel CPU that has Quick Sync Capability - Search for your CPU using Intel ARK 3. Compatible Motherboard You will need to enable iGPU on your motherboard BIOS In some cases this may require you to have the HDMI output plugged in and connected to a monitor in order for it to be active. If you find that this is the case on your setup you can buy a dummy HDMI doo-dad that tricks your unRAID box into thinking that something is plugged in. Some machines like the HP MicroServer Gen8 have iLO / IPMI which allows the server to be monitored / managed remotely. Unfortunately this means that the server has 2 GPUs and ALL GPU output from the server passed through the ancient Matrox GPU. So as far as any OS is concerned even though the Intel CPU supports Quick Sync, the Matrox one doesn't. =/ you'd have better luck using the new unRAID Nvidia Plugin. Check Your Setup If your config meets all of the above requirements, give these commands a shot, you should know straight away if you can use Hardware Acceleration. Login to your unRAID box using the GUI and open a terminal window. Or SSH into your box if that's your thing. Type: cd /dev/dri ls If you see an output like the one above your unRAID box has its Quick Sync enabled. The two items were interested in specifically are card0 and renderD128. If you can't see it not to worry type this: modprobe i915 There should be no return or errors in the output. Now again run: cd /dev/dri ls You should see the expected items ie. card0 and renderD128 Give your Container Access Lastly we need to give our container access to the Quick Sync device. I am going to passively aggressively mention that they are indeed called containers and not dockers. Dockers are manufacturers of boots and pants company and have nothing to do with virtualization or software development, yet. Okay rant over. We need to do this because the Docker host and its underlying containers don't have access to anything on unRAID unless you give it to them. This is done via Paths, Ports, Variables, Labels or in this case Devices. We want to provide our Plex container with access to one of the devices on our unRAID box. We need to change the relevant permissions on our Quick Sync Device which we do by typing into the terminal window: chmod -R 777 /dev/dri Once that's done Head over to the Docker Tab, click on the your Plex container. Scroll to the bottom click on Add another Path, Port, Variable Select Device from the drop down Enter the following: Name: /dev/dri Value: /dev/dri Click Save followed by Apply. Log Back into Plex and navigate to Settings > Transcoder. Click on the button to SHOW ADVANCED Enable "Use hardware acceleration where available". You can now do the same test we did above by playing a stream, changing it's Quality to something that isn't its original format and Checking the Now Playing section to see if Hardware Acceleration is enabled. If you see "(hw)" congrats! You're using Quick Sync and Hardware acceleration [emoji4] Persist your config On Reboot unRAID will not run those commands again unless we put it in our go file. So when ready type into terminal: nano /boot/config/go Add the following lines to the bottom of the go file modprobe i915 chmod -R 777 /dev/dri Press Ctrl X, followed by Y to save your go file. And you should be golden! Edited October 21, 2019 by techsperion formatting 46 43 12 Quote
puncho Posted February 17, 2019 Posted February 17, 2019 Thanks for the great, easy instructions! 1 Quote
MothyTim Posted February 26, 2019 Posted February 26, 2019 Hi, followed your instructions and /dev/dri is there with correct output, but no hw transcoding! When I try chmod -R 777 /dev/dri I get command not found! I tried with sudo and same error? Cheers, Tim 2 Quote
Fordarm Posted June 27, 2019 Posted June 27, 2019 Hi thanks for your great guide. According to plex's definition, they don't support QSV at linux but only support at windows. But seems you made it working. Do I understand correctly? Quote
Taddeusz Posted June 27, 2019 Posted June 27, 2019 6 hours ago, Fordarm said: Hi thanks for your great guide. According to plex's definition, they don't support QSV at linux but only support at windows. But seems you made it working. Do I understand correctly? They support it just fine. I've used QSV with the Plex Docker with both an older Ivy Bridge i5 3470 and my current Coffee Lake i5 8400. It works great! Quote
kimocal Posted July 12, 2019 Posted July 12, 2019 Just reporting that this worked great for me on my headless ThinkServer TS140 server with a Xeon CPU E3-1245 v3. Thanks again. Quote
SpecFroce Posted July 13, 2019 Posted July 13, 2019 Is there a equalent GPU acceleration plugin for AMD graphics cards? I have a rx 570 that would love to do GPU acceleration. I got so frustrated with Nvidia that i returned the used GTX 1060 i purchased to the seller after a long error 43 battle. So i´m not interested in buying Nvidia hardware again. Quote
nasforthemass Posted July 13, 2019 Posted July 13, 2019 WOW!!! I clicked on this out of curiosity, but this little piece of info regarding HDMI dummy plugs is going to make my remote-VM life so much better! was so tired of constantly readjusting the resolution of my OSX VM. thank you!!! here's an updated link of the product, perhaps @techsperion could update his link!https://www.amazon.com/Display-Emulator-Headless-Display(Fit-Headless-1920x1080-3840x2160/dp/B074NNZYW4 1 Quote
lotetreemedia Posted July 14, 2019 Author Posted July 14, 2019 WOW!!! I clicked on this out of curiosity, but this little piece of info regarding HDMI dummy plugs is going to make my remote-VM life so much better! was so tired of constantly readjusting the resolution of my OSX VM. thank you!!! here's an updated link of the product, perhaps [mention=88230]techsperion[/mention] could update his link!https://www.amazon.com/Display-Emulator-Headless-Display(Fit-Headless-1920x1080-3840x2160/dp/B074NNZYW4 Thanks buddy. Updated the post with your link. Hope your Hackintosh works okay Sent from my iPhone using Tapatalk Quote
niomar Posted August 2, 2019 Posted August 2, 2019 I followed the instruction but it is still not working. I can see that plex can see the iGPU but for some reason it is not using it Quote
lotetreemedia Posted August 2, 2019 Author Posted August 2, 2019 3 hours ago, niomar said: I followed the instruction but it is still not working. I can see that plex can see the iGPU but for some reason it is not using it All looks good in the terminal. How have you established it's not working? If you change the playback settings to a non native one and check the Now playing section - What does it show? Share the screen shot if possible. Quote
Toobie Posted August 7, 2019 Posted August 7, 2019 Just to double check - is my hardware transcoding really working? Quote
lotetreemedia Posted August 7, 2019 Author Posted August 7, 2019 Just to double check - is my hardware transcoding really working?It is indeedThe public only see the accomplished trick;They have no conception of the torturous preliminary self-training that was necessary to conquer that fear. - J.C Cannell, The Secrets of Houdini 1 Quote
niomar Posted August 8, 2019 Posted August 8, 2019 (edited) On 8/2/2019 at 4:01 PM, techsperion said: All looks good in the terminal. How have you established it's not working? If you change the playback settings to a non native one and check the Now playing section - What does it show? Share the screen shot if possible. It says only transcoding without the hw. when i use my gpu it says transcoding hw. I have the iGPU set as primary in the bios that is no problem right? Edited August 8, 2019 by niomar Quote
ramblinreck47 Posted August 9, 2019 Posted August 9, 2019 3 hours ago, niomar said: It says only transcoding without the hw. when i use my gpu it says transcoding hw. I have the iGPU set as primary in the bios that is no problem right? What processor are you using? Does your motherboard have IPMI? Quote
niomar Posted August 9, 2019 Posted August 9, 2019 3 hours ago, ramblinreck47 said: What processor are you using? Does your motherboard have IPMI? I have a Asrock Z390 Extreme 4 with a I7 - 8700 cpu Quote
lotetreemedia Posted August 9, 2019 Author Posted August 9, 2019 9 hours ago, ramblinreck47 said: What processor are you using? Does your motherboard have IPMI? Sorry, what do you mean by when you use your GPU it says transcode HW? Are you passing your GPU to the container? are you booting unRAID in non GUI? Have you got any other containers that could be using your iGPU? Also is iGPU enabled in the bios? Quote
niomar Posted August 9, 2019 Posted August 9, 2019 21 minutes ago, techsperion said: Sorry, what do you mean by when you use your GPU it says transcode HW? Are you passing your GPU to the container? are you booting unRAID in non GUI? Have you got any other containers that could be using your iGPU? Also is iGPU enabled in the bios? I user to have a GTX 1060 passed to the plex docker and that was working fine. I removed it. Unraid is running non GUI and iGPU is enabled in the bios. Quote
lotetreemedia Posted August 9, 2019 Author Posted August 9, 2019 4 hours ago, niomar said: I user to have a GTX 1060 passed to the plex docker and that was working fine. I removed it. Unraid is running non GUI and iGPU is enabled in the bios. Ah okay - Are you back on stock unRAID now? btw just saw Slaapkamer XD is jy afrikaans? Quote
niomar Posted August 9, 2019 Posted August 9, 2019 11 minutes ago, techsperion said: Ah okay - Are you back on stock unRAID now? btw just saw Slaapkamer XD is jy afrikaans? Not on stock unraid, should i do that? hahah no i am Dutch from the Netherlands Quote
lotetreemedia Posted August 9, 2019 Author Posted August 9, 2019 Just now, niomar said: Not on stock unraid, should i do that? hahah no i am Dutch from the Netherlands I’m not sure if that’s messing with things. Have you got a spare usb lying around to install a test unRAID with? Quote
niomar Posted August 9, 2019 Posted August 9, 2019 8 minutes ago, techsperion said: I’m not sure if that’s messing with things. Have you got a spare usb lying around to install a test unRAID with? Yes i have. I will make a new usb to test with. Quote
niomar Posted August 10, 2019 Posted August 10, 2019 On 8/9/2019 at 6:23 PM, techsperion said: I’m not sure if that’s messing with things. Have you got a spare usb lying around to install a test unRAID with? I got it working now! i needed to uninstall the nvidia version of unraid (back to stock) and that did the trick! thank you for helping 1 Quote
ZiemaF Posted August 14, 2019 Posted August 14, 2019 Great instruction !! I used it for EMBY and Hadrware Transcoding also works. Thank you 1 Quote
Recommended Posts
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.