protonscr

Implement KeTryToAcquireGuardedMutex/KeAcquireGuardedMutex/KeReleaseGuardedMutex

protonopen Feature Request
ValveSoftware/Proton#9331 · opened 2025-12-23 by colleirose · updated 2026-02-23 · 5 comments · github
Ccolleirose 2025-12-23 github

Feature Request

I confirm:

  • [x] that I haven't found another request for this feature.
  • [x] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

Implement KeTryToAcquireGuardedMutex, KeAcquireGuardedMutex, and KeReleaseGuardedMutex.

Justification [optional]

Per https://github.com/MicrosoftDocs/windows-driver-docs/blob/staging/windows-driver-docs-pr/kernel/fast-mutexes-and-guarded-mutexes.md, in Windows 8 and later, these functions are the exact same as the already implemented fast mutex functions, but they have not been implemented in Wine despite a pull request being opened upstream since January 2023: https://gitlab.winehq.org/wine/wine/-/merge_requests/2044. The implementation is nothing more than creating a wrapper around the existing fast mutex functions, so the fix is trivial and low-risk.

The lack of these features causes Duet Night Abyss to fail since the latest update. I believe these errors are caused by the AntiCheatExpert (ACE) driver:

0318:err:ole:com_get_class_object no class object {71663b86-cc70-44a6-bb3a-40b95b74ebdf} could be created for context 0x17
0320:fixme:cryptasn:CryptDecodeObjectEx Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4
0320:fixme:cryptasn:CryptDecodeObjectEx Unsupported decoder for lpszStructType 1.3.6.1.4.1.311.2.1.4
0334:fixme:service:SetServiceObjectSecurity 00007FFFFE7E7DA0 4 00007FFFFE7EB3E0
035c:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 00007C9939E5FF50
0334:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFE80
0320:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
037c:fixme:ntoskrnl:IoCreateDeviceSecure (00007FFFFEF03900, 0, L"\\Device\\ACE-BASE", 34, 100, 0, L"D:P(A;;GA;;;BA)", (null), 00007FFFFEBFFC70): semi-stub
wine: Call from 00006FFFFFC4DD6A to unimplemented function ntoskrnl.exe.KeAcquireGuardedMutex, aborting
wine: Unimplemented function ntoskrnl.exe.KeAcquireGuardedMutex called at address 00006FFFFFC4DD6A (thread 0380), starting debugger...
0344:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFE80
0394:fixme:dbghelp:elf_search_auxv can't find symbol in module
0394:fixme:dbghelp:elf_search_auxv can't find symbol in module
wine: Call from 00006FFFFFC4DD6A to unimplemented function ntoskrnl.exe.KeAcquireGuardedMutex, aborting

It appears that at least two other games fail for the same reason. See #9258 and #8988.

Risks [optional]

The upstream PR mentioned that the changes caused tests to fail, but the OP said that the failing tests were unrelated to their PR. No further activity ever occurred, so I don't know who is correct. If these functions are the cause of the failing tests, that has to be fixed before it can be implemented.

References [optional]

Kkisak-valve maintainer 2025-12-23 github

Hello @colleirose, this should be evaluated and merged upstream before taking a look at backporting it downstream. When that lands, then give me a ping and we can ponder this further.

Ccolleirose 2026-02-04 github

@kisak-valve The PR in question has been merged upstream: https://gitlab.winehq.org/wine/wine/-/merge_requests/2044

Aalasky17 2026-02-21 github

@colleirose Thank you for the visibility on these upstream patches and the cherry-pick request. I tested all three of the games you mentioned with the upstream patches cherry-picked, and unfortunately they are still all crashing before launching a real game window. It looks like just those upstream cherry-picks are not enough to get the games working.

Ccolleirose 2026-02-21 github

I mentioned in the comments on the upstream merge request that there a handful of other fixes needed that are also available. If none of them are merged upstream, I will submit a PR there myself I suppose.

Aalasky17 2026-02-23 github

If you upstream enough patches to get at least one of the games fully working, please let me know! And in the meantime, thank you for the report! If I find someone else with time/interest in upstreaming them, I'll try to report back and let you know so that everyone avoids duplicating work :)

Nothing extracted yet.