[Plugin] Nvidia-Driver


ich777

Recommended Posts

Nvidia-Driver (only Unraid 6.9.0beta35 and up)

This Plugin is only necessary if you are planning to make use of your Nvidia graphics card inside Docker Containers.

If you only want to use your Nvidia graphics card for a VM then don't install this Plugin!

 

Discussions about modifications and/or patches that violates the EULA of the driver are not supported by me or anyone here, this could also lead to a take down of the plugin itself!

Please remember that this also violates the forum rules and will be removed!

 

 

Installation of the Nvidia Drivers (this is only necessary for the first installation of the plugin) :

 

  1. Go to the Community Applications App and search for 'Nvidia-Drivers' and click on the Download button (you have to be at least on Unraid 6.9.0beta35 to see the Plugin in the CA App) :
    Bildschirmfoto_2020-11-15_19-58-03.png.239b492f503617a5c9afa867a2da2e41.png

    Or download it directly from here:
    https://raw.githubusercontent.com/ich777/unraid-nvidia-driver/master/nvidia-driver.plg

     
  2. After that wait for the plugin to successfully install (don't close the window with the Bildschirmfoto_2020-11-15_20-00-56.png.af97f7863eaa795c54573fbb65544e94.png, wait for the 'DONE' button to appear, the installation can take some time depending on your internet connection, the plugin downloads the Nvidia-Driver-Package ~150MB and installs it afterwards to your Unraid server) :
    Bildschirmfoto_2020-11-15_20-02-23.png.937ce21acc4a11667efc3d94fb1b0423.png
     
  3. Click on 'DONE' and continue with Step 4 (don't close this window for now, if you closed this window don't worry continue to read) :
    Bildschirmfoto_2020-11-15_20-05-27.png.28f57ecd07efa8d3a5955eb33a9f73de.png
     
  4. Check if everything is installed correctly and recognized to do this go to the plugin itself if everything shows up PLUGINS -> Nvidia-Driver (if you don't see a driver version at 'Nvidia Driver Version' or another error please scroll down to the Troubleshooting section) :Bildschirmfoto_2020-11-15_20-17-13.thumb.png.41a9d7df236bbb8974687b91b7a100ad.png

     
  5. If everything shows up correctly click on the red alert notification from Step 3 (not on the 'X'), this will bring you to the Docker settings (if you are closed this window already go to Settings -> Docker).
     
  6. At the Docker page change 'Enable Docker' from 'Yes' to 'No' and hit 'Apply' (you can now close the message from Step 2) :
    Bildschirmfoto_2020-11-15_20-07-40.png.2f0915838e574590d2da97d239992855.png
     
  7. Then again change 'Enable Docker' from 'No' to 'Yes' and hit again 'Apply' (that step is only necessary for the first plugin installation, you can skip that step if you are going to reboot the server - the background to this is that when the Nvidia-Driver-Package is installed also a file is installed that interacts directly with the Docker Daemon itself and the Docker Daemon needs to be reloaded in order to load that file) :
    Bildschirmfoto_2020-11-15_20-12-42.png.232c6c5d0bd86489bed08702e3c78f7c.png
     
  8. After that, you should now be able to utilize your Nvidia graphics card in your Docker containers how to do that see Post 2 in this thread. ;)

 

 

 

IMPORTANT:

  • If you don't plan or want to use acceleration within Docker containers through your Nvidia graphics card then don't install this plugin!
  • Please be sure to never use one card for a VM and also in docker containers (your server will hard lock if it's used in a VM and then something want's to use it in a Container).
  • You can use one card for more than one Container at the same time - depending on the capabilities of your card.

 

 

 

Troubleshooting:

(This section will be updated as soon as more someone reports an issue and will grow over time)

 

  • NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.:
    Bildschirmfoto_2020-11-15_19-27-33.png.b2ec3d4288daa2bbcc77f7e142acb32f.png

    This means that the installed driver can't find a supported Nvidia graphics card in your server (it may also be that there is a problem with your hardware - riser cables,...).
    Check if you accidentally bound all your cards to VFIO, you need at least one card that is supported by the installed driver (you can find a list of all drivers here, click on the corresponding driver at 'Linux x86_64/AMD64/EM64T' and click on the next page on 'Supported products' there you will find all cards that are supported by the driver.
    If you bound accidentally all cards to VFIO unbind the card you want to use for the Docker container(s) and reboot the server (TOOLS -> System devices -> unselect the card -> BIND SELECTED TO VFIO AT BOOT -> restart your server).

     
  • docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused "process_linux.go:432: running prestart hook 0 caused \"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: device error: GPU-9cfdd18c-2b41-b158-f67b-720279bc77fd: unknown device\\n\""": unknown.:
    Bildschirmfoto_2020-11-15_21-39-19.png.ced04b5aa7a442ed87f8590a09259af8.png

    Please check the 'NVIDIA_VISIBLE_DEVICES' inside your Docker template it may be that you accitentally have what looks like a space at the end or in front of your UUID like: ' GPU-9cfdd18c-2b41-b158-f67b-720279bc77fd' (it's hard to see that in this example but it's there)

     
  • If you got problems that your card is recognized in 'nvidia-smi' please check also your 'Syslinux configuration' if you haven't earlier prevented Unraid from using the card during the boot process: Click

 


 

Reporting Problems:

Please be sure if you have a problem to always include a screenshot from the Plugin page, a screenshot of the output of the command 'nvidia-smi' (simply open up a Unraid terminal with the button Bildschirmfoto_2020-11-15_20-38-25.png.36c7b0f5cf1dbf525c1110cc26ed0ad7.png on the top right of Unraid and type in 'nvidia-smi' without quotes) and the error from the startup of the Container/App if there is any.

 

 

  • Like 14
  • Thanks 18
Link to comment

To utilize your Nvidia graphics card in your Docker container(s) the basic steps are:

 

  1. Add '--runtime=nvidia' in your Docker template in 'Extra Parameters' (you have to enable 'Advanced view' in the template to see this option)
  2. Add a variable to your Docker template with the Key: 'NVIDIA_VISIBLE_DEVICES' and as Value: 'YOURGPUUUID' (like 'GPU-9cfdd18c-2b41-b158-f67b-720279bc77fd')
  3. Add a variable to your Docker template with the Key: 'NVIDIA_DRIVER_CAPABILITIES' and as Value: 'all'
  4. Make sure to enable hardware transcoding in the application/container itself

 

See the detailed instructions below for Emby, Jellyfin & Plex (alphabetical order).

 

UUID: You can get the UUID of you graphics card in the Nvidia-Driver Plugin itself PLUGINS -> Nvidia-Driver (please make sure if there is no leading space!) :

Bildschirmfoto_2020-11-15_22-27-32.png.fc89af3ff87719e084cba99243bd8531.png

 

NOTE: You can use one card for more than one Container at the same time - depending on the capabilities of your card.

 

 

 

Emby:

Note: To enable Hardware Encoding you need a valid Premium Subscription otherwise Hardwar Encoding will not work!

 

  1. Add '--runtime=nvidia' to the 'Extra Parameters':
    Bildschirmfoto_2020-11-15_22-13-28.png.2dfe0278ccb5825fc04745301b44930b.png

     
  2. Add a variable to your Docker template with the Key: 'NVIDIA_VISIBLE_DEVICES' and as Value: 'YOURGPUUUID':
    Bildschirmfoto_2020-11-15_22-10-43.png.c55877b01ac0790eb9065ca9e9866998.png

    Bildschirmfoto_2020-11-15_22-11-00.thumb.png.8d7c4b6e40536ffe75e90f05e9376fa2.png

     
  3. Add a variable to your Docker template with the Key: 'NVIDIA_DRIVER_CAPABILITIES' and as Value: 'all':
    Bildschirmfoto_2020-11-15_22-09-29.png.fbff305e125bae3a65665fc61badbd90.png

    Bildschirmfoto_2020-11-15_22-13-04.thumb.png.40bafc5fe9f2673d882b747839185227.png

     
  4. Make sure to enable hardware transcoding in the application/container itself
    Bildschirmfoto_2020-11-15_22-34-57.thumb.png.e4b77b37c13cc5d6cfc508240cfa58fd.png

 

 

After starting the container and playing some movie that needs to be transcoded that your graphics card is capable of you should see that you can now successfully transcode using your Nvidia graphics card (the text NVENC/DEC is indicating exactly that) :

Bildschirmfoto_2020-11-15_22-37-46.png.511e888670c8388f056fda53cef4c512.png

Bildschirmfoto_2020-11-15_22-37-20.png.defa13d6e6b46889d6f058e7428260fc.png

 

 

 

 

 

Jellyfin:

  1. Add '--runtime=nvidia' to the 'Extra Parameters':
    Bildschirmfoto_2020-11-15_22-09-10.png.0c814da985cd89f7c6cd6b796181f67c.png

     
  2. Add a variable to your Docker template with the Key: 'NVIDIA_VISIBLE_DEVICES' and as Value: 'YOURGPUUUID':
    Bildschirmfoto_2020-11-15_22-07-28.png.7398a93b1f75c56379d21534d5f09355.png

    Bildschirmfoto_2020-11-15_22-07-44.thumb.png.ec9c1cf478c3e5b843886aab39cfe34f.png

     
  3. Add a variable to your Docker template with the Key: 'NVIDIA_DRIVER_CAPABILITIES' and as Value: 'all':
    Bildschirmfoto_2020-11-15_22-09-29.png.fbff305e125bae3a65665fc61badbd90.png

    Bildschirmfoto_2020-11-15_22-07-56.thumb.png.232e9b73dafc35d58cecbf468cfe51f1.png

     
  4. Make sure to enable hardware transcoding in the application/container itself
    Bildschirmfoto_2020-11-15_22-19-09.png.83d3c9bf3947de058a8f46aa2ddea53f.png

 

 

After starting the container and playing some movie that needs to be transcoded that your graphics card is capable of you should see that you can now successfully transcode using your Nvidia graphics card (Jellyfin doesn't display if it's actually transcoding with the graphics card at time of writing but you can also open up a Unraid terminal and type in 'watch nvidia-smi' then you will see at the bottom that Jellyfin is using your card) :

Bildschirmfoto_2020-11-15_22-19-25.png.254af91880b782045f47bcc232ef179a.png

Bildschirmfoto_2020-11-15_22-18-04.png.c1dbb9961432f0b31df9fc9650aa3110.png

 

 

 

 

PLEX:
(thanks to @cybrnook & @satchafunkilus that granted permission to use their screenshots)

Note: To enable Hardware Encoding you need a valid Plex Pass otherwise Hardwar Encoding will not work!

 

  1. Add '--runtime=nvidia' to the 'Extra Parameters':
    image.thumb.png.ed0d7b600d472b9f3c0c881116ff11d5.png

     
  2. Add a variable to your Docker template with the Key: 'NVIDIA_VISIBLE_DEVICES' and as Value: 'YOURGPUUUID':
    image.thumb.png.776c4cb8cfecabc828aacb36281efb33.png

    image.thumb.png.7306a181c47d43407afc515fc5c694da.png

     
  3. Add a variable to your Docker template with the Key: 'NVIDIA_DRIVER_CAPABILITIES' and as Value: 'all':
    image.png.e7936df6655fa8b2631edee82907bf8e.thumb.png.eca65efab0d22d08f48dbcad91bcc173.png

    image.thumb.png.1c9573b0512e8713ad35cdc305673e0b.png

     
  4. Make sure to enable hardware transcoding in the application/container itself:mXoPaDq.thumb.png.01042484359ad04ec25a52741ccb3e67.png
     

 

 

After starting the container and playing some movie that needs to be transcoded that your graphics card is capable of you should see that you can now successfully transcode using your Nvidia graphics card (the text '(hw)' at Video is indicating exactly that):

image.png.dbe7626b967d629ef237448a07d41d9d.png

 

 

 

  • Like 20
  • Thanks 12
Link to comment

Thanks a lot @ich777 for all your work!

 

Already reached out to @ich777 via PM, but adding this here to see if someone is experiencing the same issue:

 

I upgraded to 6.9.0-beta35 from the 6.8.3 nvidia kernel with hardware transcoding working in all containers (Plex, Jellyfin, etc.). After successful installation of the nvidia-plugin, the graphics card is showing up in settings and nvidia-smi, but I am unable to get hardware transcoding to work. As soon as I activate hardware transcoding in Plex, I get a black screen instead of the video. Software transcoding works fine.

 

Already tried uninstalling the plugin and reinstalling it, rebooted multiple times, removed and added the variables for the containers, to no effect.

 

Anyone else experiencing the same issue or any idea what could be the problem?

 

---------

EDIT: I have managed to get hardware transcoding to work in Jellyfin, but still no luck with Plex...

 

EDIT2: Switching docker-images from binhex/arch-plex to binhex/arch-plexpass did the trick. Hardware transcoding is working flawlessly now. Thanks @ich777!

 

Edited by satchafunkilus
hardware transcoding working
  • Like 1
Link to comment
1 hour ago, S3ppo said:

is there already a solution to control fan speed?

my graphics card(1050ti) is running in idle with 46%

The fan speed should be managed by the card itself and should have nothing to do with the driver itself...

Anyways I think there are workarounds out there but I can't recommend that since you are setting a fixed value and if the card is getting too hot the fan wouldn't ramp up.

Link to comment
38 minutes ago, S3ppo said:

i tried to create a win10 VM with an installed zotac driver/software.. there i could manage the fanspeed depending on the load..

but i am not willig to run a VM only to do that.. is there no way to do that in linux ?

As I said there is a way for that but these are only workarounds, have you installed the Nvidia-Driver package already?

 

This would be a workaround but I'm not sure if it's possible on Unraid because the X-librarys are not installed: Click

As far as I know the fan speed is managed by the BIOS if no X-Application is using the card and set by the manifacturer. My Zotac is also at 46% but I even can't hear it at that percentage...

  • Like 1
Link to comment
1 hour ago, Dazog said:

Nvidia driver 455.45.01 just released.

 

https://www.nvidia.com/Download/driverResu455.23.04lts.aspx/166883/en-us

 

unsure if this one works on Kernel 5.9

This is a beta driver and I think @limetech won't ever build beta drivers since those are mainly for developers...

 

From what I know about this driver is that it integrates support for the RTX 3000 series (at least for the 3070), fixes a few minor bugs adds also a new Vulkan beta driver but is also still not fully compatible with Kernel 5.9

Link to comment
19 hours ago, ich777 said:

As I said there is a way for that but these are only workarounds, have you installed the Nvidia-Driver package already?

 

This would be a workaround but I'm not sure if it's possible on Unraid because the X-librarys are not installed: Click

As far as I know the fan speed is managed by the BIOS if no X-Application is using the card and set by the manifacturer. My Zotac is also at 46% but I even can't hear it at that percentage...

thanks for the link, i will try it :)

  • Thanks 1
Link to comment

I have a weird issue with Unraid 6.9.0-beta35, these drivers (455.38)) and Plex (plexinc/pms-docker:1.20.5.3600-47c0d9038), the hardware transcoding/decoding do work, nvidiaa-smi send correct informations BUT when you're watchig the stream there are some very annoying glitches who completely ruin the exeperience :

 

