Ubuntu vs Windows - Gaming Performance!

Gaming on Linux is a thing, and it is slowly becoming more and more popular. The downside to being late to the party is that Linux doesn’t have many games. Studios won’t bring new games to Linux because the market share is small. But the market share is small because there aren’t many games. We are stuck in a loop essentially. There are however, a few awesome development studios that have ported their Windows games to Linux either with native OpenGL or using a wrapper such as WINE.

How do these ports stack up against their Windows counterparts? Is the performance the same, and in addition how does a native port with OpenGL compare to using a wrapper like WINE?

Raw data and charts:

The system used for these benchmarks is my own PC.

  • Intel i7 4790k overclocked to 4.2 GHz (4 cores 8 threads)
  • EVGA GTX 980 Superclocked
  • 32 GB of GSkill RAM running on an XMP profile for a total of 2133 MHz
  • Gigabyte Z97MX-Gaming 5 motherboard

All games were run at the highest settings at 1440p.

Both OS installs are fresh. Testing Linux performance with Ubuntu 16.04.1 running XFCE with the compositor turned off. Windows testing was done in Windows 8.1 Pro with nothing installed aside from Steam and with all the Windows metro apps uninstalled. Windows update is disabled.

Before we get into the main section of this video, just a quick interjection to show CPU performance.

Geekbench’s multi-core test on Windows yielded a result of 15,210 and on Linux was 16,004. The result showing Linux performance to be 5.2% faster than Windows on the exact same system. We can credit this to Linux’s better CPU task scheduling as well as GNU being a lighter OS overall.

On to gaming performance:

The games I tested were chosen just because they were already in my Steam library and they have Linux ports. I chose two games whose Linux port is a wrapper, two games that are native OpenGL, and one that has multiple rendering engines to choose from including Vulkan.

Let’s start with OpenGL vs OpenGL.

The lineup starts with Unigine Heaven which should be the most accurate comparison of all. Assuming that it is properly optimized for both platforms, its results are what I am going to deem to be the most reliable.

From testing Unigine Heaven the most interesting thing I discovered was that OpenGL performance between Windows and Linux is almost identical. The average FPS for Windows and Linux was 0.1 FPS off, that is absolutely insane.

< rant >

I have to hand it to Nvidia, their Linux driver is absolutely kickass when it can match performance on Windows, although Linux should have better performance because of the better kernel and faster system anyway with a proper driver. People hate on Nvidia for keeping their driver proprietary but you have to admit, their drivers perform well and it is great to see a big company put the same amount of effort into both versions of their driver. I would love to be able to test AMD, both their open source driver and the proprietary one to see if they can say the same.

< / rant >

Having said that about OpenGL, that means that the rest of the results I go over are going to mostly be down to whether the game is properly optimized, and more importantly the difference between OpenGL, DirectX, and Vulkan.

Testing The Talos Principle in OpenGL yielded about the same result, only a 1 frame difference on average for a total of a 1.35% difference in performance.

Now for the games that run in a wrapper, Bioshock Infinite and Borderlands: The Pre-Sequel.

A wrapper is the process of running the game inside of a container that translates the DirectX rendering engine’s draw calls into OpenGL so the game can run on Linux. This is not emulation.

WINE can run DirectX 9 games pretty well, but for these games 2K uses something called eON. It is similar to WINE but instead of preserving the original windows executable, it translates the game into a native Linux binary. In theory the resulting performance should be better, but honestly these ports aren’t very good in my opinion. Native games are always better than wrappers.

Bioshock Infinite ran 36% slower on Linux, however with an average FPS of 86 if you have a decent PC it should run OK.

Borderlands: The Pre-Sequel ran 42% slower on Linux, yet again displaying how wrappers are not an optimal choice for a Linux port.

Edit: Borderlands does not run in a wrapper on Linux, of course you would never know, it runs like garbage anyway.

Now for DirectX vs OpenGL.

Unigine Heaven’s DirectX version ran at an average of about 10 FPS faster than the OpenGL version. We can see the same result with The Talos Principle, the DirectX version ran about 10 FPS faster as well. We can conclude that DirectX might be easier to optimize for, or it performs better by itself. But don’t think that DirectX is the best, you will see the real winner when we get to the next section.

Metro Last Light ended up at a complete tie between Windows and Ubuntu. The average FPS was the same and the minimum and maximum FPS reading are all well within the margin of error.

CS:GO ran better in OpenGL on Linux. Average FPS of 256, for a result of an 8.16% improvement over the DirectX Windows version.

Rocket League however has a ways to go. It ran considerably worse in OpenGL on Linux, for a performance loss of about 25%. But, the average FPS was still 145 at max settings, which is very good and should be easily playable on most hardware.

Now let’s talk about Vulkan.

The Talos Principle runs extremely well in Vulkan. The Windows DirectX version of the game ran at an average of 93 FPS, the Linux OpenGL version ran at 73, but the Linux Vulkan run ran at an average of 113 FPS, completely outperforming every other option. Even more interesting is that the Linux Vulkan version ran about 36% faster than the Windows Vulkan version, an FPS difference of about 20 across the minimum, maximum, and averages. I’m not sure what caused that, it might be that Nvidia is focusing Vulkan more on it’s Linux drivers or that there was another error in testing.

