Jump to content
linuxserver.io

[Plugin] Linuxserver.io - Unraid Nvidia

1047 posts in this topic Last Reply

Recommended Posts

On 5/4/2019 at 6:13 AM, maxse said:

Hey guys,

I need some pleaseeee! So I jumped on a Dell sale for a p2000 about a month ago and just didn't have a chance to set it up with unraid although I did install it into my server.

 

Well I followed the instructions and I can't get the plugin to recognize it. "NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.   "

 

I then typed lspci -v, and it wasn't even listed, so unraid doesn't see the card? I went into the BIOS on my relatively new motherboard that I just bought, and it was already set to use the PCIE as the main graphics card and multimonitor was set to disabled (I currently have an i8400 and was using the igpu to transcode before. Even doing this, still the same result...

 

The fan on the card itself is spinning so I'm assuming that means the card is getting power? Could it be something wrong with my motherboard when both PCI slots are being used? (I'm using an IBM m1015 flashed to IT). I'm not sure what all this means. I would really appreciate some help guys. I'm running an ASRock H370M Pro4 board if that helps with the most recent BIOS

 

I faced similar issue but I solved it. In my case, its a supermicro motherboard, and the motherboard was considering GPU as primary onboard card. No matter what I did, nothing could've solved the issue.

 

After a while, I removed all the cards (GPU, HBA, NIC, etc.) off the motherboard and updated bios (reflashed it) and unchecked all preserve options. The issue disappeared. GPU is working and drivers are recognized.

 

Maybe you should try this too?

Share this post


Link to post
Posted (edited)

Had issues with upgrading before (breaks Plex with driver 430.14 on my GTX 760 ti). I decided to give it another shot, and finding the same issue. 

 

Doing some digging, inside the plexinc/pms-docker:plexpass PlexMediaServer console doing echo on $NVIDIA_VISIBLE_DEVICES shows correctly and correlates to the right GPU. Nvidia-smi also displays the following:

-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.14       Driver Version: 430.14       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 760     Off  | 00000000:01:00.0 N/A |                  N/A |
|  0%   39C    P0    N/A /  N/A |      0MiB /  4036MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+
# nvidia-smi -L
GPU 0: GeForce GTX 760 (UUID: GPU-0d08588b-ca46-2038-8a4a-e153e77972e6)
# echo $NVIDIA_VISIBLE_DEVICES
GPU-0d08588b-ca46-2038-8a4a-e153e77972e6

When trying to load any 4k video streams in Chrome via Plex (knowing it will require transcoding) it fails to load stating: 

An error occurred trying to play "XXXXXX".

Error code: s1002 (Network)

 

My TV that is left up also appears to flash, or reload, the screen every time I do this on the laptop.

 

Going into the Plex settings and unchecking 'Use hardware acceleration when available' fixes the issue, but then I'm not using the GPU for transcoding and relying on my old 4790k processor.

 

Any suggestions for debugging this? It works until I upgrade Unraid (really would prefer moving forward than staying unpatched). No configuration settings are changed. I verified the extra parameters are set as well. I am running the 'beta' version of Plex with the current installation being Version 1.16.3.1433

Edited by jbreed

Share this post


Link to post
9 hours ago, jbreed said:

Had issues with upgrading before (breaks Plex with driver 430.14 on my GTX 760 ti). I decided to give it another shot, and finding the same issue. 

 

Doing some digging, inside the plexinc/pms-docker:plexpass PlexMediaServer console doing echo on $NVIDIA_VISIBLE_DEVICES shows correctly and correlates to the right GPU. Nvidia-smi also displays the following:


-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.14       Driver Version: 430.14       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 760     Off  | 00000000:01:00.0 N/A |                  N/A |
|  0%   39C    P0    N/A /  N/A |      0MiB /  4036MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+

# nvidia-smi -L
GPU 0: GeForce GTX 760 (UUID: GPU-0d08588b-ca46-2038-8a4a-e153e77972e6)

