What is the state of GPU Pass through on QubesOS in 2023? I’ve seen many posts dating years back of people successfully doing so but I haven’t seen any guides or documentation posted anywhere, or anyone doing it recently. Also, what are the security risks relating to GPU Pass through on QubesOS?
I have an extra question, if GPU passthrough does work, will the GPU allocated virtual machine display apps on the inside of dom0 like every other program, using the normal qubes virtual machine viewing, or will I have to route the GPU directly to a separate monitor to view the virtual machine? Or would it be possible to do something like looking-glass.io ?
Yes, you need to connect a display to the GPU, if you want to use the video output.
Most monitors can handle multiple input, so you can connect a monitor to both gpus, and just switch the input when you want to use the second gpu. You can also use a KVM switch, or just have a dedicated monitor, I don’t know if looking glass will work.
I was wondering exactly the same and then I was been able to achieve both setups. I should document it sometime. I used this guide successfully.
Since I have an NVIDIA graphics card and I picked Linux distributions that would come pre-installed with the proprietary nvidia drivers out of the box. (I may explore the open source version in the future, but I hear it’s not yet ready for prime time and I just wanted to get something working).
With Manjaro HVM
With Manjaro I could get everything working with the Qubes integration and the graphics card worked perfectly. The only thing is that the screen outputs from the graphics card to a second monitor.
When booting from the ISO, I selected the “boot with proprietary drivers” option and it booted right away on the second monitor.
If I install the qubes-gui package it’ll still display in the second monitor but the screen is white on the background. This hints me that the Qubes-gui is partially working but it can’t forward it to the original VM.
But at least here the graphics card is working perfectly fine, and blender renders work perfect.
Nobara is a fedora-based “gaming”-oriented OS. I couldn’t really find its full source code and it seems to be a hobby project, but I gave it a shot anyway. And it worked (almost flawlessly).
As opposed to Manjaro, here the installer showed up on the main screen (the one coming out of the motherboard). Then after the installation, the “welcome screen” had options to install Nvidia proprietary drivers. After it installed the drivers, both screens showed the screen. After restart it only displayed output from the graphics card screen and the main one was black.
From there I could use it just like manjaro on the second screen, but then I tried integrating it with the qubes tools and here the GUI actually worked and it started showing blender, for example in its own window.
But it wasn’t perfect. Even though blender detected and used the graphics card, the UI was pretty slow. Other programs also detected the graphics card but had other issues.
If I may briefly weigh in with a question and thank you very much for the stimulating discussion so far: I recently ordered a laptop from Eurocom with the following configurations, hoping to get GPU passthrough on the marvel. Now I am wondering if this would work as I will have an Intel iGPU and a dedicated NVIDIA one. (I insisted on the MXM module, that’s why only RTX3080).
This should work using NVIDIA prime discrete mode rendering to not use a dedicated screen, however you may need a dedicated usb mouse to assign to the VM otherwise I don’t think games will be able to capture your mouse cursor.
Please, be mindful that GPU passthrough isn’t a plug and play thing on (that’s not even Qubes OS specific). And virtualisation comes with a performance cost.
I cam across this very interesting video here: perhaps this might answer your question. At least that is something I am considering trying out as soon as my laptop is here and in the case of other guides not working for me.