How do I hide a pci device as soon as possible?

I’m trying to pass my primary gpu to sys-gui-gpu using rd.qubes.hide_pci but unfortunately it doesn’t hide the gpu “properly”.

I was expecting to type the password blindly but that’s not the case and when I start sys-gui-gpu the system crashes despite lspci -vv showing that the gpu is using the pciback driver.

I’ve also tried setting permissive and no-strict-reset but that didn’t help. I’m positive the crash is due to the gpu being used by the console, any ideas?

Why do you want to hide it? I’d say there are too few details here to expect feedback. For the start you could describe each and every step you took.

For example, I even didn’t hide my dGPU, because in my scenario it is not necessary in order to use sys-gui-gpu.

I need to hide it because I know starting sys-gui-gpu wouldn’t make the system crash (I know because I’ve used it before) I’m experiencing the same behavior as in this bug report.

That’s why I asked if anyone knows how to hide it earlier than rd.qubes.hide_pci does (or tries to).

I’ve also tried to use xen-pciback.hide and nomodeset but that didn’t change the outcome.

If more information is necessary let me know

@neowutran are you familiar with a possible solution to this problem?

If you have 2 gpu, I would first try to do the gpu passthrough without sys-gui-gpu. Once you confirm it work as expected, then try to use it for sys-gui-gpu