QubesOS GPU Passthrough

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?

Edit:
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 ?

2 Likes

It’s working, but it still has specific hardware requirements.

amd gpu passthrough to vm for gaming

That is a recent thread explaining how to do it with dual rx580 gpus.

3 Likes

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.

1 Like

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

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.

3 Likes

Hi guys,

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).

EUROCOM Sky Z7 R2


  • Choose your LCD Display** 17.3in (43.9cm); 144Hz; UHD 3840x2160; Matte; 100% DCI-P3; eDP; for Sky Z7 R2
  • G-Sync with NVIDIA G-SYNC™
  • Security - ANTI SPYING Package Physical Removal of internal Webcam, Microphone and WLAN/Bluetooth Module
  • Display Calibration Professional Display Calibration with .icc Profile Saved on USB Flash Key
  • GPU Technology Single GPU support; Modular MXM3; Upgradeable
  • Primary GPU-1 16GB GDDR6; NVIDIA GeForce RTX 3080; 6144 CUDA; MXM 3.1; PCIe 4.0; GN20-E7-A1; 150W+15W Dynamic Boost; 1950MHz Boost Clock; 100x124mm
  • GPU Heatsink - Thermal Paste Grizzly Kryonaut; Ultra High Performance Thermal Grease
  • Processor / CPU Intel Core i9-10900KF/K; 10C/20T; 3.70GHz (up to 5.30GHz); 20MB cache; 14nm; Comet Lake; 125W
  • CPU Heatsink - Thermal Paste Grizzly Kryonaut; Ultra High Performance Thermal Grease
  • Memory (RAM) Configuration 32GB; 2x 16GB; DDR4-3200; Micron/Crucial; 260-pin; 1.2V; 2 SODIMMs
  • Operating System(s) None
  • Keyboard (Language) Swiss German ; QWERTZ; Backlit
  • Internal M.2 SSD Storage 250GB; M.2; SSD; NVMe 1.4; PCIe 3.0 x4; R/W: 3500/3000 MB/s; SAMSUNG 980
  • Internal Card Reader 6-in-1 Card Reader; MMC/RSMMC/SD/MiniSD/SDHC/SDXC; UHS-II interface
  • Biometric Device Built-in Fingerprint Reader
  • Embedded Security Chip Embedded TPM 2.0 Security Chip for Data Encryption
  • Wireless LAN 2-in-1; Intel AX200; WiFi 6 802.11ax + BT 5.2; up to 2.4Gbps; WLAN Module; M.2 2230; Wi-Fi(PCIe), BT(USB)
  • Add Extra LAN Port(s) to your laptop 1GbE USB 3.0 Fiber to Open SFP Adapter; RTL8153-VC-CG; 1000BASE-SX/LX; Startech US1GA30SFP
  • Fiber Optic Transceiver for your MSA switch and router 2x Fiber Optic Transceivers; 1x SPF1000SXST + 1x SPF1000SXST
  • Built-in Web Camera 2.0 Megapixels; Webcam; Built-in
  • Standard Battery (internal) 8-cells Lithium-lon Battery; Easy to change
  • Standard Power Cord - included EUROPE
  • Standard AC Adapter 780W AC Adapter; 110V-250V Auto Switching; 325x110x40mm; 3lbs/1.3kg; with DC cable
  • Choose Your Warranty Plan 3 Years Return to Factory Depot with 3 Years of Tech Support
  • Extra Thermal Pads for M.2; VRAM; RAM** Fujipoly Ultra Extreme XR Thermal Pads for M.2 SSD; Chipset, VRAM and RAM

Would you recommend this and could I possibly hope to be able to game on the laptop itself or would I need another screen despite this?

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.

Linux is not a gaming vm. 90% of 3d applications requires windows.

Is there any guides how to passthrough gpu to windows vm?

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.

Did you search the forum?