Clever way to quickly switch display sources (GPU passthrough)

P1x3L

Weaksauce
Joined
Jul 31, 2012
Messages
81
These days GPU passthroughs in hypervisors are awesome for giving a guest full GPU performance. The downside is that in order to use a single display between host & guest, you have to wire the two GPUs to the same display.

My question here is how to switch those sources quickly from my keyboard. Before GPU passthrough, each OS (guest & host) were merely on different workspaces - so flipping to the next workspace was instant, just like a tab in a browser. How can I get this kind of functionality while using a GPU passthrough?
Thanks!
 
You're asking a lot of driver/OS designers to put this in, or Hypervisor designers.

To do what you're asking, the easy way, you could just use a KVM which has a single switch or button.

The hard way would be to virtualise the actual hardware properly, using a "hypervisor" for the graphics card, and then emulate it in the VMs.. This is possible, just really difficult to achieve.

What applications are you using that you need to do this?
 
One issue with not taking the output directly from the GPU is the latency of going through a software layer to buffer the screen output - i’m not sure how much latency a KVM adds by comparison. The simplest ones seem to be a literal switch and most have a keyboard shortcut so they should satisfy your need .
 
One issue with not taking the output directly from the GPU is the latency of going through a software layer to buffer the screen output - i’m not sure how much latency a KVM adds by comparison. The simplest ones seem to be a literal switch and most have a keyboard shortcut so they should satisfy your need .

I don't quite follow... Does this mean having two cables to the display (from each GPU) and having a keyboard switch that somehow toggles the screen to switch between sources? Of course without using passthrough this is easy - each VM could be on its own workspace on the host OS and switch between them seamlessly. But for the best performance, one would need GPU passthrough, which takes away the ability to switch as described in the last sentence.
 
I don't quite follow... Does this mean having two cables to the display (from each GPU) and having a keyboard switch that somehow toggles the screen to switch between sources? Of course without using passthrough this is easy - each VM could be on its own workspace on the host OS and switch between them seamlessly. But for the best performance, one would need GPU passthrough, which takes away the ability to switch as described in the last sentence.
Yes - KVMs expect a master keyboard switching between hosts (listening for a specific sequence like [HOME+PGUP]) - which then switches the display out, and outputs the keyboard out for selected display. You could have both keyboard outs go to the same host PC (using 2 usb ports) it would cause a brief delay when switching. There are other options, dont use the keyboard out for the KVM, just use a dedicated numpad keyboard on the side for switching as input or use the physical button or remote on the KVM to switch etc.
 
Back
Top