[Plugin] Nvidia-Driver


ich777

Recommended Posts

9 minutes ago, Keichi said:

However, the NVEnc implementation in ffmpeg is very old and I can't encode properly using "hevc_nvenc".

I don't know what you mean with this, you have to understand that in this package no ffmpeg is included...

 

9 minutes ago, Keichi said:

Do you know if there is a way to use NVEnc directly (https://github.com/rigaya/NVEnc) on Unraid while taking advantage of my GeForce GTX 1650 SUPER?

I can't find any NVEnc Docker and my hardware being too old, I can't install a VM on the NAS and therefore run Windows taking advantage of the GC :/

First of all what do you want to do with your card in Unraid?

This plugin installs the drivers and necessary tools so that you can make use of the Nvidia card inside of Docker containers (multiple containers also possible).

Link to comment

Hello ich777,

 

Thanks for the quick reply.

 

In fact in the installation procedure, some examples of Docker are given using this plugin (Ember, Plex,...), but none of these took advantage of the full support of NVEnc encoding (with h265). I guess that some people used it for encoding and maybe have thought about the support of NVEnc in UNRAID.

 

It is not related to the plugin, but is possible thanks to this plugin, that is why i posted here.

But maybe i made a mistakes and need to create a new topic, sorry.

 

K.

Edited by Keichi
Adding precisions
Link to comment
5 minutes ago, Keichi said:

Docker are given using this plugin (Ember, Plex,...), but none of these took advantage of the full support of NVEnc encoding (with h265).

Why do you know that those don't took advantage of NVENC? For both of them you need a subscription to enable hardware transcoding.

Both working fine here with HW transcoding even with h265 on my GTX1050Ti even Jellyfin works just fine.

 

If something isn't working, in this case NVENC, then it's better to post on the subforums for the app itself.

 

9 minutes ago, Keichi said:

I guess that some people used it for encoding and maybe have thought about the support of NVEnc in UNRAID.

I also use this for hardware acceleration in my Debian-Buster-Nvidia container so I can play games Steam games in the container and stream that over my network or even when I'm on the go.

 

Some people also make use of the Cuda cores with Folding@Home.

Link to comment

I don't use Ember or Plex, as i just want to transcode manually, like using CLI.

So i install Unmanic which use ffmpeg 4.3 and according to the help, the options i can pass using HW transcoding are really limited (no bframes, no multipass, no -mv precision, no aq...).

 

I try also FFmpeg-mkvdts2ac3 (with --runtime=nvidia & NVIDIA_VISIBLE_DEVICES) but it does not have hevc_nvenc installed.

 

That is why i said there is no "full spport". But i can be wrong, i am a newbie in transcoding.

But what i can say is that i can't reach the level of quality i get with CPU encoding, even with bigger files.

 

Thanks for your time ich777!

Link to comment
9 minutes ago, Keichi said:

I don't use Ember or Plex, as i just want to transcode manually, like using CLI.

I don't recommend that, if you want to do that, I strongly recommend using a Docker container...

Have you ever tried Handbrake, you also can transcode manually in a container from the console.

 

10 minutes ago, Keichi said:

I try also FFmpeg-mkvdts2ac3 (with --runtime=nvidia & NVIDIA_VISIBLE_DEVICES) but it does not have hevc_nvenc installed.

This is also a thing, the container/application have to be built with the apropriate options for Nvidia, please dont forget to also include the NVIDIA_CAPABILITIES

 

11 minutes ago, Keichi said:

That is why i said there is no "full spport". But i can be wrong, i am a newbie in transcoding.

This always depends on the version that is integrated in the Docker Container and has nothing to do with the Host OS itself.

One Idea is that you install the Jellyfin docker and log into the CLI to this container and see which version of ffmpeg is installed, I have no problem whatsoever transcoding files h264 and also h265.

 

13 minutes ago, Keichi said:

But what i can say is that i can't reach the level of quality i get with CPU encoding, even with bigger files.

You mean software encoding or do you mean HW encoding with QuickSync.

Some say that QuickSync has a better quality than NVENC and most say that pure software encoding is the best but I don't want to start any discussion about quality here.

Link to comment
2 hours ago, ich777 said:

I don't recommend that, if you want to do that, I strongly recommend using a Docker container...

Have you ever tried Handbrake, you also can transcode manually in a container from the console.

Handbrake doesn't support h265 NVEnc with 10 bits sadly.

 

2 hours ago, ich777 said:

This is also a thing, the container/application have to be built with the apropriate options for Nvidia, please dont forget to also include the NVIDIA_CAPABILITIES

Thanks ! I missed that, but even with it, FFmpeg-mkvdts2ac3 doesn't have hevc_nvenc encoders :(

I will reach the dev to see if it is possible to add it.

 

2 hours ago, ich777 said:

This always depends on the version that is integrated in the Docker Container and has nothing to do with the Host OS itself.

One Idea is that you install the Jellyfin docker and log into the CLI to this container and see which version of ffmpeg is installed, I have no problem whatsoever transcoding files h264 and also h265.

Jellyfin comes with an old (4.1) ffmpeg. But thanks for the idea!

 

2 hours ago, ich777 said:

You mean software encoding or do you mean HW encoding with QuickSync.

Some say that QuickSync has a better quality than NVENC and most say that pure software encoding is the best but I don't want to start any discussion about quality here.

In fact, i use ffmpeg with libx265 which is great with a lot of options, but CPU encoding is really slow (~2 fps/s) so i bought a GeForce GTX 1650 SUPER with all the h265 features of Turing architecture, hoping to use NVEnc, but seems harder than expected on Unraid.

I can't find a way to have as many seetings as libx265.

ffmpeg -i  Japan.mkv -pix_fmt yuv420p10le -c:v libx265 -profile:v main10 -preset slow -crf 23 -x265-params "no-info=1:level-idc=5:allow-non-conformance=1:wpp=1:tu-intra-depth=1:tu-inter-depth=1:cutree=1:early-skip=1:limit-refs=3:cu-lossless=1:aq-mode=1:b-intra=1:constrained-intra=1:rc-lookahead=72:rc-grain=1:weightb=1:weightp=1:deblock=0,0:sao=1:sao-non-deblock=1:selective-sao=4:subme=7:me=3:rect=1:amp=1:rd=4:psy-rd=0.8:psy-rdoq=1.80:rdoq-level=1:signhide=1:temporal-mvp=1:strong-intra-smoothing=1:bframes=8:ref=4:b-adapt=2:qcomp=0.7:cbqpoffs=-1:crqpoffs=-1:qpmax=54:qpmin=0:analyze-src-pics=1:no-fast-intra=1:pass=3:stats=1:analysis-reuse-file=1:multi-pass-opt-analysis=1:multi-pass-opt-distortion=1:opt-qp-pps=1:opt-ref-list-length-pps=1:multi-pass-opt-rps=1:scenecut-aware-qp=1:scenecut-window=650:fades=1" -c:a libfdk_aac  -profile:a aac_he -vbr 5 Japan-enc.mkv

Don't want to start a discussion about quality either, i just do my encode, compare to the source, and tweak my setting to find a good balance between size and quality. So it is purely subjective to my eye.

 

I will look on how to dockerised NVEnc which i was hoping to use.

 

Thanks for your time ich777, i do not disturb you more, your plugin is perfect and work flawlessly, thanks for your work, it is something essential to have on Unraid !

 

K.

 

  • Like 1
Link to comment
1 minute ago, Keichi said:

but seems harder than expected on Unraid.

Try to find a container that as all the features that you need inside it.

There are so many containers out there that have a newer version of ffmpeg inside, you can also try Emby that has also ffmpeg4.3.0 (custom version for Emby but also supports NVENC).

 

11 minutes ago, Keichi said:

Handbrake doesn't support h265 NVEnc with 10 bits sadly.

Are you sure?

Handbrake uses also ffmpeg as a backend and if ffmpeg supports it I think Handbreak also can support it but as I said before it has to be compiled with the right options.

Link to comment
12 minutes ago, ich777 said:

Try to find a container that as all the features that you need inside it.

There are so many containers out there that have a newer version of ffmpeg inside, you can also try Emby that has also ffmpeg4.3.0 (custom version for Emby but also supports NVENC).

Yes, that is what i try.

Sadly, not all Docker from DockerHub start on UNRAID, so sometime, i don't know.

I will look into Emby, thanks.

 

 

12 minutes ago, ich777 said:

Are you sure?

Handbrake uses also ffmpeg as a backend and if ffmpeg supports it I think Handbreak also can support it but as I said before it has to be compiled with the right options.

 

Yes, i suppose :

179272540_Capturedecran2020-12-29a15_14_52.png.f92e530e7447e0114eebc85f8afa6985.png

 

And i can't launch ffmpeg from the console :

511832409_Capturedecran2020-12-29a15_18_09.png.4e92eecccd259d5ea1651723a16089e3.png

 

I will continue to installa and try several dockers, Unraid is really flexible, just need to dig a little deeper and understand how everything is working :)

 

