Valve proposes changes to Linux kernel to make it more 'game-friendly'

Cal Jeffrey

Posts: 4,178   +1,424
Staff member
In brief: Valve is proposing changes to the Linux kernel to make it more game-friendly. Specifically, it is looking to extend futex() (fast user-space locking) functionality, and modifications to glibc and lbpthread to improve multi-thread operations.

Valve has long supported the idea of improving the capabilities of Linux when it comes to PC gaming. Its recent efforts began with the ill-fated Steam Machine, which ran on the Linux-based SteamOS. It also made efforts to improve the open-source Windows compatibility layer Wine.

The problem with Wine is that it struggles with more hardware-demanding programs. Valve attacked this challenge by launching a beta version of Steam Play that includes Proton — a game-friendly build of Wine. While this did help some, there were still many issues with performance.

In the most recent build of Proton’s patch notes, Valve proposes changes to the Linux kernel to overcome problems it saw while trying to run some games.

To begin with, it has an experimental replacement for esync called fsync which provides “support for futex-based in-process synchronization primitives” and reduces CPU usage more than esync. However, because it requires the use of the kernel’s eventfd() function, it needs modifications to the Linux kernel to work correctly.

"We're proposing changes to the Linux kernel [lkml.org] to extend the futex() system call to expose what we think is the needed extra bit of core functionality needed to support optimal thread pool synchronization."

These changes would primarily extend futex() functionality to establish optimal thread pool synchronization. Proton 4.11 will have the fsync patch to utilize the new kernel when supported.

Developers are also proposing changes to glibc and libpthread.

“We are also proposing modifications to glibc and libpthread to make this feature available for Linux native multithreaded applications using libpthread, which can benefit from the behavior of waiting on any of a group of futexes,” Gabriel Krisman Bertazi, a software engineer for Collabora said in a discussion thread on LKML.

Bertazi went on to say that futexes in early testing saw performance improvements of 4 percent for the game Beat Saber and 1.5 percent for Shadow of the Tomb Raider while running on Proton.

The Linux community is welcoming the patch, although it needs to be cleaned up a bit to meet current coding standards.

Valve has posted “proof-of-concept” glibc patches for review. It believes these changes will significantly improve game functionality on Linux.

“We would achieve efficiency gains by adopting it in native massively-threaded applications such as Steam and the Source 2 engine,” Valve said.

If you are interested in trying out the beta, Valve has posted packages for both Arch and Ubuntu Linux.

Image credit: Casimiro PT via Shutterstock

Permalink to story.

 
It sounds like its the games that are *somewhat* demanding that will benefit the most, at least in the beginning. That's good because that covers most of the indie releases that are typically the best-selling games on Linux.
 
I'm nervous as to what changing the kernal in favor gaming would do to Linux stability and security. If I have to run one Linux distro to game and one for everything else then I might as well just boot into windows to game.

All I play on Linux is Eve online, borderlands 2 and the older elder scrolls and fallout games anyway. New games are so filled with microtransactions that I haven't even bought one in a few years. Only game I'm looking forward to is cyberpunk 2077 and if the Witcher 3 is anything to go by then it should run on Linux just fine too
 
What needs to happen with linux is being able to run games with easy anticheat etc. I know it's not the fault of linux but the anticheat software itself......but I'm getting very tired of waiting. nearly all of my multiplayer games have easy anticheat or battleeye. I'd just love to be off windows 10......for the love of christ.
 
I'm nervous as to what changing the kernal in favor gaming would do to Linux stability and security. If I have to run one Linux distro to game and one for everything else then I might as well just boot into windows to game.

All I play on Linux is Eve online, borderlands 2 and the older elder scrolls and fallout games anyway. New games are so filled with microtransactions that I haven't even bought one in a few years. Only game I'm looking forward to is cyberpunk 2077 and if the Witcher 3 is anything to go by then it should run on Linux just fine too
You don't have to worry about that. Linux developers are not going to replace or re-prioritise security and stability features/updates just so some games can gain 2-3% performance improvements. The Linux community will never forgive such a change and just move to a different kernel fork.
 
I just did the Steam Survey. One of the metrics it reports on is client OS. Windows had 96%, MacOS had 3.3% and Various Linux Distros 0.7%...
 
These efforts should have been done 15 years ago... I feel this is a case of too little too late and won't really afford us any substantial results.
 
I don't see how changing the kernel to make Linux / Ubuntu more game friendly makes sense.
Users of Ubuntu, and here I speak of myself, don't use the OS for gaming.
If you wish to game on a PC (non console), use Windows, like 96% of gamers do.
 
Linux should first become more user friendly. It's as if the entire community wants things to be as complicated as possible. Even if they do copy a few user-friendly features from Windows and Mac, they usually copy those that suck. Instead of the good ones.
 
I don't see how changing the kernel to make Linux / Ubuntu more game friendly makes sense.
Users of Ubuntu, and here I speak of myself, don't use the OS for gaming.
If you wish to game on a PC (non console), use Windows, like 96% of gamers do.

The thing is 96% (if the figure is the correct one) is by all accounts a monopoly. A massive one as well, and all of Valve's efforts have been nothing more than to create a viable alternative to Windows for PC gaming.
Of course this isn't out of the goodness of their hearts by any stretch. Before Win10 Valve could care less about the monopoly Windows enjoys. But Win10, the Windows store, and how heavily Microsoft has been pushing those as a total package threatens their monopoly, steam.

That was the only reason for the linux based SteamOS, and is the only reason for any efforts they're currently devoting to linux. Personally I see any efforts to make it easier to make linux based operating systems more mainstream as a good thing as long as any trade offs don't detract from linux's strengths.
I've long derided the power users devotion to their holy of holies, bash, over GUI solutions because it keeps linux distros decidedly in the niche' category of operating systems. IMHO any effort to give any specific distro the ability to become more "mainstream" is always a good thing. For both the targeted potential users and the linux community as a whole. After all in the end it's up to the distro developers to actually take advantage of it, and they don't have to if the don't feel the need is warranted.

As for your choice not to use a linux distro to play games? It is after all yours, and hasn't that always been what linux is about, the ability to choose?
 
Back