Two monitor host with gpu passthrough for guest

Specs:
Asus Rog Maximus IX Extreme – Motherboard
i7-6700K – with Integrated Graphics, used for host
48GB DDR4
2080 Super

I am using Virt-Manager Qemu/kvm on Manjaro. I have got a standard passthrough setup going where the nvidia gpu is given up in boot to the vfio drivers. Which reduces me to one monitor for the host system. I was wondering if there was a way to utilize both of my gpus for a dual monitor setup on the host and then give up the nvidia gpu to the vm while still using igpu for the host. Then when the guest is shutdown for the nvidia gpu to return to the host for a dual monitor setup, all automatically. And if so how would I do it? I haven’t managed to find any tutorial or setup that would work.

Way 1:What motherboard do you have? Some motherboards have 2 ports for dual monitor on a igpu, If you have 2 ports on your motherboard you can use looking glass to clone the framebuffer of your nvidia card and put it onto your screen without a physical connection. (My ASRock B560m Pro 4 has a HDMI and a DisplayPort for the iGPU)

Way 2:vGPU unlock
You can do a vGPU unlock on your 2080 super (GitHub - DualCoder/vgpu_unlock: Unlock vGPU functionality for consumer grade GPUs.) and make a vGPU for your VM, that shouldn’t reduce performance that much as long as you keep it to 1 VM, remember to change your PCI id so that you don’t have to buy a nvidia grid license. That way you will have 2 monitors that can both be running off 1 gpu. And you can also use your actual GPU for your host. Unforutunatly I don’t think that libvirt hooks exist for this yet, so you are stuck using vanilla QEMU (which is fine just make a script for your vm and pin it to a .desktop file /usr/share/applications)

1 Like

Thank you for your response. That is a good point on the looking glass idea with dual motherboard. I think in general I would like the idea of looking glass a bit more. However, I do like just having an output with my 2080 super. As I am still dual booting Windows 10 and use it often. I have not made a complete move to Linux as I’m not totally comfortable with it yet. How would the hooks work for vgpu? Is there a distinct extra step I will need for the virtualization software I am using? I think I’m still going to try out both methods though. Also, won’t the vgpu unlock just affect things software side with the OS, I think this is the case but I am just trying to make sure.

Also I believe I looked at the vgpu unlock github and the wiki for it, and I believe they don’t support Manjaro for it. At the moment it only states Red Hat Enterprise, Promox VE, Ubuntu, and Debian. In general I am having issues with following along with the guide which might be down to my lack of knowledge. But if you have some other guide to follow I would be glad to follow. I will still try the first method you mentioned.

Your first method worked amazingly and it is now the main way I use Manjaro thank you.

Sorry for the late reply, I’m just happy I could help