Linux gaming with NTSYNC for better FPS

CaffeineAddict

Well-Known Member
Joined
Jan 21, 2024
Messages
3,968
Reaction score
4,156
Credits
32,446
ntsync is an experimental Linux kernel driver mimicking Windows synchronization mechanisms.
It significantly improves performance of Wine synchronization syscalls comparing to their previous, more user-space-based implementations (esync, fsync).
According to its author's benchmarks, the gains in FPS in various games were usually 40-200%
But...
The eye-catching 40 to 200 percent FPS gains cited in NTSYNC's original benchmarks were measured against unmodified upstream Wine, which almost nobody uses to play games on Linux anymore. Most Linux gamers, including every Steam Deck owner, use Proton, which already has fsync. Compared to fsync, NTSYNC's performance gains are far more modest.

How to enable in Lutris?
Right click your game -> configure -> system options
Scroll to the bottom and under "Environment variables" add variable PROTON_USE_NTSYNC and set value to 1
The game has to use Proton-GE for this option minimum version 10-9 which at the time of this writing is available in Lutris.
To set your game to use Proton-GE head to "Runner options" tab and select "Proton-GE (latest)" from drop down under "wine"

For this to work you'll need to install ntsync driver, for Debian see debian link below how.
When you install the driver as instructed you'll also need to run sudo modprobe ntsync because newly installed driver isn't loaded into kernel.
Then run your configured game, press Super button (or Windows button) run a terminal and run command lsof /dev/ntsync, if the command lists open files the NTSYNC works for that specific game.

Reference and additional reading:

edit:
Steps to enable ntsync above are specific for Lutris, Proton-GE and Debian, you probably don't use this combo, let us know how you enabled ntsync on your system and share your steps and links (if any) in reply.
 
Last edited:


This is Wine innovation. Why is Proton required to enable this? I guess is isn't and it's just a matter of installing suitable Linux kernel and Wine version?
 
ntsync is kernel driver however both wine and proton to make use of it need to be patched, that is, code added that makes use of the driver.

Proton already pulls changes from wine, therefore the patch in wine was simply copied over to proton just like any other changes in wine that are merged or regular basis.

I don't think kernel version matters but wine and proton versions do.

Therefore in conclusion, ntsync driver is 1 requirement, patched wine/proton that makes use of it is 2nd requirement.
 


Follow Linux.org

Staff online

Members online


Top