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 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". https://forum.qubes-os.org/t/create-a-gaming-hvm/19000/1
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 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.
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 think fedora may be a better fit for this, so I will work on that
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