Hacker News new | ask | show | jobs
by smusamashah 1641 days ago
How is the performance of games? What I understand is that proton is a layer/adapter to run windows games and should create a FPS hit. Or do you get the same performance of running on widows?
7 comments

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.

> 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!).

> What I understand is that proton is a layer/adapter to run windows games and should create a FPS hit

Your understanding is wrong. It's largely a reimplementation of Windows APIs. Those implementations can perform better or worse than the real thing depending on quality of implementation and the underlying OS.

Some games will perform better on Linux. Some will perform worse. Some are about equal.

Well, it can be a layer as well. If a game makes DirectX calls, and those calls are translated on the fly to corresponding Vulkan (or in some cases perhaps OpenGL) calls, that adds a layer. That is, unless the calls are AOT or JIT transpiled or something similar -- I don't know if they are.

System calls are also something that would require an additional layer, as the required Linux system calls need to be made in addition to intercepting the Windows system calls in Wine code. Some other APIs in Wine may also be implemented on top of corresponding Linux APIs rather than just being standalone replacements for Windows code.

The majority of code in Wine is probably just reimplementations of Windows APIs, which could be thought of as being parallel to the Windows implementations rather than layers between a Windows API and a Linux one, so you're correct there.

I'd generally expect there to be a performance hit on average, but as you said, it doesn't always happen, and it's not as large as one might expect if thinking about an emulator or something similar.

Very good, I am not a 4k-120fps-highest-detail kind of gamer so anything over 60fps at 1440p with high detail is quite enough for me.

I run RDR2, Fallout 4, TW series, and some indie stuff at those specs and I have no problems even with mods.

I see no difference from Windows but, ofc, you mileage may vary depending on your HW and what you want from your games.

most games the performance hit is going to be not noticeable when to some, mildly annoying to others, and totally unacceptable to o a few. Like if you were trying to be competitive in a modern AAA fps, prolly won’t be ok. But big non twitch 3d games are still very good!
> But big non twitch 3d games are still very good!

What do you mean?

'twitch' in games typically means latency-sensitive, like a competitive FPS where being 10ms faster to shoot than the other guy means you win the round. Many games can handle 100ms of latency no problem, so running at 50fps instead of 60fps is no big deal. On consoles those games typically run at 30fps to begin with, which is at minimum 16ms more latency than playing at 60fps on a linux or windows PC.
Pretty miniscule. Putting things into perspective, it's still fully possible to hit 120 FPS on my GTX 1050ti in Overwatch. A more direct comparison can better elucidate the tradeoffs though: https://youtu.be/voXc1nCD4IA
I've got a few hundred games and the only one I noticed was noticeably worse on Linux is Star Citizen, and that's a game still in alpha so the optimisation in general is awful anyway.
IME it's not that great a hit in most games, maybe 5fps. Admittedly I have super high end hardware so 5fps isn't as large a hit someone might take on low-mid end hardware so YMMV.
A 5fps hit has no meaning. 6fps->1fps is much different than 1005fps->1000fps please use mspf (milliseconds per frame) or at least a percentage of the fps lost.