UnRAID | Nvidia GPU & Unlocking the drivers

Installing Nvidia GPU on UnRAID and unlocking the restriction of 3 simultaneous NVENC video encoding sessions from the consumer-grade GPUs.

UnRAID | Nvidia GPU & Unlocking the drivers

Overview

Installing Nvidia GPU on UnRAID and unlocking the restriction of 3 simultaneous NVENC video encoding sessions from the consumer-grade GPUs.

I have a consumer-grade Nvidia GTX 1650 card installed in my UnRAID setup, and I wanted to take full advantage of its capabilities for my applications, which are mostly run in Docker containers.

Installing the drivers

To be able to use any Nvidia GPU in UnRAID in the first place you need to install drivers.

  1. In Apps search for "nvidia driver" and install the package.

2.   Making sure that the plugin install is complete and drivers are in use I usually always go to settings, and into Docker settings, and then set Enable Docker to No and apply, and then re-enable it.

3.   After you have installed the package, it will show up under the Plugins tab.

4.   Opening the plugin brings up the details, and also the GPU-ID that is needed in most cases to be able to utilize the GPU inside Docker containers.

💡
I had to install the v515 drivers to get this to work when unRAID is running as a VM in Proxmox.
Running unRAID as VM

Dashboard GPU statistics

After installing the drivers it is nice to have some GPU statistics in the UnRAID dashboard.

  1. In the Apps tab, search for "gpu statistics" and install the package

2.   Again after installation, the package will show up under the Plugins tab, and by opening, you can set some of the Dashboard settings.

3.   The dashboard is then showing up the statistics

Unlocking the GPU/Drivers

Nvidia consumer-grade GPUs have a restriction of 3 simultaneous NVENC video encoding sessions you can run. For me that limit is way too low, while I don't really do much NVENC encoding in terms of lie Plex streaming, I want to use the GPU for Frigate NVR encoding and with other similar types of applications. In practice I am out of sessions "out of the box", even though I know even this lower end GPU can easily handle more than 3 simultaneous NVENC video encoding sessions.

  1. To unlock the card/drivers in UnRAID APPS search for "user scripts" and install it

This will also show up under the Plugins tab after installation. Open the User Script plugin, and click "add new script". I named mine "unlock nvidia".

2.   After creating it, click the script to edit it.

3.   Copy-paste the script from below.

source: https://github.com/query67/keylasenvidiapatch
NVENC patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs.
#!/bin/bash
wget https://raw.githubusercontent.com/keylase/nvidia-patch/master/patch.sh
chmod +x ./patch.sh
./patch.sh
Copy paste the script

4.   Save Changes

5.  Now run the script for the first time, I also set the script to be run "At Startup of Array"

6. Run as many processes as you like simultaneously (there will be a limit on what your card can do, but now it won't be artificially limited.)