First some kudos: I have to say I'm really impressed with Proxox. For context, I'm talking about a home lab setting here, and am less than a year into it. But for anyone in similar situation, it's been very usable, reliable, easy to work with, and pretty easy to get the info I need to resolve most problems. I used to have a VMware ESXi server  a few years back that I used for a couple of server workloads and some family VMs accessed through a PC or laptop. After a couple years I threw out ESXi, turned the host into a FreeNAS box with a couple of plug-ins (Unifi Controller, Plex Media Server), and deployed some Intel NUCs as PC's plus one as a "server" for stuff that didn't run (or run well) on FreeNAS.
I have a few questions to help me (maybe others) better understand what needs to be done with respect to GPU passthrough these day (February 2023). The posts I've found are dated and usually say to do lots of things that I didn't end up needing to do. While I can't help but think it's just simpler now than it used to be, I also wonder if I'm missing something given the things I left out.
My rig, built on a Supermicro H12SSL-CT motherboard, has 4 GPU's: one on the motherboard and three NVIDIA PCie cards: a GT710, a GTX1660 and a RTX3060.
I successfully passed through the RTX3060 to a Windows 10 VM for gaming, and the GTX1660 to a Ubuntu 20.04 VM to make it my new Plex Media Server by following the first 7 sections at https://pve.proxmox.com/wiki/Pci_passthrough. I didn't do anything after section 7, at least not in Proxmox, except confirm the needed VM machine config info, which was still relevant just about everywhere I went. Note that some of you may be stuck back on the fact that I used a VM, not a LXC. I found using a VM recommended for GPU Passthrough success - is that true or outdated too?
Instead of doing the blacklisting and driver installation at the Proxmox level, I did it in the individual VMs. I figured since I had to install the drivers in the VM anyway, whether or not I installed them at Proxmox level, why not just do it once and avoid tainting my Proxmox kernel (a message I see in
I might think differently if I was constantly building and blowing away VMs using the GPU device in question but that simply is not what I'm doing. Yes, I did have to start over a couple of times as I tried things out but that's not the purpose of this system.
Other than avoiding tainting the kernel, what am I missing by doing things this way? Are there some not-obvious impacts or unintended consequences related to what I did, or, actually, didn't do?
Below is the output of
Is the more important thing that it's not listed in the "Kernel drive in use" (see below)?
Another thing I noticed is that when I pass the whole card functionality by simply selecting the root device id, e.g. 81.00 using example below, and the "All Functions" checkbox in GUI, it brings through separate/distinct audio and other stuff (USB in the case of the GTX1660). While I may opt for the audio for sound from the VM in my remote desktop, I'm not sure if I need to do that to get sound, and whether I should skip the other stuff, e.g. USB, if I don't use it in the VM? Would I be able to use what I don't passthrough in other VMs - either shared resource or passed through - if I left it behind?
To summarize my questions are:
I have other related but different questions regarding using the GT710 card instead of the MB VGA to share with VMs in this other thread if you're interested (or bored).
Below is the GTX1660 as seen in the Proxmox host, followed by what the GTX1660 looks like in the Ubuntu 20.04 VM, then the output of
				
			I have a few questions to help me (maybe others) better understand what needs to be done with respect to GPU passthrough these day (February 2023). The posts I've found are dated and usually say to do lots of things that I didn't end up needing to do. While I can't help but think it's just simpler now than it used to be, I also wonder if I'm missing something given the things I left out.
My rig, built on a Supermicro H12SSL-CT motherboard, has 4 GPU's: one on the motherboard and three NVIDIA PCie cards: a GT710, a GTX1660 and a RTX3060.
I successfully passed through the RTX3060 to a Windows 10 VM for gaming, and the GTX1660 to a Ubuntu 20.04 VM to make it my new Plex Media Server by following the first 7 sections at https://pve.proxmox.com/wiki/Pci_passthrough. I didn't do anything after section 7, at least not in Proxmox, except confirm the needed VM machine config info, which was still relevant just about everywhere I went. Note that some of you may be stuck back on the fact that I used a VM, not a LXC. I found using a VM recommended for GPU Passthrough success - is that true or outdated too?
Instead of doing the blacklisting and driver installation at the Proxmox level, I did it in the individual VMs. I figured since I had to install the drivers in the VM anyway, whether or not I installed them at Proxmox level, why not just do it once and avoid tainting my Proxmox kernel (a message I see in
dmesg in my VM)? I'm thinking better the VM kernels end up tainted than the host kernel (or actually, both). I also did it to the minimum that worked - less than what's found in bottom half of the wiki page mentioned above (and elsewhere).I might think differently if I was constantly building and blowing away VMs using the GPU device in question but that simply is not what I'm doing. Yes, I did have to start over a couple of times as I tried things out but that's not the purpose of this system.
Other than avoiding tainting the kernel, what am I missing by doing things this way? Are there some not-obvious impacts or unintended consequences related to what I did, or, actually, didn't do?
Below is the output of
lspci -v for my GTX1660 in both Proxmox and the Ubuntu VM. I see it does show the "nouveau" driver in the VM as listed in the kernel modules. It's supposed to be blacklisted. I thought that meant it wouldn't be included in the kernel because I did:#nano /etc/modprobe.d/blacklist.conf 
blacklist nouveau 
<save/exit>
#update-initramfs -u
Is the more important thing that it's not listed in the "Kernel drive in use" (see below)?
Another thing I noticed is that when I pass the whole card functionality by simply selecting the root device id, e.g. 81.00 using example below, and the "All Functions" checkbox in GUI, it brings through separate/distinct audio and other stuff (USB in the case of the GTX1660). While I may opt for the audio for sound from the VM in my remote desktop, I'm not sure if I need to do that to get sound, and whether I should skip the other stuff, e.g. USB, if I don't use it in the VM? Would I be able to use what I don't passthrough in other VMs - either shared resource or passed through - if I left it behind?
To summarize my questions are:
- Is it really this easy now to do GPU passthrough in Proxmox today?
 - Is GPU Passthrough success better with a VM than a LXC when using Linux? (Bonus points: is there a better distro than others?)
 - What are the things I lose/miss out on, if any, by only installing/blacklisting video drivers in the VM compared with installing them in both Proxmox OS and the VM?
 - Can/Will having a blacklisted module in the VM kernel cause problems if the module is not listed as 'in use'?
 - Do I need to pass the video card's sound device to get sound out of my VM if I pass through the GPU?
 - What is best course of action in my situation in terms of passing through the other functions available in my video card, and will the ones left behind work elsewhere no problem?
 
I have other related but different questions regarding using the GT710 card instead of the MB VGA to share with VMs in this other thread if you're interested (or bored).
Below is the GTX1660 as seen in the Proxmox host, followed by what the GTX1660 looks like in the Ubuntu 20.04 VM, then the output of
pveversion -v:81:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 [GeForce GTX 1660 SUPER]
Flags: bus master, fast devsel, latency 0, IRQ 276, IOMMU group 13
Memory at f0000000 (32-bit, non-prefetchable) [size=16M]
Memory at 20000000000 (64-bit, prefetchable) [size=256M]
Memory at 20010000000 (64-bit, prefetchable) [size=32M]
I/O ports at b000
Expansion ROM at f1000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Legacy Endpoint, MSI 00
Capabilities: [100] Virtual Channel
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
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau
81:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 High Definition Audio Controller
Flags: bus master, fast devsel, latency 0, IRQ 63, IOMMU group 13
Memory at f1080000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
81:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1) (prog-if 30 [XHCI])
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 USB 3.1 Host Controller
Flags: fast devsel, IRQ 275, IOMMU group 13
Memory at 20012000000 (64-bit, prefetchable) [size=256K]
Memory at 20012040000 (64-bit, prefetchable) [size=64K]
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Power Management version 3
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: vfio-pci
Kernel modules: xhci_pci
81:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 USB Type-C UCSI Controller
Flags: bus master, fast devsel, latency 0, IRQ 272, IOMMU group 13
Memory at f1084000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Power Management version 3
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: vfio-pci
Kernel modules: i2c_nvidia_gpu
01:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 [GeForce GTX 1660 SUPER]
Physical Slot: 0
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 51
Region 0: Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
Region 1: Memory at d0000000 (64-bit, prefetchable) [size=256M]
Region 3: Memory at e0000000 (64-bit, prefetchable) [size=32M]
Region 5: I/O ports at 5000
Expansion ROM at fc000000 [virtual] [disabled] [size=512K]
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 High Definition Audio Controller
Physical Slot: 0
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin B routed to IRQ 17
Region 0: Memory at fc080000 (32-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
01:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1) (prog-if 30 [XHCI])
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 USB 3.1 Host Controller
Physical Slot: 0
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin C routed to IRQ 31
Region 0: Memory at e2000000 (64-bit, prefetchable) [size=256K]
Region 3: Memory at e2040000 (64-bit, prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
01:00.3 Serial bus controller: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] TU116 USB Type-C UCSI Controller
Physical Slot: 0
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin D routed to IRQ 30
Region 0: Memory at fc084000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: nvidia-gpu
Kernel modules: i2c_nvidia_gpu
proxmox-ve: 7.3-1 (running kernel: 5.15.85-1-pve)
pve-manager: 7.3-6 (running version: 7.3-6/723bb6ec)
pve-kernel-helper: 7.3-4
pve-kernel-5.15: 7.3-2
pve-kernel-5.15.85-1-pve: 5.15.85-1
pve-kernel-5.15.83-1-pve: 5.15.83-1
pve-kernel-5.15.74-1-pve: 5.15.74-1
ceph-fuse: 15.2.17-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.3
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.3-1
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-2
libpve-guest-common-perl: 4.2-3
libpve-http-server-perl: 4.1-5
libpve-storage-perl: 7.3-2
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.2-1
lxcfs: 5.0.3-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.3.3-1
proxmox-backup-file-restore: 2.3.3-1
proxmox-mail-forward: 0.1.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.5.5
pve-cluster: 7.3-2
pve-container: 4.4-2
pve-docs: 7.3-1
pve-edk2-firmware: 3.20220526-1
pve-firewall: 4.2-7
pve-firmware: 3.6-3
pve-ha-manager: 3.5.1
pve-i18n: 2.8-2
pve-qemu-kvm: 7.1.0-4
pve-xtermjs: 4.16.0-1
qemu-server: 7.3-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+2
vncterm: 1.7-1
zfsutils-linux: 2.1.9-pve1