# echo $NVIDIA_VISIBLE_DEVICES
GPU-0d08588b-ca46-2038-8a4a-e153e77972e6

When trying to load any 4k video streams in Chrome via Plex (knowing it will require transcoding) it fails to load stating: 

An error occurred trying to play "XXXXXX".

Error code: s1002 (Network)

 

My TV that is left up also appears to flash, or reload, the screen every time I do this on the laptop.

 

Going into the Plex settings and unchecking 'Use hardware acceleration when available' fixes the issue, but then I'm not using the GPU for transcoding and relying on my old 4790k processor.

 

Any suggestions for debugging this? It works until I upgrade Unraid (really would prefer moving forward than staying unpatched). No configuration settings are changed. I verified the extra parameters are set as well. I am running the 'beta' version of Plex with the current installation being Version 1.16.3.1433

Your GPU doesn't support 4k hvec transcoding.

https://developer.nvidia.com/video-encode-decode-gpu-support-matrix

Share this post


Link to post
On 2/11/2019 at 9:11 PM, MowMdown said:

 

Just go to the docker screen, click at the bottom "add container" click your plex template and change the the name of the container to Plex(iGPU) and then just edit the parameters to the iGPU settings. Now you can have two containers with each gpu hardware transcoding capability.

 

For some reason this dosent work anymore having two different dockers running?

1) Plex GPU (Works perfectly with the Nvidia P2000)

2) *Plex iGPU (But for some reason the iGPU have stopped working all is CPU transcoding)

 

*I Use this when I have to use the GPU for my VM, stop one start the other one

 

I saw someone in a different post saying that it was necessary to also define a video device in the docker conf.

Like this

image.thumb.png.5c23a2130e3d0db507c1cbedfd4bbe51.png

with the:

image.png.37766f3f92dcb64a546d4d8f85ef38a4.png

 

I still have the same GO changes like before...

image.png.5421b120611018716d61d792f410276b.png

 

