External monitor NOT detected (only) when PCI devices hidden (GPU passthough)

Hi all!

I’ve got a laptop with two GPUs one integrated and one discrete. I would like to passthrough the discrete to an HVM.

I’ve got an external monitor that will be dedicated to that HVM.

I have the following problem:

  1. when the PCI devices (VGA-compliant and corresponding audio) are hidden via rd.qubes.hide_pci, the monitor is not detected when plugging in the HDMI cable, nor when plugged in before booting Qubes OS.

  2. when the PCI devices are not hidden, the monitor is detected as expected when I plug in the HDMI cable, but attempting to start the HVM crashes Qubes OS

I believe the monitor needs to be detected for the passthrough to suceed because attempting to generate a configuration in the HVM via X :1 -configure fails saying that there is no monitor corresponding to :1 (and :0 is already configured, but looks like the laptop’s monitor).

Am I misunderstanding something about the basics of GPU passthrough, or is that behaviour somewhat surprising?

Context:

What are the GPUs?

It’s possible that they’re not resetting fully, or that not all of the GPU has been passed through or activated. Some GPU firmware/drivers have been written to refuse to work if it detects that they’re inside a VM…