[pr-docs][linux-proton] Docs: the changes Wine needs for Darner under Proton, with their patches and where each is fixed #390

Open
ntsthay wants to merge 1 commit from ntsthay/linux-wine-patches into main AGit
First-time contributor

Docs only. Nothing here runs in the game.

Contributor role (optional)

  • Fluxer ID:

What it changes

docs/linux-proton.md gets a section, "Changes to Wine", on the three places where Wine had to change for Darner. A table says what each one is needed for and which Wine and Proton versions have it.

  • Section views over a placeholder (new, not fixed anywhere). When Wine maps a section over a placeholder, it makes the placeholder's anonymous pages readable and writable before it maps the file over them. A thread that writes in between loses its write. This is why xmem::tests::a_title_thread_goes_on_using_the_rest_of_a_view fails under load on Proton. A test with plain Win32 calls shows the same loss, and a 4-line ntdll patch removes it. The section includes the patch.
  • MemoryRegionInformationEx (class 7 of NtQueryVirtualMemory, not fixed anywhere). Darner already falls back when Wine does not know the class, so the patch is optional. The section includes it.
  • The Wine server's memory views in a tree. The doc already covered this. It now says where the fix is: Wine 11.23 (3217449b), Proton-CachyOS from nightly cachyos-11.0-20261201, and not Proton Experimental as of Valve's experimental_11.0 at 4c5e47d.

"Restart after warm-up" said that Wine's powershell.exe was likely the reason the restart never happened, but nobody had checked. It is now checked: Wine's powershell.exe is a stub that logs its arguments and exits without running anything (programs/powershell/main.c).

How it was tested

  • Tested revision: this branch on f3840d7.
  • Both patches apply with patch -p1 --dry-run to dlls/ntdll/unix/virtual.c of wine-cachyos 27c65a79 and of Valve's experimental_11.0 at 4c5e47d.
  • The placeholder patch was built into ntdll.so from wine-cachyos 27c65a79 and run under Proton on an RTX 4080. cargo nextest run -p darner-hle -p darner-loader --stress-count 3 had 0 failures of the xmem test with it, against 2 to 6 without it.
  • cargo xtask policy: 555 files ok.
  • Coverage gaps: the patched ntdll.so has not been played with yet, only run under the tests.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #385 makes the preload restart test skip under Wine for the same powershell.exe reason.
  • Replaces or overlaps: none found
Docs only. Nothing here runs in the game. ## Contributor role (optional) - Fluxer ID: ## What it changes `docs/linux-proton.md` gets a section, "Changes to Wine", on the three places where Wine had to change for Darner. A table says what each one is needed for and which Wine and Proton versions have it. - **Section views over a placeholder** (new, not fixed anywhere). When Wine maps a section over a placeholder, it makes the placeholder's anonymous pages readable and writable before it maps the file over them. A thread that writes in between loses its write. This is why `xmem::tests::a_title_thread_goes_on_using_the_rest_of_a_view` fails under load on Proton. A test with plain Win32 calls shows the same loss, and a 4-line `ntdll` patch removes it. The section includes the patch. - **`MemoryRegionInformationEx`** (class 7 of `NtQueryVirtualMemory`, not fixed anywhere). Darner already falls back when Wine does not know the class, so the patch is optional. The section includes it. - **The Wine server's memory views in a tree.** The doc already covered this. It now says where the fix is: Wine 11.23 (`3217449b`), Proton-CachyOS from nightly `cachyos-11.0-20261201`, and not Proton Experimental as of Valve's `experimental_11.0` at `4c5e47d`. "Restart after warm-up" said that Wine's `powershell.exe` was likely the reason the restart never happened, but nobody had checked. It is now checked: Wine's `powershell.exe` is a stub that logs its arguments and exits without running anything (`programs/powershell/main.c`). ## How it was tested - Tested revision: this branch on `f3840d7`. - Both patches apply with `patch -p1 --dry-run` to `dlls/ntdll/unix/virtual.c` of wine-cachyos `27c65a79` and of Valve's `experimental_11.0` at `4c5e47d`. - The placeholder patch was built into `ntdll.so` from wine-cachyos `27c65a79` and run under Proton on an RTX 4080. `cargo nextest run -p darner-hle -p darner-loader --stress-count 3` had 0 failures of the xmem test with it, against 2 to 6 without it. - `cargo xtask policy`: 555 files ok. - Coverage gaps: the patched `ntdll.so` has not been played with yet, only run under the tests. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #385 makes the preload restart test skip under Wine for the same `powershell.exe` reason. - Replaces or overlaps: none found
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/390/head:ntsthay/linux-wine-patches'
git switch 'ntsthay/linux-wine-patches'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'ntsthay/linux-wine-patches'
git switch 'ntsthay/linux-wine-patches'
git rebase 'main'
git switch 'main'
git merge --ff-only 'ntsthay/linux-wine-patches'
git switch 'ntsthay/linux-wine-patches'
git rebase 'main'
git switch 'main'
git merge --no-ff 'ntsthay/linux-wine-patches'
git switch 'main'
git merge --squash 'ntsthay/linux-wine-patches'
git switch 'main'
git merge --ff-only 'ntsthay/linux-wine-patches'
git switch 'main'
git merge 'ntsthay/linux-wine-patches'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!390
No description provided.