Nvidia-smi returns No devices were found on debian 12 vm with gpu passthrough

Hello, I successfully passed a GeForce GTX 1060 6GB to a Debian 12 vm which resides in a proxmox ve host.

lspci returns both the vga controller and the audio device:

00:10.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)
00:10.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)

I’ve followed the standard procedure and blacklisted nouveau in /etc/modprobe.d/nvidia-blacklist.conf:

blacklist nouveau
options nouveau modeset=0

I’ve installed drivers following the debian recommended process.

Still nvidia-smi returns:

No devices found

and dmesg shows this error:

[21857.111339] NVRM: GPU 0000:00:10.0: RmInitAdapter failed! (0x24:0x72:1423)
[21857.111623] NVRM: GPU 0000:00:10.0: rm_init_adapter failed, device minor number 0

I’m attaching nvidia-bug-report.sh output.

Thanks in advance for the support.

nvidia-bug-report.log.gz (62.1 KB)

Did you ever find a solution to this? I’m in a similar boat (except with a Debian 11 VM, in Proxmox). I can see that the GPU is passed through to the VM and I’ve installed all the drivers without errors (and I’ve verified they’re installed).
But nvidia-smi still returns “no devices found”. I’m thinking it’s a kernel issue, but I’m not knowledgeable enough to fix it.

It depends on the exact rminit error. The error of the OP 0x24,0x72 points to the host OS hold a grip on the gpu’s frabuffer. Can usually be fixed by removing/adding back the gpu from the pci bus.