some ideas for multi gpu and vfio
-
(1) if the primary GPU has no outputs connected but we have a secondary one with outputs, automatically select that secondary one to improve performance -
(2) dynamically do (1) when the user hot(un)plugs monitors, and switch back to the boot vga if it gets an output again -
(3) automatically prefer external GPUs if they have outputs connected: external GPUs are much more affected by copying images back and forth -
(4) if the primary gpu gets unplugged, switch to some other gpu if possible instead of exiting -
(5) if the last remaining gpu gets unplugged, make it possible to not exit but instead wait for the gpu to get hotplugged again. This would allow for single-gpu VFIO without killing the session, assuming that clients support it eventually -
(6) offer an interface (in kscreen) that allows a user to make KWin stop using a GPU (temporarily) to allow for easier hot-unplugging with VFIO -
(7) allow the user to configure their primary GPU in a kcm, perhaps like the output properties per display arrangement
A few of these things depend on finding out which render node Mesa uses for a given KMS device (which is also required for wp_linux_dmabuf_hints) and whether or not a GPU is external. (1), (2) and (4) can be done pretty easily though