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)