Hardware Accelerated Decode (Nvidia) for Linux

Just in case anyone comes here later, I posted my complete reinstall guide here: Plex HW acceleration in LXC container - anyone with success?

My server’s down at the moment, so I can’t check to verify your lspci -v vs mine but I don’t think there’s an issue with it listing it as a module that’s available as long as it’s not the driver in use.

If nvidia-smi works, I’m fairly certain you have the nouveau driver blacklisted.

Not sure how you installed persistanced but I’d recommend you run the install.sh here: https://github.com/NVIDIA/nvidia-persistenced/tree/master/init

After that, you should be able to do:
sudo systemctl start nvidia-persistenced
sudo systemctl status nvidia-persistenced

That should let you know if it starts and runs. If it does, then go ahead and do:
sudo systemctl enable nvidia-persistenced

You’ll want to do it this way because otherwise, every reboot you’ll have to go in and manually command persistence mode back on.

At that point, check your to see if uvm/uvm-tools comes up. When I didn’t see those it’s usually because persistance isn’t running. You only need this server side. For a discussion of why this is needed, see here: https://us.download.nvidia.com/XFree86/Linux-x86/375.26/README/nvidia-persistenced.html

For unlimited streams, you only install on the host side. The container leverages the host side’s kernel install. That’s why we do the install on the container side with --no_kernel

The only thing you need on the container side is just the install of the nvidia tools that match the version on the host. And really, you may not even need that, I just haven’t tried without them because I like to be able to run nvidia-smi on the container side too for sanity that it’s working there.

It took me some trial and error and looking through a lot of guides to get it working right, no one seemed to have the ‘right’ answer for me. But it’s slick when it does and it lets me spin up multiple containers that all have GPU access. Was worth the effort for me.

1 Like