So have anything else changed? (Some time since I startet the iGPU version up 🙂

 

Share this post


Link to post
3 hours ago, jbreed said:

hmm makes sense.

 

What doesn't make sense is that it worked on 6.7.0 with 418.56 drivers and breaks when going to 6.7.1 or 6.7.2.

Change in the driver I suspect.

Share this post


Link to post
Posted (edited)

Hi everyone,

 

I know it was mentioned to not discuss the nvidia decode scripts here, but I don't see another topic that covers this.

 

I setup my new GPU (GTX 1660) and have added it to my Plex docker. When I enable hardware transcoding, I can see it is using the GPU to encode properly. I then tried the script here - Unraid Decode Script - and it appears to work correctly. I can see the patch in the container, as well as the new "Plex Transcoder" file (which has both h264 and hevc in the allowed codecs). The output from running the script says it applied successfully.

 

But, when I try to transcode any h264 files, I still only see the hw for encoding and the CPU starts ramping up do to the decode. I also used top during a transcode and I see Plex Transcoder is being used, not Plex Transcoder2 (original). I've tried restarting the container, force updating the container and running the script again, reboot unraid server, etc but no luck.

 

Any idea where I am going wrong?

 

*Correction* Running nvidia-smi dmon -s u shows dec being used, but I do not see the decode hw in the Plex monitoring. Is that normal? Also, is CPU usage still supposed to be high? Thanks!

Edited by MandalorePatriot

Share this post


Link to post
Hi everyone,
 
I know it was mentioned to not discuss the nvidia decode scripts here, but I don't see another topic that covers this.


If it was said not to discuss it here, why not create a new topic?

Share this post


Link to post
18 minutes ago, tmchow said:

 


If it was said not to discuss it here, why not create a new topic?

And where would I create said topic that asks for help about a specific script that only applies to this plugin?

Share this post


Link to post
9 minutes ago, MandalorePatriot said:

And where would I create said topic that asks for help about a specific script that only applies to this plugin?

 

Share this post


Link to post
1 minute ago, uldise said:

 

Thank you, I'll post there. I do have to say the reason I didn't post there originally is because I couldn't find it, even doing forum/Google searches.

Share this post


Link to post

I tried to get an Nvidia P2000 installed and working today, but came up short.  

 

I switched to the linuxserver.io Plex app.   I installed the P2000, installed the Nvidia plugin and the card was found and installed.

I watched one of the youtube tutorials, and maybe that introduced a problem.   I initially added the --runtime...  line in the extra parameters, but reading this forum later, it looks like if I am using the Linuxserver.io Plex app, that was not necessary, so  I deleted that line later.

 

It took me a few unfortunate hours trying to figure out how to get the command window to work, turns out I think it is a Safari bug as it works find under Firefox, ... :(    In that process I tried to redo security, etc, thinking it was some other issue.  Complete waste of time.

 

So after moving to FireFox, I thought I was all set.  But no matter what I do, when I watch nvidia-smi, no process is running on the GPU card.    Most everything I tried to play was direct stream, but downgraded the video quality on one of my players and it is transcoding, just not using the P2000.   I am hoping when I finally figure it out that it will use the GPU for transcoding movies syncing to my iPad.    So I am giving up for today.  I have gone through the setup steps a few times, no good.

Share this post


Link to post

@Ross you added the variables with their values in your Plex docker settings in unraid webUI ?  Also I suppose you checked the checkbox in the Plex server settings to use hardware transcoding if available?

Share this post


Link to post

I checked the Plex checkbox

 

I added the GPU I’d from the nvidia plugin to the field in the plex docker setup.  I initially also added the runtime ref in the extra spot, but reading the latest directions, because I am using the linuxserver.io Plex docker, it sounded like all I had to do was put in the GPU info in the one spot and restart.   Do I need to do the other items even though I am using the linuxserver.io Plex docker?

 

thanks for any suggestions 

 

Ross

Share this post


Link to post
4 hours ago, Ross said:

I checked the Plex checkbox

 

I added the GPU I’d from the nvidia plugin to the field in the plex docker setup.  I initially also added the runtime ref in the extra spot, but reading the latest directions, because I am using the linuxserver.io Plex docker, it sounded like all I had to do was put in the GPU info in the one spot and restart.   Do I need to do the other items even though I am using the linuxserver.io Plex docker?

 

thanks for any suggestions 

 

Ross

 

You could start by reading the first posts of this thread.

--runtime=nvidia must be used or else it's not working. It's the variables that you can drop if you are using our container.

 

Share this post


Link to post

But that’s not in the 4 steps (with two numbered as step 3)  listed if you are using the linuxserver.io container.  That’s part of the reason I posted this, is that step missing.

———————- from top of forum

With new installs of any of these containers from LinuxServer.io we have simplified the process of getting this working.

 

 1.  Add the desired Application from CA.

2.  Switch the template to advanced mode

3.  Copy the GPU UUID to the existing NVIDIA_VISIBLE_DEVICES parameter

3.  Start the container.”

————

I checked above that and it only discusses installing the Nvidia plugin.  

 

Is there a step missing?

 

thanks

 

Ross

Share this post


Link to post
10 minutes ago, Ross said:

But that’s not in the 4 steps (with two numbered as step 3)  listed if you are using the linuxserver.io container.  That’s part of the reason I posted this, is that step missing.

———————- from top of forum

With new installs of any of these containers from LinuxServer.io we have simplified the process of getting this working.

 

 1.  Add the desired Application from CA.

2.  Switch the template to advanced mode

3.  Copy the GPU UUID to the existing NVIDIA_VISIBLE_DEVICES parameter

3.  Start the container.”

————

I checked above that and it only discusses installing the Nvidia plugin.  

 

Is there a step missing?

 

thanks

 

Ross

 

You always need to use the --runtime=nvidia if you want the drivers to be available to the container. So the one that wrote the steps in the first posts forgot that.

And I also forgot that you need to add the GPU string for the GPU you want to pass through.

Share this post


Link to post
Posted (edited)

Installed an Nvidia P2000 tonight into my box and got this seemingly working after adding the --runtime=nvidia and gpu ID.  I played a video through Plex app on my iphone and forced it to transcode by selecting a lower res (720p vs 1080p original movie).  In the plex dashboard, I confirmed "(hw)" appears next to the transcode line, and running watch nvidia-smi on the unraid command line showed the plex transcoder process!

 

One question I did have was that I had a pretty large spike in CPU utilization, presumably because of audio decoding.  My CPU is a Xeon E3-1246 v3 3.5Ghz.

 

In this screenshot, you'll see the first 40% spike when it was playing one 1080p movie (hw transcoding video to 720p) and audio was transcoding. The second spike to approx 80% was when I played a second 1080p movie on another device (again, hw transcoding video to 720p) and audio was also transcoding.  After about 30s of each, the CPU utilization dropped back down to what appears to be ~5-10%.

 

image.thumb.png.f15a11db476a903d5e3f9972a76e7538.pngimageproxy.php?img=&key=00b562fcac28e727imageproxy.php?img=&key=00b562fcac28e727imageproxy.php?img=&key=00b562fcac28e727

 

This was what the dashboard was showing while I was playing both movies:

 

image.thumb.png.71f69e6ea3f215a64a7af16c87b673c6.png

 

  • Is this CPU utilization spike expected? Is this because of the audio transcoding?
  • If so, why does it spike then drop back down? I would've expected it to stay high if it was due to audio transcoding.
  • Given it went as high as 80%, will this impact my ability to transcode more than 2 movies at once?
  • My CPU supports QuickSync. Does enabling the flag --device=/dev/dri help audio decoding in any way or is that strictly for using the CPU's onboard GPU for video encoding (and won't help with my audio transcoding)?

 

Lastly, unrelated, can someone explain why I see a mention of an NVDEC script? What does that actually do that is not already being done with the work I've done? (To be clear, I'm not asking to troubleshoot or get help with that script. Just trying to understand what is it).

