Gaming VM on Qubes OS : almost there (I think)

Hi everyone! I’ve attempted and gotten close to getting GPU passthrough to work on Qubes OS.

I got a windows VM up and running in Qubes and passed through my 2080 super. It was found by the windows VM, but I couldnt install the drivers because of the infamous code 43 error on the Nvidia GPU. I found out that you can’t bypass the code 43 with Xen (the hypervizor Qubes uses). From what I can tell, I have 4 options left :

  • find a way to bypass that driver limitation within windows (have tried but been unsuccessful)
  • figure out how to get KVM to run on Qubes alongside Xen
  • patch Xen to change it’s signature
  • buy an AMD card (oh well)



Now a few more details

I have done GPU passthrough with kvm in the past with the same PC.
I was actually surprised by how easy it was to go GPU passthrough with Qubes… there was a menu dedicated to pcie passthrough in the Qubes manager. I say this because I’d heard GPU passthrough was hard to do with Qubes and Xen in general, so i suppose it’s possible I’m having a much bigger problem than I thought ? But I doubt it. Like I said, Windows is finding the 2080 super.
From the device manager in the Windows VM, I could see my GPU (proper name and everything) with a little yellow warning sign on it… I’m not sure if it means there’s a hardware issue or a driver issue or what, but it did mention code 43 which made me think it’s just the nvidia driver doing… what the nvidia driver is supposed to :stuck_out_tongue: . I actually took it as a sign that the passthrough was working properly.
Speaking of drivers, I tried installing some obscure custom nvidia drivers from github that supposedly bypassed the code 43 error, but that didnt work for me. In fact, I’m not even sure how to install custom drivers in Windows at all. Needless to say, I have no idea what I’m doing at this point.
I also looked into how to “hide” the VM signature, like we do in KVM, but on Xen. And what I mostly found out is that, you can’t, and the xen devs aren’t interested in making it possible. I did find a strange patch for xen, claiming to allow you to change the signature on xen. But I had absolutely no clue what I was even looking at (am I allowed to link the patch in question? I’m not sure, this is my first post).
At that point I wanted to see if I could get KVM to run at all on Qubes. Out of curiosity, I installed virt-manager, and it found all the VMs Qubes had created, including the gaming Windows VM. Virt-manager just connected to Xen, like it’s supposed to. Now when I try to create a new VM from virt-manager, I see a drop-down menu asking me to choose a hypervizor, with xen the only option available.

Now, I have very little knowledge on KVM. I did see that it was directly tied to the linux kernel, which made me wonder if I could somehow enable it in Qubes. Assuming I know how to enable KVM in a linux kernel, and that I was also able to find the uncompiled Qubes linux kernel, then maybe I could enable KVM in there and install the custom kernel ? That seems very ambitious. Or maybe KVM is already installed in the Qubes kernel but they don’t make the packages available ?

I’m still willing to try the other two options some more. Maybe with your help I could install some custom nvidia drivers that would work, regardless of hypervizor. Or maybe one of you figures out how to change the signature on Xen.

As for the last option, I will buy an AMD gpu… eventually. Finances are tight these days :stuck_out_tongue:

This might help:

I’m a little familiar with windows drivers, so if you have more details on what went wrong with the custom drivers I might be able to help.

First step is being able to make a custom build of Xen. Then you can change the source code to change the signature, and rebuild, then you should be good.

Perhaps start here:

I’m not %100 is that is the right place, but basically, look through their docs on how to build qubes.

Yep, you can, no issues with that.

1 Like

I’m interested in trying this out on a Threadripper pro build. I don’t need a lot of windows apps, but gaming is a necessary part of game development. Im using currently a very trimmed down version of windows enterprise ltsc. Trying to remove as much of the windows BS as possible. I’ve used linux in my personal laptop for years, started with ubunto and then Arch. I was trying to use arch as host and vmware for apps. Its not going well. Now looking at cubes os. honestly i love the virtualized compartments. but i hate the desktop(DOM). seamless mode is the goal similar to how linuxsubsystem runs in windows. Just checking to see how far you have gotten towards the gaming on qubes?

Have you tried doing this lately with the newest drivers that allow for virtualization? I’m interested to see if you can get further in the passthrough process on Qubes now that Nvidia has given us the blessing.

Unfortunately I have given up on Qubes.
Sadly I just don’t think the OS is suited for gaming at all, on top of having too many rough edges.
However I’m excited about Spectrum though it is still in very early stages of development from what I gather.