- Joined
- Dec 19, 2022
Super worth it if you have some software that only runs on Windows, for example Solidworks, or an AMD GPU and you want to enjoy some macOS.So what is the general consensus on VFIO? Is it worth it?
I use VFIO quite heavily. I have my screen plugged into my iGPU, and the graphics card just idling with nothing plugged into it. When I do something using graphics on Linux and the VM isn't running, the graphics card quickly kicks in and takes care of the rendering, kind of like how it works on a laptop. Very power efficient. If I fire up the VM, because the display is connected on the iGPU, my Wayland session remains up, and I can use RDP to control the virtual machine, which gets graphics acceleration through whatever magic Microsoft poured into that. RDP genuinely works really well, you can tell Microsoft put a lot of effort into it. My VM can handle Solidworks etc as if the graphics card was plugged in natively, and input lag through RDP is low enough that I can even play games this way, since the paravirtualised network adapter it's talking through has such high throughput and low latency. If I plug in a dummy HDMI plug to the GPU I can use this same setup with Looking Glass, which involves dumping the framebuffer into a shared memory space between the host and the guest, letting you have even less latency. With RDP I can just barely tell there's a bit of input lag, with Looking Glass there is none. But it's a bit unreliable, so I stick with RDP, which just works.
More interesting is running a macOS virtual machine. macOS GUI relies very heavily on hardware graphics acceleration, so it's nigh unusable with the basic CPU graphics virtual machines normally get, but with an (AMD) graphics card it runs quite smoothly. You do have to be very careful looking for a bluetooth dongle because Apple's driver only supports a handful of them (and you do want one since macOS works best with a trackpad and the only way to get gestures into the guest is by passing through a bluetooth dongle and pairing the trackpad to the guest directly), but apart from that everything just works. Hackintosh is way easier to do through a virtual machine than on bare metal, and is how I use my computer most of the time.
Lately I've had some issues with the script I use to detach the GPU, though, and the card will sometimes get "stuck" in the guest, which hangs on shutdown. I then have to reboot the Linux host to get the GPU working in anything again. Oh well, it's annoying but kind of a second world problem.