Edited by tmchow

Share this post


Link to post
16 minutes ago, tmchow said:

Lastly, unrelated, can someone explain why I see a mention of an NVDEC script? What does that actually do that is not already being done with the work I've done? (To be clear, I'm not asking to troubleshoot or get help with that script. Just trying to understand what is it).

The current PLEX server doesn't use NVDEC for the decoding part.  Even when you enable hardware transcoding in Plex settings, it only use the NVENC (encoding) and still decode using CPU.   The NVDEC Script is a wrapper that tricks Plex Transcoder by passingthu the Decoding command in parameters so that ffmpeg underneath will use the NVDEC too.  It's not perfect in the current state as the ffmpeg is very old in Plex.  The newest ffmpeg support nvdec a lot better.  Hopefully, PLEX will update it soon.   When you use the NVDec script, that lower your CPU usage because if it can, it will decode also with the nvidia card.

Share this post


Link to post
The current PLEX server doesn't use NVDEC for the decoding part.  Even when you enable hardware transcoding in Plex settings, it only use the NVENC (encoding) and still decode using CPU.   The NVDEC Script is a wrapper that tricks Plex Transcoder by passingthu the Decoding command in parameters so that ffmpeg underneath will use the NVDEC too.  It's not perfect in the current state as the ffmpeg is very old in Plex.  The newest ffmpeg support nvdec a lot better.  Hopefully, PLEX will update it soon.   When you use the NVDec script, that lower your CPU usage because if it can, it will decode also with the nvidia card.


Thanks! I got this working with this setup using a user script daily


https://github.com/Xaero252/unraid-plex-nvdec

Share this post


Link to post
8 hours ago, mihcox said:

Is there any traction on this, i use my for .ts -> .mp4 x265 transcoding and would love to monitor the progress.

Yes, alot of them got added into latest telegraf build.

Share this post


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.