ntsync: add PROTON_NO_KERNEL_NTSYNC env switch to force userspace backend - #39
Merged
Merged
Conversation
…kend Runtime escape hatch for A/B testing: when set, wineserver skips the /dev/ntsync kernel driver even if present and working, and initializes the userspace shm backend instead. Distinct log line so the forced backend is identifiable in device logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a runtime escape hatch to the ntsync backend selection:
PROTON_NO_KERNEL_NTSYNC=1makes wineserver skip/dev/ntsynceven when the kernel driver is present and working, and initialize the userspace ntsync-android shm backend instead.Why
For A/B testing of the two backends on devices that have a kernel ntsync driver (e.g. RP6 testing kernels): suspected sync-related game issues can now be checked against the userspace backend with just an env var, no rebuild. (The original motivation — a Unity stuck-analog report — turned out to be unrelated to ntsync, but the switch remains useful for future triage.)
How
server_inproc_sync_c.patch: inget_inproc_device_fd(), when the env var is set wineserver opens/dev/ntsync, immediately closes it, and falls through to thentsync_init()userspace path. Android-only (#ifdef __ANDROID__); non-Android builds untouched.ntsync: PROTON_NO_KERNEL_NTSYNC set, using userspace ntsync.PROTON_NO_NTSYNC→PROTON_NO_KERNEL_NTSYNC→ kernel probe → userspace fallback → server-side sync.android/ntsync_android/README.md; release notes updated.Verification
server/wineserverlinks; zero new warnings (only the 6 pre-existing-Wenum-conversionwarnings ininproc_sync.c, unchanged)