Can't get Nvidia GPU passthrough to work on LXC

fabian69420

New Member
Jun 18, 2026
4
0
1
Hey there, I recently added an NVidia RTX 3060 ti GPU to my working Proxmox server and I wanted to pass it through to my Debian LXC container to use with Jellyfin for 4k films.

How I have it configged right now: Proxmox running a Debian 13 LXC Container (unpriviledged), which runs a docker container containing Jellyfin.


I tried to follow the guide over here: https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/nvidia
Tried the Debian one and the Virtual environment one, but when I:

Code:
# modprobe nvidia

modprobe: FATAL: Module nvidia-current not found in directory /lib/modules/7.0.2-6-pve

modprobe: ERROR: Error running install command 'modprobe -i nvidia-current ' for module nvidia: retcode 1

modprobe: ERROR: could not insert 'nvidia': Invalid argument


# nvidia-smi

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

so it appears not to work, even though i downloaded the nvidia-driver package (even went through the trouble of setting up the auto-detect thing just to be sure) and the linux-header-amd64. oh- also the errors above i get on the Proxmox host as well as the debian container

I honestly don't know what else to add here, so if there's anything I need to add in order to receive help with this, please let me know.
 
hey, thanks for reaching out! i tried to use your guide, specifically the Nvidia-specific part of the GPU passthrough section. but still no worky. and i ran a lot of commands on the host as well as the container bc it wasnt clear to me where i should use them, so often i just tried both to see what sticks
 
Let's start with this from the node side
Bash:
lspci -vnnk | awk '/VGA/{print $0}' RS=
nvidia-smi
pct config CTIDHERE
 
this is what i get. also i used to think node meant CT/VM, so i re-checked but apparently the node is the host right? anyhow this is on the host:

Code:
# lspci -vnnk | awk '/VGA/{print $0}' RS=
nvidia-smi
pct config CTIDHERE
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104 [GeForce RTX 3060 Ti] [10de:2486] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: PC Partner Limited / Sapphire Technology Device [174b:a632]
        Flags: fast devsel, IRQ 255, IOMMU group 12
        Memory at f5000000 (32-bit, non-prefetchable) [size=16M]
        Memory at fa00000000 (64-bit, prefetchable) [size=8G]
        Memory at fc00000000 (64-bit, prefetchable) [size=32M]
        I/O ports at f000 [size=128]
        Expansion ROM at f6000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Legacy Endpoint, IntMsgNum 0
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [250] Latency Tolerance Reporting
        Capabilities: [258] L1 PM Substates
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [420] Advanced Error Reporting
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] Secondary PCI Express
        Capabilities: [bb0] Physical Resizable BAR
        Capabilities: [c1c] Physical Layer 16.0 GT/s <?>
        Capabilities: [d00] Lane Margining at the Receiver
        Capabilities: [e00] Data Link Feature <?>
        Kernel driver in use: vfio-pci
        Kernel modules: nvidia
07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c4) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device [1043:8877]
        Flags: bus master, fast devsel, latency 0, IRQ 81, IOMMU group 15
        Memory at fc10000000 (64-bit, prefetchable) [size=256M]
        Memory at fc20000000 (64-bit, prefetchable) [size=2M]
        I/O ports at d000 [size=256]
        Memory at f6500000 (32-bit, non-prefetchable) [size=512K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Legacy Endpoint, IntMsgNum 0
        Capabilities: [a0] MSI: Enable- Count=1/4 Maskable- 64bit+
        Capabilities: [c0] MSI-X: Enable+ Count=4 Masked-
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [270] Secondary PCI Express
        Capabilities: [2a0] Access Control Services
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Capabilities: [410] Physical Layer 16.0 GT/s <?>
        Capabilities: [450] Lane Margining at the Receiver
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

400 Parameter verification failed.
vmid: type check ('integer') failed - got 'CTIDHERE'
pct config <vmid> [OPTIONS]

it can find both the dedicated Nvidia GPU and the intergrated AMD GPU. but the AMD one is irrelevant for this as its the nvidia card i wanna use
 
Kernel driver in use: vfio-pci
Seems like you configured it for PCI(e) passthrough or gave it to a VM. You need to reverse that for this to work. The driver should be nvidia.
CTID is a placeholder. Use your CT's ID here.
 
i removed the vfio-pci through
Code:
modprobe -r vfio-pci

then it became this:
Code:
01:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3060 Ti] (rev a1)
        Subsystem: PC Partner Limited / Sapphire Technology Device a632
        Kernel modules: nvidia

but after a reboot it becomes:
Code:
01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)
        Subsystem: PC Partner Limited / Sapphire Technology Device a632
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel


also:

Code:
# pct config 103
arch: amd64
cores: 6
features: nesting=1
hostname: media
memory: 4096
mp0: /mnt/usbstick,mp=/mnt/usbstick
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.2.254,hwaddr=BC:24:11:33:11:54,ip=192.168.2.207/24,type=veth
onboot: 1
ostype: debian
rootfs: media:103/vm-103-disk-0.raw,size=3500G
swap: 2048
unprivileged: 1
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 62
lxc.idmap: g 107 993 1
lxc.idmap: g 108 100108 65428
 
That is not how to reverse this. Share this
Bash:
find /etc/modprobe.d/* -exec tail -n+1 {} +
tail -n+1 /proc/cmdline /etc/kernel/cmdline /etc/default/grub
grep -sR "hostpci" /etc/pve
The modern way is via dev:, not lxc.mount.entry:.