Jump to content

A Little Help with GPU Passthrough on Emby LXC Install


Recommended Posts

AVTechMan
Posted

Hello, I have been trying to get Emby Server to install as an unprivileged LXC container in Proxmox. And thanks to the helper script it made that process fairly easy. The only thing I am having trouble with is the GPU passthrough; I have a Quadro P400 installed in the server that is not in use by anything else, but during the script install it keeps skipping over the GPU portion as it keeps saying this:

Detected NVIDIA GPU
  💡   NVIDIA GPU detected via PCI but no /dev/nvidia* devices found
 ℹ️ Skipping NVIDIA passthrough (host drivers may not be loaded)
 ℹ️ No GPU devices found for passthrough

I am guessing that I would have to install something prior to running the script so that it can be detected? I've read that using an LXC is alot lighter on resources compared to using a Windows VM but seems anything linux based is much harder to implement if one is not fluent in the command line, which I can eventually figure out over time. 

Anyway I am hoping to get the passthrough working so that maybe I can use Emby in the form for my media. Then there's the issue of doing the SMB binding from my Unraid server where all my media currently resides. 

Worse come to shove i'll just install the server in the Windows VM where its not as hard to setup. But it would be nice to try something different.

TMCsw
Posted
5 hours ago, AVTechMan said:

Worse come to shove i'll just install the server in the Windows VM where its not as hard to setup.

That wont work either, the VM wont be able to access the the hardware if the drivers are not installed on the host.(also a Win VM is a big waste or resources).

Please search for "how to install nvidia drivers on proxmox"

Then run the helper script again..

Lessaj
Posted
1 hour ago, TMCsw said:

That wont work either, the VM wont be able to access the the hardware if the drivers are not installed on the host.

Not if using PCI passthrough, which I assume is what they meant they would do.

richt
Posted

I did this almost 2 years ago and it was on Proxmox 8 so it may not be relevant anymore.  As I recall, you need to use a privelged container and there is lots of prepwork in proxmox to install drivers and set up the pass through.  IIRC this article helped quite a bit.  https://github.com/gma1n/LXC-JellyFin-GPU

Also noteworthy and still true on Proxmox 9, is that if you have set up passthrough for a VM on the Proxmox host, you have to roll back most of it to set up passthrough for an LXC container.  Sorry, I can't be more helpful.

AVTechMan
Posted
5 hours ago, TMCsw said:

That wont work either, the VM wont be able to access the the hardware if the drivers are not installed on the host.(also a Win VM is a big waste or resources).

Please search for "how to install nvidia drivers on proxmox"

Then run the helper script again..

Well, on a test Windows VM I was doing, I was able to passthrough the GPU to where it was recognized and was utilizing it when I played a test video file. Since I have an extra GPU in the server (Quadro P400) I wanted to see about using that for passthrough to Emby

AVTechMan
Posted
3 hours ago, richt said:

I did this almost 2 years ago and it was on Proxmox 8 so it may not be relevant anymore.  As I recall, you need to use a privelged container and there is lots of prepwork in proxmox to install drivers and set up the pass through.  IIRC this article helped quite a bit.  https://github.com/gma1n/LXC-JellyFin-GPU

Also noteworthy and still true on Proxmox 9, is that if you have set up passthrough for a VM on the Proxmox host, you have to roll back most of it to set up passthrough for an LXC container.  Sorry, I can't be more helpful.

Every bit helps! I was reading on whether to setup as a privileged or unprivileged container with the former being a possible security risk but easier to set up. But since I am the only one that controls this server I may be okay in setting it up as a privileged container. I have an extra GPU that is not tied to any VM so its what I may use to set up with.  

AVTechMan
Posted

@Lukehello sir. 

 

Yes I finally got it worked out. Was a bit of a challenge but was determined to get it working, even if it meant wiping the entire PVE install and starting again from scratch. 

Basically what I did for starters was after removing the GPU from the Windows VM, I wiped out everything GPU and Nvidia by using purge commands in the CLI 'apt-purge -y'.