Thanks again!

 

 

Link to comment
8 minutes ago, Keichi said:

Sadly, not all Docker from DockerHub start on UNRAID, so sometime, i don't know.

They should, you have to look on DockerHub which requirements in terms of variables, paths,... they have, at least they should start all fine.

 

8 minutes ago, Keichi said:

And i can't launch ffmpeg from the console

That doesn't mean that it's not installed there try something like: 'find / -name *ffmpeg*' and it should list all files that contains ffmpeg.

It tells you only that ffmpeg is not in the $PATH of the container you have to go to the location where it lives and then execute it with './ffmpeg' or execute it with the full path eg: '/etc/ffmpeg' depending on where it lives.

But that is something for the Handbreak thread...

 

EDIT: But when I think of it now Handbreak is an alternative to ffmpeg and it is possible that it's not included in the container.

Link to comment
5 hours ago, GavRyzen said:

on the old version of nvidia driver you could install drivers of your choosing, is this no longer possible??

What do you mean exactly?

In the old version you could choose which Unraid version you want to use but not the driver version itself.

Link to comment

I have a question or just need a confirmation I'm doing this right.


I'm on unRAID 6.8.3 and I don't want to update to 6.9 until stable. I have 2 Nvidia GPU's installed in my unRAID server (GeForce GTX 1650 and Quadro K4200). 
1650 is only used by Emby/Emby docker container for transcoding and nothing else. Quadro K4200 is used for a GPU passthrough for MacOS Catalina.
I went through reading a couple of threads about new nvidia driver plugin (thanks @ich777 for your hard work and effort to help people here).
I'm currently using Unraid Nvidia plugin from LinuxServer. I know the plugin is not supported anymore and wanted to use this drivers from @ich777.
I downloaded Unraid Custom nVidia builtin v6.8.3: Download (nVidia driver: 450.66)
Now, is the following procedure correct:
1. Uninstall Unraid Nvidia Plugin from Linuxserver.io (drivers are still working but it's giving me some errors lately)
2. Extract the Unraid Custom nVidia builtin v6.8.3 *.zip archive and replace the bz* files from the USB Boot device with the ones from the archive
3. Reboot the server
4. Install Unraid-Kernel-Helper-Plugin (not the Docker) if you want to see your UUID of the GPU install

 

Is that it, or I'm missing something? Should I change something in the Emby docker settings? Are there any additional steps?

Link to comment
17 minutes ago, yogy said:

Is that it, or I'm missing something?

Completely correct.

 

17 minutes ago, yogy said:

Should I change something in the Emby docker settings? Are there any additional steps?

No don't think so, this is the basic procedere if you are on 6.8.3 but this is something for the Kernel-Helper thread since this thread is for 6.9.0beta35+ and you can find the Plugin in the CA App.

 

If you are planing on installing my build wait a few more hours I will release a updated version of the 6.8.3 files.

Link to comment

Anyone have any luck getting this working with an UnRAID host running on ESXi 7 with pass through?

Mine either freezes at boot time, or if I change some advanced variables around I can get it to boot, but get a message on the plugin page saying "unable to determine the device handle"

 

I have tried the normal advanced settings you need for ESXi and nvidia passthrough like setting hypervisor.cpuid.v0 = “FALSE” and pciHole.start = “2048” but I'm not having much luck so far :(

Edited by zer0zer0
Link to comment
9 hours ago, zer0zer0 said:

Anyone have any luck getting this working with an UnRAID host running on ESXi 7 with pass through?

Mine either freezes at boot time, or if I change some advanced variables around I can get it to boot, but get a message on the plugin page saying "unable to determine the device handle"

 

I have tried the normal advanced settings you need for ESXi and nvidia passthrough like setting hypervisor.cpuid.v0 = “FALSE” and pciHole.start = “2048” but I'm not having much luck so far :(

 

Are you using 6.8.3 or 6.9.0RC2?

I know very littly about ESXi7 so I really can't help here.

Eventually this can help: Click

 

8 hours ago, bradtn said:

Just a thank you post for ich777, Got the new GPU in and all is as it was! thank you

Glad to hear that everything is working. :)

