Hacker News new | ask | show | jobs
by washadjeffmad 1636 days ago
Modern games can be run on Linux three ways: with native Linux builds, with Proton/dxvk/d3dvk or SteamPlay, or with VFIO.

The Linux native builds tend to be a version behind or have poorer support than the Windows ones. It's based on the devs, of course, but the take away is that it's historically been a crapshoot.

SteamPlay/Proton provides native or better performance over Windows for what I play. I've been using it so long that I actually don't know which games have native Linux versions anymore. It 99% "just works".

VFIO is virtualization where hardware is passed through to the guest OS. I use KVM+qemu on Linux and attach PCI devices like GPU and storage to the VMs. This is a native Windows game build on a Windows VM on a Linux host. It performs within a tight few percent of bare metal Windows, and the host is fully functional while in use.

Linux gaming options range from direct and inflexible, to feature parity with native performance and compatibility, to complex but guaranteed native support. I've relied on the first and last less and less over the years as Proton has improved.

1 comments

> VFIO is virtualization where hardware is passed through to the guest OS. I use KVM+qemu on Linux and attach PCI devices like GPU and storage to the VMs. This is a native Windows game build on a Windows VM on a Linux host. It performs within a tight few percent of bare metal Windows, and the host is fully functional while in use.

How about displays, though? It doesn't seem like you could have a proper integrated desktop between host and VM when using VFIO.

I haven't tried it personally, but I believe the Looking Glass project https://looking-glass.io/ is attempting to solve this.
Lookingglass, as another user mentioned, peers directly into the framebuffer for an effectively latency-free display experience on the host.

You can also connect the graphics device that's passed through to an external display.

As an example, my SO and I can both play a multiplayer game from the same computer this way. I can use a VM with lookingglass on my Linux host while she uses a monitor connected to the GPU her VM has attached, along with a passed-through hub with mouse and keyboard.

It helps that Threadripper has two NUMA nodes, but it's possible on any system with good IOMMU grouping.

> As an example, my SO and I can both play a multiplayer game from the same computer this way. I can use a VM with lookingglass on my Linux host while she uses a monitor connected to the GPU her VM has attached, along with a passed-through hub with mouse and keyboard.

You could also run regular multi-seat Linux with such a setup.

It should also be possible to do it without multiple GPUs, but that's unfortunately more involved (if anyone has a simple way to do this in wayland land, I'm all ears!).