GPU Passthrough in Proxmox: Complete Guide for Homelabs
Give your virtual machines near-native GPU performance. From AI workloads to gaming, learn how to configure GPU passthrough in Proxmox with practical steps, troubleshooting tables, and performance tuning tips.
Table of Contents
- What Is GPU Passthrough?
- Why Bother?
- The Catch
- Hardware Requirements: Can You Even Do This?
- CPU Support
- Motherboard Requirements
- GPU Compatibility
- BIOS Settings Checklist
- Step-by-Step Proxmox Setup
- 1. Enable IOMMU in the Kernel
- 2. Load VFIO Modules
- 3. Blacklist GPU Drivers
- 4. Reboot and Verify
- 5. Configure the VM
- 6. Install Guest Drivers
- Single GPU vs. Multi-GPU Setups
- Multi-GPU (Recommended)
- Single GPU (It’s Possible, But…)
- Common Problems and Fixes
- Error 43 on Windows (NVIDIA)
- AMD Reset Bug
- BAR 3 / BAR 0 Errors
- Black Screen in VM
- HDMI Audio Crackling
- “Unsafe Interrupts” Error
- Performance Tuning
- Host-Side Tuning
- VM Configuration
- GPU-Specific Notes
- Verify Performance
- When Passthrough Won’t Work: Alternatives
- vGPU (Virtual GPU)
- Intel GVT-g
- SR-IOV
- Recommended Configurations
- Gaming VM
- AI/ML Workload VM
- Media Server (Plex/Jellyfin)
- Wrapping Up
So you’ve got a GPU sitting idle while your VMs run on CPU alone. Or maybe you’re tired of maintaining a separate machine just for gaming or AI workloads. GPU passthrough is the answer—and Proxmox makes it surprisingly approachable.
Let’s walk through everything you need to know: what it is, whether your hardware can handle it, and how to set it up without pulling your hair out.
What Is GPU Passthrough?
GPU passthrough gives a virtual machine direct access to a physical graphics card. Instead of virtualizing the GPU (which comes with overhead), the VM gets near-native performance because it talks directly to the hardware.
Think of it like handing someone the keys to your car versus driving them around in a sidecar. One is way more performant.
Why Bother?
AI and Machine Learning. This is the big one right now. Local LLM inference with Ollama, training models with PyTorch, running CUDA workloads—all of these need a real GPU. Consumer cards work great for homelab setups.
Gaming in a VM. Run Windows in a VM with full GPU performance for gaming, then pause or snapshot it when you’re done. No dual-boot hassle.
Media Transcoding. Plex and Jellyfin hardware transcoding (NVENC for NVIDIA, VAAPI for AMD) can handle multiple streams effortlessly when given direct GPU access.
Professional Workloads. 3D rendering, video editing, CAD—all benefit from GPU acceleration in the VM.
The Catch
A passed-through GPU is exclusive to that VM. The host can’t use it, and neither can other VMs. You’ll need a separate GPU (or iGPU) for the Proxmox host itself.
Hardware Requirements: Can You Even Do This?
Not every CPU and motherboard supports GPU passthrough. Here’s what you need.
CPU Support
| Vendor | Feature Required | Supported Generations |
|---|---|---|
| Intel | VT-d | Haswell (4th gen) and newer |
| AMD | AMD-Vi (IOMMU) | Bulldozer and newer |
Most modern consumer CPUs support this. Older AMD K10 chips need specific motherboards (890FX or 990FX chipset).
Quick check: Intel’s ARK database lets you filter by VT-d support. AMD has similar documentation.
Motherboard Requirements
- IOMMU/VT-d enabled in BIOS — This is non-negotiable. Set it to Enabled, not Auto.
- ACS (Access Control Services) — Required for proper device isolation. Server boards tend to have better support than consumer boards.
- Above 4G Decoding — Required for modern GPUs with large VRAM.
GPU Compatibility
NVIDIA: Everything from GeForce 7 through RTX 40-series works. Consumer cards may need driver tweaks (we’ll cover Error 43 later), but they work. For multi-VM sharing, you’ll need Quadro, RTX A-series, or Tesla cards with vGPU licensing.
AMD: Radeon 5000-7000 series work. Navi cards (5000/6000/7000 series) have a reset bug—fixable, but annoying.
Intel: 5th-7th gen Core iGPUs support GVT-g (virtual GPU). Arc discrete GPUs can be passed through directly.
BIOS Settings Checklist
Before you start, make sure these are configured:
| Setting | Value | Notes |
|---|---|---|
| VT-d / IOMMU | Enabled | Not Auto—force it on |
| Intel VT-x / AMD-V | Enabled | Hardware virtualization |
| Above 4G Decoding | Enabled | Required for 24GB+ VRAM GPUs |
| Resizable BAR / SAM | Disabled | Breaks passthrough in VMs |
| CSM / Legacy Boot | Disabled | Cleaner for single-GPU setups |
| Primary Display | iGPU or PCI | Use iGPU for host if available |
Step-by-Step Proxmox Setup
Alright, let’s configure your Proxmox host for GPU passthrough.
1. Enable IOMMU in the Kernel
Edit /etc/default/grub and add the appropriate parameters to GRUB_CMDLINE_LINUX_DEFAULT.
For Intel:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
For AMD:
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt"
The iommu=pt enables passthrough mode—bypasses hypervisor DMA translation for better performance.
Update GRUB:
update-grub
2. Load VFIO Modules
Add the VFIO modules to load at boot:
cat >> /etc/modules << EOF
vfio
vfio_iommu_type1
vfio_pci
EOF
Update initramfs:
update-initramfs -u -k all
3. Blacklist GPU Drivers
Prevent the host from claiming the GPU. Create /etc/modprobe.d/blacklist.conf:
For NVIDIA:
cat >> /etc/modprobe.d/blacklist.conf << EOF
blacklist nouveau
blacklist nvidia*
EOF
For AMD:
cat >> /etc/modprobe.d/blacklist.conf << EOF
blacklist amdgpu
blacklist radeon
EOF
4. Reboot and Verify
reboot
After reboot, verify everything loaded correctly:
# Check IOMMU is enabled
dmesg | grep -e DMAR -e IOMMU -e AMD-Vi
# Verify interrupt remapping (security feature)
dmesg | grep 'remapping'
# Confirm VFIO modules loaded
lsmod | grep vfio
# Check GPU is bound to vfio-pci
lspci -nnk | grep -A3 -i nvidia
# Should show: "Kernel driver in use: vfio-pci"
5. Configure the VM
You can do this through the GUI or CLI. Here’s both.
GUI Method:
- Select your VM → Hardware → Add → PCI Device
- Choose your GPU from the list
- Enable “All Functions” if the GPU has audio on the same bus
- Enable “PCI-Express” for q35 machines
- Check “Primary GPU” if this is the main display
CLI Method:
# Basic passthrough (replace VMID with your VM number)
qm set 100 -hostpci0 01:00,pcie=on,x-vga=on
# For GPUs with audio device on same bus
qm set 100 -hostpci0 01:00,pcie=on,x-vga=on,romfile=vbios.bin
Recommended VM Configuration:
| Setting | Value | Why |
|---|---|---|
| Machine Type | q35 | Required for PCIe passthrough |
| BIOS | OVMF (UEFI) | Modern GPUs need UEFI |
| CPU Type | host | Passes through CPU features |
| CPU Affinity | Pinned cores | Better performance (optional) |
6. Install Guest Drivers
Boot your VM and install the appropriate drivers:
- Windows: Download from NVIDIA or AMD’s website. For headless setups, enable Remote Desktop first.
- Linux: Install
nvidia-driveroramdgpu-install. For CUDA workloads, install the CUDA toolkit.
Single GPU vs. Multi-GPU Setups
Multi-GPU (Recommended)
The cleanest setup: one GPU for the host, one for the VM. Your iGPU can serve as the host GPU if you have one.
- Install Proxmox normally
- Pass through the dedicated GPU to the VM
- Host uses iGPU for console
- No complicated scripts needed
Single GPU (It’s Possible, But…)
Running Proxmox and your VM on the same GPU requires hook scripts to swap the device between them. When the VM starts, the GPU detaches from the host; when it stops, it reattaches.
If you must go this route:
- Use iGPU for host display if your CPU has one
- Add
video=efifb:offto kernel parameters - Create hook scripts for GPU detachment/reattachment
- For AMD cards, install
vendor-reset(see troubleshooting below)
It works, but it’s finicky. Consider yourself warned.
Common Problems and Fixes
Error 43 on Windows (NVIDIA)
Symptom: Device Manager shows “Code 43” for the GPU. Black screen.
Solutions:
| Cause | Fix |
|---|---|
| KVM visibility | Add -cpu host,kvm=off to VM args |
| Resizable BAR enabled | Disable in BIOS |
| Driver version mismatch (vGPU) | Match guest driver to host version |
| Mobile/vGPU variant detection | Add device-id spoofing to VM config |
For args workaround, add to your VM config:
args: -cpu host,kvm=off
AMD Reset Bug
Symptom: GPU works on first VM boot, fails on subsequent boots until host reboot.
Affected Cards: Navi architecture (5000/6000/7000 series)
Fix: Install the vendor-reset kernel module:
# Install build dependencies
apt install pve-headers-$(uname -r) build-essential git
# Build and install vendor-reset
git clone https://github.com/gnif/vendor-reset.git
cd vendor-reset
make
make install
# Load module at boot
echo "vendor-reset" >> /etc/modules
update-initramfs -u -k all
reboot
BAR 3 / BAR 0 Errors
“BAR 3: can’t reserve”:
Add to kernel command line:
video=efifb:off
“BAR0 is 0M” / Code 12:
Large VRAM GPUs (24GB+) exceed OVMF’s memory window. Set phys-bits:
qm set 100 --cpu host,phys-bits=host,flags=+pdpe1gb
Black Screen in VM
| Cause | Solution |
|---|---|
| GPU not primary | Add x-vga=on to hostpci config |
| No driver installed | Boot with VNC, install guest drivers first |
| Wrong BIOS mode | Use OVMF for UEFI-capable GPUs |
| Windows Fast Startup | Disable in Windows power settings |
Disable Windows Fast Startup:
powercfg -h off
Or: Control Panel → Power Options → “Choose what power button does” → Uncheck “Turn on fast startup”
HDMI Audio Crackling
Enable MSI for GPU audio:
echo "options snd-hda-intel enable_msi=1" >> /etc/modprobe.d/snd-hda-intel.conf
update-initramfs -u -k all
reboot
“Unsafe Interrupts” Error
Older hardware may lack interrupt remapping. Enable the workaround (slight security trade-off):
echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
Performance Tuning
You’ve got passthrough working. Let’s squeeze out more performance.
Host-Side Tuning
CPU Pinning:
Dedicate specific cores to your VM for reduced latency:
qm set 100 --affinity 0-3
Hugepages:
For latency-sensitive workloads (AI training, gaming), use hugepages:
# Add to /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="... hugepagesz=1G hugepages=16"
# Or dynamically
echo 16 > /sys/kernel/mm/hugepages/hugepages-1048576/nr_hugepages
VM Configuration
| Setting | Optimal Value | Notes |
|---|---|---|
| Machine | q35 | Better PCIe support |
| BIOS | OVMF | Modern GPUs require UEFI |
| CPU Type | host | Passes through all CPU features |
| Disk | VirtIO SCSI single + IO thread | Fastest disk controller |
| Disk Cache | Write-back | Faster; no-cache is safer but slower |
| Network | VirtIO | Paravirtualized, minimal overhead |
GPU-Specific Notes
NVIDIA: Consumer GeForce cards limit NVENC encoding sessions (3-5 simultaneous). Quadro and datacenter cards have no limit. For Plex/Jellyfin transcoding, this matters.
AMD: No encoding session limits, but VAAPI quality varies. ROCm compute only works reliably on Linux guests—Windows support is experimental.
Verify Performance
# Inside Linux VM
nvidia-smi -l 1 # Watch GPU utilization
glxgears # Basic OpenGL test
# For AI workloads
# Test CUDA/ROCm with your model
Well-configured passthrough gets you 95%+ of bare-metal GPU performance.
When Passthrough Won’t Work: Alternatives
vGPU (Virtual GPU)
Split one GPU across multiple VMs. Requires NVIDIA licensing and supported cards (RTX A-series, Quadro RTX, Tesla).
# Enable SR-IOV virtual functions
systemctl enable --now [email protected]
# Add vGPU to VM
qm set 100 -hostpci0 01:00.4,mdev=nvidia-660
Good for homelabs that need GPU across multiple VMs, but licensing cost is real.
Intel GVT-g
Virtualize Intel’s iGPU. Works on 5th-7th gen Core processors.
# Add kernel parameter
i915.enable_gvt=1
# Create vGPU for VM
qm set 100 -hostpci0 00:02.0,mdev=i915-GVTg_V5_4
Depreciated on newer Intel CPUs—use SR-IOV for 8th gen+.
SR-IOV
Hardware-level virtualization for network cards and some GPUs. Intel Arc GPUs support this natively. NVIDIA requires vGPU licensing for SR-IOV use on Ampere+ cards.
Recommended Configurations
Gaming VM
# Host config
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
# VM config (100.conf)
machine: q35
bios: ovmf
cpu: host
cores: 8
memory: 16384
hostpci0: 01:00,pcie=on,x-vga=on
Use dedicated GPU for gaming VM, iGPU for host.
AI/ML Workload VM
# VM config
machine: q35
bios: ovmf
cpu: host
cores: 16
memory: 65536
hostpci0: 01:00,pcie=on
# For NVIDIA: Install CUDA toolkit in guest
# For AMD: Install ROCm (Linux only)
Consider hugepages for large models. Pin CPU cores for training workloads.
Media Server (Plex/Jellyfin)
# VM config
machine: q35
bios: ovmf
cpu: host
cores: 4
memory: 8192
hostpci0: 01:00,pcie=on
# Enable NVENC in Plex/Jellyfin
# No x-vga needed for headless transcoding
NVENC handles multiple transcodes efficiently. Consumer NVIDIA cards: 3-5 sessions. Quadro/datacenter: unlimited.
Wrapping Up
GPU passthrough in Proxmox opens up serious capability: local AI workloads, gaming VMs, hardware transcoding—all on one box. The setup has a learning curve, but once configured, it’s rock solid.
Quick checklist before you start:
- Verify VT-d/IOMMU support in your CPU and motherboard
- Enable it in BIOS (not Auto—Enabled)
- Disable Resizable BAR
- Use q35 machine type with OVMF
- Install vendor-reset if you have an AMD Navi card
When it works, you get near-native GPU performance in a VM. That’s the power of proper virtualization: one machine, many workloads, no compromise.
Found this guide helpful? I’d love to hear about your passthrough setup—drop a comment or ping me on Mastodon.

Comments
Powered by GitHub Discussions