Link to comment
14 hours ago, ich777 said:

 

Are you using 6.8.3 or 6.9.0RC2?

I know very littly about ESXi7 so I really can't help here.

Eventually this can help: Click

 

Tried all of the different advanced variables, without any luck, so I gave up and did a bare metal UnRAID with a nested ESXi instead :D

  • Like 1
Link to comment
On 1/4/2021 at 3:42 PM, zer0zer0 said:

Anyone have any luck getting this working with an UnRAID host running on ESXi 7 with pass through?

Mine either freezes at boot time, or if I change some advanced variables around I can get it to boot, but get a message on the plugin page saying "unable to determine the device handle"

 

I have tried the normal advanced settings you need for ESXi and nvidia passthrough like setting hypervisor.cpuid.v0 = “FALSE” and pciHole.start = “2048” but I'm not having much luck so far :(

I'm running unRAID virtualized under ESXI 7 with an RTX 4000, using @ich777 plugin.  I don't recall doing anything special to get it to work.  I do have these settings:


 

pciHole.dynStart 3072

hypervisor.cpuid.v0 FALSE

 

but I don't recall specifically setting them.

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

Will this plugin enable UNRAID to detect the GPU and stop the fans?

Yes and no, Unraid will detect the card but it will not stop the fans.

 

9 minutes ago, mikeyosm said:

