Hello all,
I know much has been written about this subject, but I was still confused and I think I am not alone.
I recorded all the steps to get an RTX nvidia card passed through (using second screen/input plugged into the video card).
NOTE: This is a work in progress, and there are lots of improvements to be made. Please feel free to help make this better.
First follow this guide up until “preparing the guest”.
Create a Gaming HVM
create standalone HVM qube (not based on a template*)
increase ram and cpu (I did 4000mb, 6 vcpus)
increase system storage to 25gb
Qube Manager → qubes settings → advanced → boot qube from cd-rom
select debian .iso (I used debian 12 KDE live)
configure network manually: disable ipv6, set ipv4 to manual. Copy DNS servers, IP, netmask, and gateway. They’re listed in the qube settings. Afterwards disconnect and reconnect your network connection.
install debian
reboot
attach pci devices
start qube
sudo apt update && sudo apt full-upgrade
add contrib and non-free to /etc/apt/sources.list (comment out deb-src rows)
sudo apt install linux-headers-amd64
sudo apt install nvidia-driver firmware-misc-nonfree
reboot (not sure if necessary)
sudo apt install nvidia-xconfig
sudo nvidia-xconfig --prime (these were the missing sauce for me)
reboot
Now you should be able to switch to your GPU output and have a fully accelerated VM. I got over 100 fps on cyberpunk ultra settings in the benchmark!
Questions:
-
How can I make this standalone based on a template instead of the raw .iso? When I try this the qube starts silently in the background instead of spawning a virtual display, and I haven’t been able to get nvidia-smi working this way.
-
What distros have you all successfully achieved this on? I tried a bunch but this is the first I had success with. Was not able to get bazzite, majaro, or nobara working. I am realizing this is probably due to driver/kernel mismatches, and wayland. I’d be very curious to hear if anyone has gotten this functional with wayland, a fresh nobara install displays on wayland but it was not accelerated. Up to date nobara no longer includes xorg, which is unfortunate because I think it would work flawlessly with x11. I tried manually installing x11 but it still did not appear as an option at the lock screen. If anyone more knowledgeable has an idea how to fix this I’d love to hear. Same goes for Fedora workstation, which I’m working to figure out as I think it would be a good fit for this.
-
Has anyone gotten a gpu passthrough qube working well on wayland? If so I’d love to hear about it!
-
This uses the proprietary nvidia-driver package. I’m curious about if nvidia-open is worth using, if anyone has insight on the pros and cons, or has a suggestion for which distro to test this with please let me know.
-
If anyone wants pictures or maybe a video of these steps I can try to do that
Please forgive the rushed post, and don’t hesitate to comment if you need support