Afterward verified that everything was removed by using the 'dkms status' command to ensure that everything was gone and nothing remained. This is all for the host side. 

Then, I went ahead and downloaded the most recent drivers from Nvidia's website (I have two Quadro cards in my system) and downloaded the correct version I needed which was 580.xx. Once that was done in the host I did the 'nvidia-smi' which then picked up both cards in the host, so that verifies the drivers were installed on the host. 

 

Now on the Emby side with the container--

I reinstalled the Emby container using the helper script as unprivileged, though I did the advanced install as I wanted to modify a few parameters, but after that the install went fine. This time the script found and was able to setup the GPU pass-through for the cards, which it wasn't able to prior. However after the install was done, another error message came up saying that the nvidia-smi failed because of a library version mismatch with the host. And with that error, the GPU will not appear in the hardware acceleration section in Emby's server configuration. 

So after doing a little more investigation, it was determined that the helper script installed an older version of the drivers for the container as the ones on the host were newer. So I had to download the new driver again, this time inside the Emby container but I used an option on the install command, '--no-kernel-module' which instructs the installer to only install the libraries and not the second kernel driver. 

After all this and rebooted the container, Emby now finally picks up both GPUs and can see them when I go to Advanced for hardware acceleration, although I just selected only one GPU as I don't need both.  

 

Quite a bit of work just to get GPU pass-through to work in an container, and had to lookup different sources to get the right info I needed, seeing as how alot of it was either outdated or was for an older version of PVE which didn't apply for what I was doing, especially when it involved certain linux commands. I can see why many would just use a Windows VM for it all but containers I have read are alot lighter in resources.

All that's left now is to work on mounting and binding the media shares on my Unraid server so Emby can see those and can add them to the library. 

  • Thanks 1
Posted
On 5/17/2026 at 2:00 PM, AVTechMan said:

@Lukehello sir. 

 

Yes I finally got it worked out. Was a bit of a challenge but was determined to get it working, even if it meant wiping the entire PVE install and starting again from scratch. 

Basically what I did for starters was after removing the GPU from the Windows VM, I wiped out everything GPU and Nvidia by using purge commands in the CLI 'apt-purge -y'.

Afterward verified that everything was removed by using the 'dkms status' command to ensure that everything was gone and nothing remained. This is all for the host side. 

Then, I went ahead and downloaded the most recent drivers from Nvidia's website (I have two Quadro cards in my system) and downloaded the correct version I needed which was 580.xx. Once that was done in the host I did the 'nvidia-smi' which then picked up both cards in the host, so that verifies the drivers were installed on the host. 

 

Now on the Emby side with the container--

I reinstalled the Emby container using the helper script as unprivileged, though I did the advanced install as I wanted to modify a few parameters, but after that the install went fine. This time the script found and was able to setup the GPU pass-through for the cards, which it wasn't able to prior. However after the install was done, another error message came up saying that the nvidia-smi failed because of a library version mismatch with the host. And with that error, the GPU will not appear in the hardware acceleration section in Emby's server configuration. 

So after doing a little more investigation, it was determined that the helper script installed an older version of the drivers for the container as the ones on the host were newer. So I had to download the new driver again, this time inside the Emby container but I used an option on the install command, '--no-kernel-module' which instructs the installer to only install the libraries and not the second kernel driver. 

After all this and rebooted the container, Emby now finally picks up both GPUs and can see them when I go to Advanced for hardware acceleration, although I just selected only one GPU as I don't need both.  

 

Quite a bit of work just to get GPU pass-through to work in an container, and had to lookup different sources to get the right info I needed, seeing as how alot of it was either outdated or was for an older version of PVE which didn't apply for what I was doing, especially when it involved certain linux commands. I can see why many would just use a Windows VM for it all but containers I have read are alot lighter in resources.

All that's left now is to work on mounting and binding the media shares on my Unraid server so Emby can see those and can add them to the library. 

Thanks for following up with that info !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...