Fsync/futex not starting on fsync patched kernel

I am using Manjaro Linux with kernel 5.4.178-1. My CPU is an AMD A8-7410.
Output of “lutris -d”: Ubuntu Pastebin
When I run a game with fsync enabled, it’s supposed to print “fsync: up and running”, but it never does, and wine uses server-side sync instead. Keep in mind esync works perfectly.

Another thing I find weird is that I’ve tried running the same game on a kernel without the fsync patch and lutris would stop me from running it, just like it should. But here the game turns on just fine with no warnings, but fsync doesn’t run.

Upgrading to kernel 5.15.21-1 fixes the issue, but another unrelated bug won’t let me play using DXVK on it, due to my old GPU. So I can only use kernel 5.4. (kernel 5.10.98-1 on Manjaro has the same issue with fsync not starting)

1 Like

What’s going on is, the old futex (futex_wait_multiple) patch that Manjaro’s kernels have doesn’t work anymore for FSYNC with newer wine runners. Thus, Linux 5.15+ is needed.

If you can’t upgrade your kernel, try lutris-ge-6.16-1 (I think it’s still available in the list of Wine runners) that’s the last one I had where FSYNC still worked with the old futex code. That was a very good wine runner.

1 Like

Thanks, that fixed it!
Also, is there any way I could get the new fsync patch used in kernel 5.15 and compile kernel 5.4 with it?

Yes, there would be a way, but getting them to apply (and work) on your kernel of choice may be another matter. It would most certainly require manual addition and editing of code, but it also may not be appropriate as written for Linux 5.4.

Here’s one I found based for Linux 5.10:

(Edit, after a better look over, that was not appropriate. I’m still looking)

P.S. I think you’re SOL for that, for Linux 5.4. The code isn’t even in the same places, and I don’t think anyone has ported the new futex2 work to Linux 5.4, at least I can’t find it. I was maintaining my own patch for a while (the old futex_wait_multiple) but I didn’t start until after Linux 5.10 and looking at the Linux 5.4 source, it’s not within my abilities. I know just enough kernel code and C to be dangerous lol

That aside, tell me what you know about the problem you’re having with the kernel, maybe there’s a solution for that. If you’re capable of patching and compiling a kernel, maybe there’s a solution out there. There could also be boot parameters that can be passed that may help.

This might be eligible for another post on the forum, but I don’t know if I should make another so soon.
Vulkan does not work on mesa drivers for me, so I switched to amdgpu. Vulkan works with both radv and amdvlk for me, when running amdgpu drivers.
When I try to run a dxvk game on Kernel 5.15, my system freezes. This might be because of my old-ish laptop GPU, the radeon r5 (m340 or m330 I think) Running vkcube or vulkaninfo works fine. I do get an error when running vulkaninfo: Ubuntu Pastebin but it runs fine after.

It does sound like you’re better off with Linux 5.4. There’s nothing wrong with running an older kernel that suits older hardware better, and Linux 5.4 is even a LTS branch that is still being maintained.

Now (just so you understand) if using amdgpu or radeon (the low level kernel drivers), it’s still using Mesa libraries for OpenGL and RADV vulkan. I’m assuming that’s what you mean, yours is a GPU (“Sea Islands”) supported by radeon that they ported to amdgpu. Yes, you need to use amdgpu for Vulkan support.

That error in your pastebin, is not a fatal error. It’s coming from the vulkan loader (vulkan-icd-loader). The loader supports a higher level of the Vulkan spec than the driver currently does. I should think most people will see that message (I do). I haven’t used Mesa 22.0.0-rc yet so I couldn’t say if that has changed (my guess would be probably so).

Now, as for FSYNC. I’m not sure that’s as important as you think it is. Firstly, only some games will benefit from that vs. ESYNC. Generally DirectX12 games are more likely to benefit. ESYNC uses the eventfd system in the kernel to notify wine applications waiting on events. It would depend on how many file descriptors are being created as to whether or not there’s enough overhead to matter.

ESYNC may also require you to up the limit of open file handles if the defaults (4096) aren’t enough. You would get errors if that was the case.

I use DefaultLimitNOFILE=1048576:1048576 in /etc/systemd/system.conf to increase both hard limit and soft limit. Piss off, systemd… it’s MY system and I hate you lol)

So you’ve got your lutris-6.16-ge runner that works for FSYNC with your kernel. You can still use newer wine runners for other games, just with ESYNC.

It’s older hardware anyway, and your days of buying new AAA titles to play on that hardware are numbered.

1 Like