Passthrough NVIDIA RTX 2070 super max Q?

Hi!
I finally decided to make qubes os my main operating system, abandoning that boring windows (which I will still use only for gaming until I find some other system that satisfies me from the gaming point of view).

I would like to exploit the hadrware of my laptop as much as possible, and I wanted to do a passthrough of the gpu on my main vm, so as not to rape my poor cpu too much.

Laptop Specs
CPU: intel core 7-10750H 2.60Hz
CPU: NVIDIA GeForce RTX 2070 SUPER Mobile / Max-Q
Ram: 24839mb

QubeOS version: R4.2.3 based on debian 12
Bios E16V1IMS 112
Kernel 6.6.63-1

my bios supports VT-d, but I still have to check if it has the option to disable Optimus

I have never performed this type of operation and, before doing damage, I wanted to understand if it was possible to perform the passthrough of the ma 2070 on a debian vm? are there any counter indications? and if so, how can I proceed to enable it?

from what i know qubes does not handle well NVIDIA Optimus, giving problems of instability and surely i can not disable the integrated card, i also imagine that i have to use different divers from those provided by nvidia and use open sources

Ps. Since i installed qubes 4.2.3, i notice a strange flashing glitch that changes the colors of my screen. this happens during the first boot of the desktop and, i still have not understood what triggers it, during normal use. It often happens with the cursor near the edges of a card or the monitor, and disappears as soon as you switch to another card.
all this happens exclusively on my laptop screen, if used on external monitors all this does not happen.
i am really very confused about it, i tried to change the refresh rate of the screen being exaggerated by default (300hz), and to start qubes with previous kernels, and to start windows to verify that the screen was not damaged, and i do not see any unusual errors on the system.
Has anyone else encountered this problem?
(I attach some photos hoping you can understand a little)



1 Like

I thought that is bad solution, all other your qubes will still do not use the GPU, secondary GPU can be used inside the any user qube for improve performance.

For some reasons my i7-8k limited for 2.12Hz, but it’s enough for my daily tasks.

yes, but you can passthrough ony for 1 qube at the same time, using pci features

Seamless GPU passthrough on Qubes OS with VirtualGL. Shortly. You have to hide your GPU pci using kernel params, and use gui to connect your GPU into AppWM.

Not sure about that, above i wrote the reason why not good idea use main GPU inside the dom0. Also try to read this What is the status of iGPU support for Qubes?

1 Like

I am aware that I can only use my 2070 on one vm, since it is not used in any way by qube, it is fine with me even if only on one vm.
Personally I would install it on the work one, let’s say, where I spend most of my time. so as not to have a more fluid vm, even just trivially for playing videos or a movie. I am aware of the security risk but I don’t think I need it for what I do, and since it is not used it seemed like a good thing to use it to lighten the main vm and the PC.

Thank you, I didn’t know you could enable the integrated one on all vms, I will immediately find out, I was convinced it did it by default.

I also noticed the same thing, I can only use 2.6 Hz, I have no idea why, it’s on my list of things to study to better understand this operating system

generally I am also quite satisfied, but basically I don’t work in IT, cyber security, programming etc… I am just an enthusiast. in everyday life I sometimes need a little more push. so if it is possible and it doesn’t cause too many problems I think I will try this solution and see how I get on, at most I will go back to the old configuration.

Thanks! now in the next few days I’ll study everything well, it seems a bit complex and I don’t want to do stupid things. I’m realizing that I have some important gaps to fill on qubes os, I’m quite new to this world, but I’m really passionate about it.

For the problems related to Optimus, I think that alternating the two cards, and the iGPU already being used by qubes could cause problems, but it’s my hypothesis, I’m not sure that this happens.
I’m starting to have a doubt, if I decided to assign my GPU to a vm, would I have limitations in using the iGPU on other machines, or in general in the system?

1 Like

