ntsync is an experimental Linux kernel driver mimicking Windows synchronization mechanisms. It significantly improves Wine performance comparing to its 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 this applies mostly to CPU-bound scenarios, otherwise FPS gains will be much more modest.
This page describes how to enable ntsync manually on an amd64 hardware until it is officially included in Debian.
This howto is based on DebianTrixie, but it will probably work on DebianSid as well.
The status of the below procedures and packages should be considered as highly experimental.
TLDR
Everything is automatically buildable now and binary packages can be installed from the project's Open Build Service repo:
Add the repo to your config:
wget -O morgwai-obs.gpg https://build.opensuse.org/projects/home:morgwai/signing_keys/download?kind=gpg echo "deb [signed-by=/etc/apt/keyrings/morgwai-obs.gpg] http://download.opensuse.org/repositories/home:/morgwai:/ntsync/Debian_Testing /" >wine-ntsync.list sudo mv morgwai-obs.gpg /etc/apt/keyrings/ sudo mv wine-ntsync.list /etc/apt/sources.list.d/ sudo dpkg --add-architecture i386 ## only needed if installing wine for the first time sudo apt-get update
For DebianSid replace Debian_Testing with Debian_Unstable in the second command, note however that these packages have not been tested on sid at all by the maintainer.
- Install the packages:
If you want to use Wine:
sudo apt-get install winehq-devel
Note that the official Debian wine packages usually use aliases like wine-stable in commands of desktop shortcuts, so if you were using the official Debian packages, you may need to edit your desktop shortcuts to use wine instead. You may also want to run sudo apt autoremove to remove unused dependencies of the official Debian packages.
If you only need the kernel module for Steam / Proton:
sudo apt-get install ntsync-kernel-dkms
Verify that ntsync works: run winecfg and then in another terminal the list of processes reported by lsof /dev/ntsync should not be empty.
Detailed info
Kernel module
The kernel module has been merged to the mainline in Linux 6.14, Debian has released official experimental packages and since version 6.14.5-1~exp1 support for ntsync has been enabled. DebianTrixie however will stay at kernel 6.12 at least for now and the driver cannot be backported to the official 6.12 packages due to policy reasons.
Therefore, to avoid the necessity of installing non-distro-managed 6.14 kernel packages, ntsync module has been backported as a DKMS package that will be automatically installed together with patched Wine packages (unless 6.14.5 or newer kernel is already installed).
Wine
The userspace Wine patch is currently undergoing a review but is not merged yet to WineHQ packages nor the official Debian packages.
(Note: please do not spam the above review thread unless you are really sure you have something useful to add: the author has already expressed their frustration with pointless messages. And if you find the driver useful, then please do add some positive reaction to the initial post
)
Therefore, the following options were considered:
Apply ntsync patch on top of the official 10.0 Debian wine packages: unfortunately the patch cannot be applied cleanly to this version, so this would require some serious digging in the source code.
Apply ntsync patch on top of the latest WineHQ wine-devel package for Debian: these packages are quite unstable however and crash or misbehave when running most programs. This is due to the fact that a vanilla gcc is used instead of mingw compilers and due to the lack of some critical patches applied in the official Debian packages.
As a consequence a "hybrid" package has been created based on the WineHQ's wine-devel sources and debianization, with ntsync patch (modified to use a local copy of ntsync kernel header), some patches from the official Debian wine package, a fix for bug 1104898 and built with mingw compilers.
Proton
A feature request has been filed some time ago to add ntsync support.
Feedback and issue reporting
For now please just use this Debian Forums thread, if it turns to be not enough, then some more robust system will be set up instead.
Related links and resources
CategoryGame | CategoryNotNative | CategorySoftware | CategoryKernel