Can the plugin be used if passingthrough the card to a VM?

Yes, but don't let a Docker Container use the card and then fire up a VM, this can lead to a system crash.

 

9 minutes ago, mikeyosm said:

It bothers me that the fans on my nvidia 3060ti spin until i power on a VM that has the GPU passthrough.

This is a completely vendor specific behavior and is set in the BIOS of the GPU from the vendor itself.

Link to comment
14 minutes ago, ich777 said:

Yes and no, Unraid will detect the card but it will not stop the fans.

 

Yes, but don't let a Docker Container use the card and then fire up a VM, this can lead to a system crash.

 

This is a completely vendor specific behavior and is set in the BIOS of the GPU from the vendor itself.

Yes but when nvidia driver loads in Windows the fan profile set in the GPU BIOS becomes active and the fans only ramp up when above a certain temp. I thought the nvidia driver in UNRAID would have the same behaviour?

Edited by mikeyosm
Link to comment
5 minutes ago, mikeyosm said:

I thought the nvidia driver in UNRAID would have the same behaviour?

Those are two different things, the driver is loaded yes but no X (window process) is started.

So I don't think it will work what you try to accomplish, but at least you can try, if it doesn't work simply uninstall the plugin.

 

Quote

the GPU BIOS becomes active

The BIOS is always active but how the manufacturer implemented the fan curve is different, some need a load on the GPU to activate the fan profile others don't need that

  • Thanks 1
Link to comment
15 minutes ago, ich777 said:

Those are two different things, the driver is loaded yes but no X (window process) is started.

So I don't think it will work what you try to accomplish, but at least you can try, if it doesn't work simply uninstall the plugin.

 

The BIOS is always active but how the manufacturer implemented the fan curve is different, some need a load on the GPU to activate the fan profile others don't need that

If I shutdown the VM, will the nvidia driver for UNRAID see the card again or will I need to reboot the host?

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.