dom0 use iGPU all the time, other qubes can’t use iGPU, your secondary GPU could be assigned to any HVM user qube (people usually use it for windows qube). All other qubes can use only CPU.

1 Like

I tried to configure GPU passthrough on my 2070. However, every time I try to start the VM, Qubes OS crashes.

Below are my complete specs and the steps I followed:
(For some reason, I am currently booting Qubes OS in UEFI with CSM mode. It stopped working in UEFI mode, showing the classic “invalid signature” at boot).

Brand: Micro-Star International., Ltd
Model: GS66 Stealth 10SFS

  • CPU: Intel (R) Core™ i7-10750H CPU @ 2.60GHz

  • Chipset: Intel Corporation 10th Gen Core Processor Host Bridge/DRAM Registers [8086:9b54] (rev 02)

  • Graphics: Intel Corporation CometLake-H CT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller])

  • NVIDIA Corporation TU104M [GeForce RTX 2070 SUPER Mobile / Max-Q] [10de:1e91] (rev a1) (prog-if 00 [VGA controller])

  • Ram: 24389 MB

QubesOS version: R4.2.3

  • BIOS: E16V1IMS.112
  • Kernel: 6.6.63-1
  • Xen: unknown (this detail makes me skeptical, but I’ve never paid attention to it).

Passthrough Steps:

**

  1. I checked that Optimus was enabled.

lspci -v | grep VGA

> 00:02.0 VGA compatible controller: Intel Corporation CometLake-H CT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller])  
> 01:00.0 VGA compatible controller: NVIDIA Corporation TU104M [GeForce RTX SUPER Mobile / Max-Q] [10de:1e91] (rev a1) (prog-if 00 [VGA controller])
  1. IChecked if the GPU is IOMMU:

lspci -nn

00:00.0 Host bridge [0600]: Intel Corporation 10th Gen Core Processor Host Bridge/DRAM Registers [8086:9b54] (rev 02)  
00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 02)  
00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05)  
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU104M [GeForce RTX 2070 SUPER Mobile / Max-Q] [10de:1e91] (rev a1)
  1. IChecked IOMMU Groups:

sudo dmesg | grep -i iommu

[    2.382329] iommu: Default domain type: Translated  
[    2.382329] iommu: DMA domain TLB invalidation policy: lazy mode
  1. I Enabled VT-d and diable Disabled Secure Boot

  2. I Configured the grub file:

sudo nano /etc/default/grub

GRUB_TIMEOUT=5  
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"  
GRUB_DEFAULT=saved  
GRUB_DISABLE_SUBMENU=false  
GRUB_TERMINAL_OUTPUT="console"  
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-a36c963e-f930-4c3b-a7f2-6a14698b35b7 rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles 6.6.48-1.qubes.fc37.x86_64 x86_64 rhgb quiet"  
GRUB_DISABLE_RECOVERY="true"  
GRUB_THEME="/boot/grub2/themes/qubes/theme.txt"  
GRUB_CMDLINE_XEN_DEFAULT="console=none dom0_mem=min:1024M dom0_mem=max:4096M ucode=scan smt=off gnttab_max_frames=2048 gnttab_max_maptrack_frames=4096 intel_iommu=on iommu=on rd.qubes.hide_pci=01:00.0"  
GRUB_DISABLE_OS_PROBER="true"  
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX rd.qubes.hide_all_usb"  
. /etc/default/grub.qubes-kernel-vm-support
  1. I Added to GRUB_CMDLINE_XEN_DEFAULT:

iommu=on intel_iommu=on rd.qubes.hide_pci=01:00.0

  1. I Updated grub:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

**

Once I assigned the GPU and started the VM, the system crashed.
I also tried adding the audio and other NVIDIA peripherals, but with no results.
It seems that Qubes OS is not hiding the GPU from dom0, but I don’t understand why.
I also tried replacing rd.qubes.hide_pci=01:00.0 with pci-stub.ids=10de:1e91, but the result was the same.

1 Like