With that I think it is safe to say that Vulkan is the future. As Microsoft continues to push customers away it is more important now than ever to tell your favorite development studio to use Vulkan and release on Linux. They won’t know there is a demand unless we tell them we want it.

You might have also noticed that these were the same benchmarks used for the PCI passthrough testing, and I did that so you could compare the performance between Windows, Windows in a virtual machine, and Linux.

Thanks for reading! Let me know of future topics you would like me to cover.

12 Likes

Nice man! thanks SO much for the testing, now I can tell my CS:GO Friends to play on Linux if they want to get some decent performance for free without paying licensing fees.

I also appreciate the written article too.

As long as they choose a distro without mouse acceleration built in like Gnome / cinnamon
( although i think there maybe a toggle for that coming soon )

@GrayBoltWolf did you run your Borderland 2 benchmark with Threaded optimizations ?

Linux games aren't as hot with weak CPU's, conversely they seem to run better on really weak GPU's down to the lower OS overhead.

You can turn mouse acceleration off in any DE with
$ xset mm 0

And no, I only changed graphics settings. I don't consider editing config files to be representative of the performance others can expect.

Have you tried it for yourself though ? The performance without it with Nvidia is very uneven.
( unless you don't play the game anymore )

Also with mouse acceleration i was under the impression you had to edit /etc/X11/xorg.conf.d/50-mouse-acceleration.conf ? I didn't think xset truly disabled acceleration.

No, it completely turns it off. At least until you log out or reboot.

And like I said, I am not going to consider editing config files in my benchmarks. I test the game as-is, not with modifications. If I start modifying the files, then my out-of-the-box comparison to the Windows version is no longer valid since I changed variables in the testing.

And like i said

Or are you just benchmarking and not actually playing the games.

To get a little bit better performance, you can play games on Linux with no DM/WM at all.

Also a while back I believe STEAM was working on their own drivers ( or at least a patch to the current drivers ) that were said to offer more performance then the drivers that come with Linux. I do not know if they are available for download or are available exclusive for STEAM OS. Also the stock Linux kernel is tuned for servers and such, not for gaming. You can get better performance by switching to the liquorix kernel or some other "aftermarket" kernel.

Also compiling STEAM from scratch could add some more performance.

The Vulkan results really show how much of an overhead Windows adds.

If only there was a more efficient way to emulate Windows in Linux.

The Talos Principle is now on my Xmas list.

Ok, I'll try to explain it better. I benchmarked the game as simplistically as possible for the best real-world performance people can expect. This isn't a contest of "which OS can I hack the game to run better on". People want to install and click play. I benchmarked that, so you can look at the results and see how the development studio has optimized their game.

This is the same as what I said above. I benchmarked what 99% of people will do when they Game on Linux. I prefer Debian but I know Ubuntu is the majority of the market and as such used Ubuntu.

I don't see how. Steam is just the launcher.

Have you seen the PCI passthrough performance video? KVM is 96% bare-metal performance, which for games is great.

Highly recommend it. Definitely my favorite game other than Twilight Princess and better than Portal (from a puzzle perspective, Portal is way more entertaining).

1 Like

I think you explained it fine. I asked if you were using threaded optimisations for when you play. Your not always benchmarking are you ? I assume you play games, it was merely a tip.

No, I didn't enable it for one game especially since I can't do the same to the Windows version. The test is the dev studio's optimization, not my hacked workarounds.

And I play games via PCI passthrough. The only game that doesn't run on Linux is Overwatch, and all my friends play it so I have to. I only have 1 GPU so I have to play everything in the Windows VM.

KVM and Xen are super efficient.

Think the word you are looking for is easier and I would agree.

But it would require the Lib-virt and VFIO guys to work together to do it.

1 Like

I think the better solution is to get more games natively. What's the point of using Linux if you have to pass a GPU anyway?

Much like your username Windows is being surpassed by a newer and faster system that we should help studios move to, much like the move from Flash to HTML5.

You can actually, Its not Linux specific but Linux tends to be more CPU heavy on ports and potentially would benefit more.

it's a setting not a hack.

Why ? (apart from overwatch ) What do you use Linux gaming for if it is all passthrough ? Anyway, you answered my question, you don't use the feature.

Geez dude. Some games have the ability to enable OpenGL options like that in their configs, that's what I thought you were talking about. No need for salt. Either way I shouldn't have to mess with settings to get the game to work well, and neither will the average user which is who this video is targeted at.

That doesn't really make sense.

I play all my games in the Windows VM since I only have 1 GPU. The host is connected to another monitor that I have a browser and a bunch of other stuff open on.

No salt. Was just (originally) trying to offer / ask if you used that specific tweak for your own personal use outside of benchmarking. I think you may have taken it in the context of your benchmarks only.

Anyway I enjoyed the video.

I must of been having a blonde moment when I said that compiling STEAM from scratch would improve FPS. I forgot that it was only a launcher.

1 Like