- stream is skipping few seconds every one or two minutes.

 

- sometimes micro-pauses occurs

 

With nvidia-Unraid 6.9.0-beta30 these problems wasn't here... (but nvidia-unraid is gone...).

 

Somebody know how to  get back to 6.9.0-beta30  and nvidia 450.80.02 drivers ?

 

Anyone had this problem ?

 

[Edit : downgrading Plex to version 1.20.2.3402-0fec14d92 seems to have fixed the problem, i'm tired with all this annoying things with Plex, every update is like playing Russian roulette...]

Edited by doobyns
  • Thanks 1
Link to comment
45 minutes ago, doobyns said:

- stream is skipping few seconds every one or two minutes.

 

- sometimes micro-pauses occurs

Are you sure this is caused by the transcoding itself?

Are you watching over WiFi or over a cable and an which device?

 

This sounds like maybe a network related issue...

Have you changed any setting since you switched from beta30 to 35?

 

Can you try to switch over to the latest container 'plexinc/pms-docker' from your currently installed 'plexinc/pms-docker:1.20.5.3600-47c0d9038'?

 

EDIT: Didn't see your edit... :D You can also try the Jellyfin (free fork of Emby) or Emby (payd version) container.

Link to comment

I ha

17 minutes ago, ich777 said:

Are you sure this is caused by the transcoding itself?

Are you watching over WiFi or over a cable and an which device?

 

This sounds like maybe a network related issue...

Have you changed any setting since you switched from beta30 to 35?

 

Can you try to switch over to the latest container 'plexinc/pms-docker' from your currently installed 'plexinc/pms-docker:1.20.5.3600-47c0d9038'?

 

EDIT: Didn't see your edit... :D You can also try the Jellyfin (free fork of Emby) or Emby (payd version) container.

I had exactly the same problem (same behaviour : microskip and skipping few secondes every 1 minute) with Nvidia-Unraid 6.8.3 and older nvidia drivers while using latests versions of plex... Upgrading to Nvidia-Unraid 6.9.0.beta-29 with newer nvidia drivers solved the problem...

It seems tha Plex is very picky concerning Nvidia drivers...

 

 

Link to comment
11 minutes ago, ich777 said:

But isn't this the latest Nvidia driver revision, except for the on Sunday released beta revision?

Thanks all for all these answers, it was before the availability of Unraid 6.9.0.beta-35, i was using the Plugin "Linuxserver.io - Unraid Nvidia" and Nvidia-Unraid 6.9.0.beta-29, but unfortunately, this plugin doesn't exist anymore...

 

I hope will be more choices of the Nvidia-drivers versions in the future in the plugin, so we will revert easily to specific versions (eg. for Plex).

Edited by doobyns
  • Like 1
Link to comment
6 hours ago, ich777 said:

This is a beta driver and I think @limetech won't ever build beta drivers since those are mainly for developers...

 

From what I know about this driver is that it integrates support for the RTX 3000 series (at least for the 3070), fixes a few minor bugs adds also a new Vulkan beta driver but is also still not fully compatible with Kernel 5.9

455 branch isn't beta branch

 

455 branch is shortlived branch

 

The current driver we have gotten 455.38 is shortlived branch also.

 

The beta driver for Linux is VULKAN driver branch:

 

https://developer.nvidia.com/vulkan-driver

Edited by Dazog
Link to comment
7 hours ago, doobyns said:

I hope will be more choices of the Nvidia-drivers versions in the future in the plugin, so we will revert easily to specific versions (eg. for Plex).

I will contact @limetech about that if there will be different driver version available on request.

 

But remember that normaly only new drivers are compiled (I also think that Linuxserver.io builds only one driver per Unraid version if I remember correctly).

  • Like 1
Link to comment
6 hours ago, Dazog said:

455 branch isn't beta branch

 

455 branch is shortlived branch

 

The current driver we have gotten 455.38 is shortlived branch also.

To be clear it's not that easy, you are completely right about the shorl tived branch but that's not the whole story (I also have a link in the first post in the Troubleshooting section where you can see what is short lived and long lived Click).

The really latest official is 455.28 (the latest release of the, should I say stable regardles if short lived or long lived..., driver from Nvidia is always promoted here: Click ).

 

Let's say it like this the latest driver from the link above where it only displays the driver number is the 'consumer' driver or better speaking with all features working corretly (at least they should) and all other newer are for 'developers/testers', is that OK for you if we say it like this? :)

Link to comment
18 hours ago, doobyns said:

I have a weird issue with Unraid 6.9.0-beta35, these drivers (455.38)) and Plex (plexinc/pms-docker:1.20.5.3600-47c0d9038), the hardware transcoding/decoding do work, nvidiaa-smi send correct informations BUT when you're watchig the stream there are some very annoying glitches who completely ruin the exeperience :

 

