Hi, I’d like to ask whether there’s an easy way to get GPU acceleration with GPU passthrough. I tried passing the second GPU (an RTX 3050) of my laptop to a HVM. I also tried to hide the GPU from dom0, but the system still crashed. Is there a way to fix this issue?
I cant answer your question, but if its for gaming I’d like to add that geforce now in chromium flatpak works like a charm for me. I thought about getting a graphics adapter too, but even if you get it to work its not the most secure thing to do.
As for how, there are ways, yes, I’m sure sbd will answer about it soon. There are also a few threads about it already, search might already be able to answer your question. You will have to “terminal” a little bit.
My RTX 3050 works fine passed through to Windows and Linux standalone HVMs without any special firmware tricks or other things. You need to provide more detailed information for people to be able to help you. The most important question is, if this is a laptop or a desktop. With laptops you will generally have more issues. If you’re on a desktop, Create a Gaming HVM should give you the details needed. Though, if you’re on 4.3 version, I would use the settings menu to attach devices instead of qvm-pci because the device names have become too long for my taste and the settings seem to work fine for this purpose. To find the addresses for hiding at boot lspci works well.
Hanging on the forum, flooding while upgrading to 4.3 ![]()
Did you hide audio as well from dom0?
Here’s related part of my grub:
rd.qubes.hide_pci=01:00.0,01:00.1 rd.qubes.hide_all_usb xen-pciback.hide=(00:1f.3) nvidia-drm.modeset=1
Yes I use a laptop.
When that’s all you think is enough to say and to expect to be helped, I have not that good news for you.
I used sudo nano /etc/default/grub to edit the GRUB configuration and added:
GRUB_CMDLINE_LINUX="... rd.qubes.hide_pci=00:01.0 rd.qubes.hide_all_usb xen-pciback.hide=(00:1f.3) nvidia-drm.modeset=1" (I checked if the numbers match my devices and they do)
After that, I saved it with Ctrl+O, Enter, and Ctrl+X, and regenerated GRUB with:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
After that, I restarted the system and tried to use the qube which has the GPU and audio attached. Unfortunately, it failed again.
I also noticed in the Devices tab of the qube that the NVIDIA GPU points to 00:00.0, which is the host bridge. Some other devices do the same, including the SD card controller, NVMe controller, and the Ethernet controller.
And again you hide NVIDIA video only, and not its audio… Read my line again. Hiding other audio is for Intel HDA audio to be attached to sys-audio as well, beside NVIDIA’s.
lspci doesn’t show 01:00.1, only the GPU, which is 00:01.0, and 00:1f.3, which is the audio.
Just try it. Trust me. Or paste your lspci here.
I could bet it should contain:
01:00.0 VGA compatible controller: NVIDIA Corporation GA107 [GeForce RTX 3050]
01:00.1 Audio device: NVIDIA Corporation GA107 High Definition Audio Controller
You could even set 2 sys-audios for each audio PCI device, when you want to be Qubes freak (like I am) and set each as audiovm for different qubes according to your preferences/
Strange. My NVIDIA GPU has no own audio controller. There is only Intels:
00:00.0 Host bridge: Intel Corporation Device 4621 (rev 02)
00:01.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x16 Controller #1 (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] (rev 0c)
00:04.0 Signal processing controller: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant (rev 02)
00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 (rev 02)
00:08.0 System peripheral: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator (rev 02)
00:0a.0 Signal processing controller: Intel Corporation Platform Monitoring Technology (rev 01)
00:0d.0 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller (rev 02)
00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01)
00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01)
00:14.3 Network controller: Intel Corporation Alder Lake-P PCH CNVi WiFi (rev 01)
00:15.0 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 (rev 01)
00:16.0 Communication controller: Intel Corporation Alder Lake PCH HECI Controller (rev 01)
00:17.0 SATA controller: Intel Corporation Alder Lake-P SATA AHCI Controller (rev 01)
00:1d.0 PCI bridge: Intel Corporation Alder Lake PCI Express Root Port #9 (rev 01)
00:1d.2 PCI bridge: Intel Corporation Alder Lake PCI Express x1 Root Port #11 (rev 01)
00:1f.0 ISA bridge: Intel Corporation Alder Lake PCH eSPI Controller (rev 01)
00:1f.3 Audio device: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)
00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01)
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-P PCH SPI Controller (rev 01)
01:00.0 VGA compatible controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] (rev a1)
02:00.0 Non-Volatile memory controller: Phison Electronics Corporation E16 PCIe4 NVMe Controller (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15)
04:00.0 SD Host controller: O2 Micro, Inc. OZ711 SD/MMC Card Reader Controller (rev 01)
I managed to start the HVM that I created from a Debian 13 template. I made a mistake and took the wrong number from the devices. This is my current GRUB entry:
GRUB_CMDLINE_LINUX="... rd.qubes.hide_pci=01:00.0 rd.qubes.hide_all_usb xen-pciback.hide=(00:1f.3) nvidia-drm.modeset=1"
I didn’t assign the audio controller to the VM otherwise it wouldn’t start, it tries to shutdown but I can’t even kill it. So I only assigned the GPU. Now it started and didn’t crash my system, however it doesn’t show a picture. I tried to attach my HDMI port to a TV, but that didn’t help it only mirrors or expands my normal Qubes desktop environment.
Probably I just need a way to display the GPU output.
Because you’re on a laptop, you will probably have some additional problems to solve.
Unfortunately, I have very little knowledge about this.
Weird. Maybe NVIDA audio is hidden behind Intel’s
How I wish I could do that with my laptop (and many, many other people), thus it’s weird again. I was convinced that with NVIDIA laptop dGPU (HDMI physically wired to the NVIDIA dGPU), you can get output only via NVIDIA and not Intel.
Did you check your BIOS? You should use Optimus mode, not descrete, but since you are allowed to log in to Qubes and not crashed when starting HVM, I guess it’s already in Optimus? So, see how this makes getting output to external monitor even weirder?
What’s your laptop model unless I’m not asking too much?
One weirdness more, I admit. When it’s hidden from dom0, and it is, then there is no reason not to work when attached to a HVM (not talking about making sense of such approach, since no other qube would have audio then, but in general I am speaking)
Throwing complex ideas with self-admitted lack of knowledge could lead to serious consequences for the user who would try to follow the tip…
On what basis then you decide that might help? Because it reads there “I’ve figured out how to get NVIDIA GPU passthrough to work on laptops”?
Instead, since you too have RTX3050, you could actually help by confirming or not is there NVIDIA audio controller in your lspci.
My RTX 3050 has an audio controller, but it is a discrete graphics card for a desktop PC.
You’re right. I will be more careful when throwing tips in the future.
Thanks for the sake of the user, sincerely.
Now, the user could confirm which mode he uses, in BIOS. Then I would changed it to the other and tried to start Qubes. When the Qubes fails to start, it means it was installed in the other mode. Put it back and let us know in which mode you installed Qubes. Did you install Qubes in Discrete mode in BIOS, I am afraid if you want to use NVIDIA in a HVM and on external monitor, you would need to reinstall Qubes when Optimus mode in BIOS.
I am wiring this for other users possibly searching for an idea for their issue, because I think in this specific case everything is in Optimus mode, and it’s all about some sloppiness somewhere along the way, just as it was with miss writing PCI device ID.
The laptop is called “Gigabyte G5 GE”. Unfortunately, there is no Optimus mode in the BIOS. So I can’t really tell if it is enabled or disabled. (I get the feeling that the BIOS is just for decoration since you can’t do much there, at least on this laptop)