Re:Technician keeps computer made in 1959 still humming along
by jchw on Wednesday July 31, 2019 @02:51AM
(#20572190)
Wine does tend to clutter the file associations a bit :( It’s probably possible to work around that but understandable that you don’t want to.
Steam Proton is great since it doesn’t do that and is mostly automatic. I was surprised to see Direct3D 11 titles running just fine at 60 FPS and maxed out settings, very cool.
And yeah, GPU passthrough is kind of the holy grail for desktop VMs. It’s definitely a little tricky, but once you have a good setup going it’s hard to beat. There’s a lot of guides. NixOS really shines here because your entire configuration can be declaratively configured, making your setup easily reproducible and surfacing all of the configuration in one place, but it’s obviously not distro dependent in any way and will work fine on Debian or Ubuntu.
Some downsides:
- Not all machines can VT-d, some can but are not stable. This is better today than ever.
- Your VM GPU needs to be in its own IOMMU group. Modern motherboards tend to do this basically automatically it seems, though its not guaranteed and if not your only workaround is a patch that lets you “split” the groups in an unsafe way that breaks isolation.
- Audio is tricky. Looking Glass does not forward SPICE audio today, so most folks configure qemu to output directly to PulseAudio. If you are using a physical display this approach obviously still works. You can also attempt to forward a USB audio device, or use audio over HDMI/DisplayPort.
edit: I hopped on my desktop. Here's my former NixOS configuration for GPU passthrough, to give you an idea of what kinds of system level configuration is needed:
The virtual machine itself also needs some configuration. It will need to use UEFI with a properly-equipped TianoCore image to initialize the GPU. Also, to set the audio driver to something other than SPICE. Finally you need to add the PCI devices, this can be done trivially through the UI as long as you know the PCI IDs of your card.
Steam Proton is great since it doesn’t do that and is mostly automatic. I was surprised to see Direct3D 11 titles running just fine at 60 FPS and maxed out settings, very cool.
And yeah, GPU passthrough is kind of the holy grail for desktop VMs. It’s definitely a little tricky, but once you have a good setup going it’s hard to beat. There’s a lot of guides. NixOS really shines here because your entire configuration can be declaratively configured, making your setup easily reproducible and surfacing all of the configuration in one place, but it’s obviously not distro dependent in any way and will work fine on Debian or Ubuntu.
Some downsides:
- Not all machines can VT-d, some can but are not stable. This is better today than ever.
- Your VM GPU needs to be in its own IOMMU group. Modern motherboards tend to do this basically automatically it seems, though its not guaranteed and if not your only workaround is a patch that lets you “split” the groups in an unsafe way that breaks isolation.
- Audio is tricky. Looking Glass does not forward SPICE audio today, so most folks configure qemu to output directly to PulseAudio. If you are using a physical display this approach obviously still works. You can also attempt to forward a USB audio device, or use audio over HDMI/DisplayPort.
edit: I hopped on my desktop. Here's my former NixOS configuration for GPU passthrough, to give you an idea of what kinds of system level configuration is needed:
The virtual machine itself also needs some configuration. It will need to use UEFI with a properly-equipped TianoCore image to initialize the GPU. Also, to set the audio driver to something other than SPICE. Finally you need to add the PCI devices, this can be done trivially through the UI as long as you know the PCI IDs of your card.