Hi there. I have tried many times to get GPU passthrough to work on Qubes OS R4.3 with my NVIDIA GeForce RTX 5060 graphics card. No luck. Debian 13 guest? Fedora 43? Windows 11? No, no, and no.
GPU passthrough worked great with Qubes R4.2 and an older NVIDIA card (4050, I think it was). But I haven’t been able to get it to work on Qubes 4.3 at all.
Standalone Linux guests start up, but they don’t respond to Qubes commands to start applications or the like. To interact with them, I have to use the “Open console in qube” button from Qube Manager. It’s a major pain. And what it shows me is errors and warnings in the system log.
The most relevant errors seem to be:
nvidia-persistenced[1076]: device 0000:00:06.0 - failed to open.
kernel: [drm: nv_drm_dev_load: [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000006] Failed to allocate NvKasKapiDevice
I’m attaching the NVidia GPU and associated audio device to the qubes in question using:
qvm-pci attach --persistent -o permissive=True d13-game-devel-2 dom0:00:01.0-00_00.0
qvm-pci attach --persistent -o permissive=True d13-game-devel-2 dom0:00:01.0-00_00.1
Sometimes I add -o no-strict-reset=True, sometimes I don’t. It makes no difference.
I just updated my Debian qube to the latest NVidia drivers, version 610.43.2. Same results.
I tried adding intel_iommu=off to the guest kernel parameters. That didn’t work any better.
Any help or advice would be very much appreciated. I am a gamer and game developer, so 3D acceleration is a must-have feature for me.
This is how I created a (working) standalone VM in Qubes 4.3 for GPU passthrough of my NVIDIA RTX 4060:
prerequisites
check in dom0:
qvm-pci
BACKEND:DEVID DESCRIPTION
dom0:00_01.0-00_00.0 Display: NVIDIA Corporation AD107 [GeForce RTX 4060] dom0:00_01.0-00_00.1 Audio: NVIDIA Corporation AD107 High Definition Audio Controller
creation of ai-gpu VM
create script in dom0
nano create_ai-gpu.sh
#/!bin/bash
qvm-create --class StandaloneVM --label green --template debian-13-xfce --property virt_mode=hvm ai-gpu
qvm-prefs ai-gpu kernel ''
qvm-prefs ai-gpu memory 16384
qvm-prefs ai-gpu maxmem 16384
qvm-prefs ai-gpu vcpus 4
qvm-prefs ai-gpu qrexec_timeout 7200
qvm-pci attach --persistent ai-gpu dom0:00_01.0-00_00.0
qvm-pci attach --persistent ai-gpu dom0:00_01.0-00_00.1
qvm-volume resize ai-gpu:root 120G
qvm-volume resize ai-gpu:private 200G
chmod +x create_ai-gpu
./create_ai-gpu.sh
use settings of ai-gpu (in Qubes GUI) to disable
“include in memory balancing” checkbox!
qvm-start ai-gpu
first start lasts several minutes because of expanding the filesystems!
optional after first start: qvm-prefs ai-gpu qrexec_timeout 60 (default value)
check for PCI devices & block devices
in ai-gpu:
sudo apt update
sudo apt install pciutils # install lspci
check for PCI devices
lspci
00:06.0 VGA compatible controller: NVIDIA Corporation AD107 [GeForce RTX 4060] (rev a1)
00:07.0 Audio device: NVIDIA Corporation AD107 High Definition Audio Controller (rev a1)
After that do all the driver stuff. I can copy this as well, but first make sure to succeed in the above steps.