Seamless GPU passthrough not used in VM

I have a VM with my GPU attached. I also use host CPU for better performance. The GPU is attached with nvidia drivers in used (verified with lspci -k) and vkcube shows that it is using my GPU. However, when I run any game in Steam (both the flatpak and arch-extra version) it uses llvmpipe rather than my GPU with games getting around 15fps. I think it boils down to the Qubes X11 configuration. I followed the instructions here: https://forum.qubes-os.org/t/nvidia-gpu-passthrough-into-linux-hvms-for-cuda-applications/9515 and it was working previously. I think an update borked my configuration and following the same instructions isn’t working; it still doesn’t use my GPU.

1 Like

Check if you have “nomodeset” parameter in the kernel cmdline of this VM (see /proc/cmdline). If you have it, you need to remove it - see solution in R4.1(x86_64) unable to unset `nomodeset` kernel CLI in PV - #2 by kreyren

1 Like

I don’t have “nomodeset” set in the kernelopts. I also tried with/without 'nvidia-drm.modeset=1`.

Attempting to run the VM without CPU host mode and with the Xorg configuration created during the installation of nvidia drivers results in no video output / no applications open.

I also tried setting some environment variables related to nvidia’s prime-run script to no avail.

1 Like

Added the kernelopts in the link above and it works - although performance is much lower than under Windows.

1 Like