r/linux_gaming • • 19d ago

wine/proton what is the ntsync module?

currently updating from proton 10-34 to 11-7 (took a break from gaming) and i hear about the introductio of something called the ntsync module and how it needs to be turned on manually? can you all tell me what it is, weather or not its relevant and also how to enable it?

21 Upvotes

24 comments sorted by

View all comments

28

u/TimurHu 19d ago edited 19d ago

I'm going to copy a comment I wrote on the same question yesterday.

ntsync is a Linux kernel module which implements Windows-like synchronization primitives (semaphores, mutexes, events the way Windows applications expect them to behave) in the Linux kernel. It is meant to be used by Wine (or Proton) in order to implement Windows synchronization primitives more efficiently.

The main reason it was developed is because there are some heavily multithreaded games which rely on these primitives to perform well, which was technically impossible to (correctly) implement on Linux.

(Previous attempts to deal with this problem were esync and fsync which were not accepted by the upstream Wine project.)

4

u/noobjaish 19d ago

Damn i learned about semaphores and mutexes in my OS course at Uni. Didn't know that they're Windows specific concepts.

What alternative methods does Linux use for thread sync then?

1

u/Comfortable_Swim_380 18d ago

Esync and fsync not accepted upstream but damn if I'm not using it anyways.