- stream is skipping few seconds every one or two minutes.

 

- sometimes micro-pauses occurs

 

With nvidia-Unraid 6.9.0-beta30 these problems wasn't here... (but nvidia-unraid is gone...).

 

Somebody know how to  get back to 6.9.0-beta30  and nvidia 450.80.02 drivers ?

 

Anyone had this problem ?

 

[Edit : downgrading Plex to version 1.20.2.3402-0fec14d92 seems to have fixed the problem, i'm tired with all this annoying things with Plex, every update is like playing Russian roulette...]

Thanks you all, i finally tried to upgrade again my Plex Media Server to version 1.20.5.3600-47c0d9038, and now everything is working well !

 

The problem was my former Plex version 1.20.5.3600-47c0d9038 (from plexinc) was installed BEFORE with Unraid-Nvidia, and i kept this untouched then upgraded to Unraid 6.9.0-beta35 with Nvidia-drivers... I think something in Plex didn't liked switching driver or Unraid version...

 

Uninstalling and reinstalling Plex docker solved the problem !

 

 

Edited by doobyns
  • Like 1
Link to comment

I had an issue with the linuxserver plex container. For some reason even with all of the correct parameters it would not do hardware accelerated encoding. My nvidia-smi process showed no use. I added the same parameters to the binhex plexpass container and everything started working correctly. I am using Unraid 6.9.0 beta 35. Thanks to ich777 for the suggestion.

Nvidia SMI.JPG

Containers Parameters.JPG

runtime nvidia.JPG

Server Settings Plex.JPG

Plex Playback.JPG

GPU corrected.JPG

Transcoding Corrected.JPG

  • Like 1
Link to comment
9 minutes ago, TopCado said:

I had an issue with the linuxserver plex container. For some reason even with all of the correct parameters it would not do hardware accelerated encoding. My nvidia-smi process showed no use. I added the same parameters to the binhex plexpass container and everything started working correctly. I am using Unraid 6.9.0 beta 35. Thanks to ich777 for the suggestion.

Sounds pretty similar to my issue with the binhex plex container. After switching to binhex plexpass everything worked fine.

  • Thanks 1
Link to comment

Will this work on a GTX560Ti? I need it for Jellyfin. nVidia website only recommends up to version 390.138. On my app search, nothing came up with "nvidia" so my card may be too old for this world. Does that mean it is not compatible? 

And just to confirm, I can't have this on Plex without paying up for plex pass, right?

Edited by Saurabh Sharma
Added the nVidia website information
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.