Skip to content

Linux runner: fail fast when Proton's wine hangs headless, and a --wine override - #293

Merged
phantoslayer21 merged 1 commit into
phantoslayer21:mainfrom
j0nsh1n:fix/linux-wine-runner-headless
Nov 20, 2026
Merged

phantoslayer21 merged 1 commit into
phantoslayer21:mainfrom
j0nsh1n:fix/linux-wine-runner-headless

Conversation

@j0nsh1n

@j0nsh1n j0nsh1n commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

With no display, GE-Proton 11-11's own wine (11.0) waits forever when a program starts Vulkan. Two explorer.exe /desktop processes block on an RPC to rpcss, which never starts. run_wine_tests.py then sat in its 300-3600 s timeouts and left wine processes behind. A system wine 11.21 runs the same prefix fine. Only 11-11 was observed.

This PR changes only the test runner (clean/linux/), never shipped code:

  • Probe first: a small probe (dxgi_probe.cpp, --probe-timeout, default 90 s) lists the GPU adapters before the D3D12 tests. If it hangs, interop, ags-layout and rr-leak fail at once with a message that names the cause and the override. Tests that would skip (no --runtime, no dxc, no compiler) still skip without the probe.
  • --wine / WG_WINE_BIN: runs the tests with another wine executable, resolved to an absolute path, with the matching wineserver. The DLLs still come from --proton. The default stays Proton's own wine.
  • Display and cleanup: the probe and run_wine programs use xvfb-run when there is no display and it is installed, as interop already does. A timeout stops the wine client, lets xvfb-run clean up, then runs wineserver -k scoped to the prefix. Probe build, start and cleanup failures become per-test results with their logs. The launcher step still runs its programs with wine directly, as on main.
  • Tests: clean/linux/test_run_wine_tests.py has 33 tests with fake wine, wineserver, compiler and xvfb-run, and skips on non-Linux so the Windows CI shard only sees skips. Each fix has a test that fails on the code before it.

Real wine, on the revision before this one, with no display:

  • GE-Proton 11-11's wine fails ags-layout in 30 s with the message, and the launcher step still runs.
  • A system wine given as a relative symlink passes the probe, ags-layout (7 of 7) and interop (32 tests).
  • The xvfb-run path is covered by fakes only, since it is not installed here.

Without #291 the launcher step does not link with llvm-mingw; the two PRs are independent otherwise. Reviewed over three rounds by two other models; the last small fixes (the non-Linux skip, the launcher's direct wine, wording) were not re-reviewed.

Checklist

…ss, and takes --wine

With no display, GE-Proton 11-11's own wine (11.0) waits forever when a program starts Vulkan (two explorer.exe
/desktop processes block on an RPC to rpcss, which never starts); a system wine 11.21 runs the same prefix. Only
11-11 was observed. The runner then sat in the tests' 300 s to 3600 s limits and left wine processes behind.

The runner now lists the GPU adapters first with a small probe (dxgi_probe.cpp, --probe-timeout, default 90 s). If it
hangs, the tests that would start a D3D12 program (interop, ags-layout, rr-leak with --runtime) fail at once with a
message that names the cause and the override. A test that would skip (no --runtime, no dxc, no compiler) still skips
without the probe or the test program (the prefix is still set up, as before).

--wine / WG_WINE_BIN runs the tests with another wine executable, as an absolute path, with the wineserver beside its
real install (else beside the link, else on PATH). The DLLs still come from the Proton install. The default is still
Proton's own wine.

The probe and the test programs started through run_wine (ags-layout, rr-leak) run under xvfb-run when there is no
display and it is installed, as interop already does; the launcher's unit tests need no display and run with Wine
directly, as before, so a broken xvfb-run cannot stop them. A timed-out probe or run_wine program stops the Wine client
first, lets xvfb-run exit and clean up by itself (bounded: TERM, then KILL), kills what is left in the process group,
then runs `wineserver -k` scoped to the prefix. (interop's own shell script keeps its own timeout, outside this
clean-up.) A failing or stuck clean-up step, a probe build or start failure, and a probe or wrapper that exits with an
error (xvfb-run's own setup error) are per-test results that carry the error and the log; the launcher step and the
summary still run.

Verified: clean/linux/test_run_wine_tests.py (skips on non-Linux, so the Windows CI shard still discovers it), 33 tests with fake wine, wineserver, compiler and an xvfb-run that stays
alive around its child with an exit trap; each review finding has a test that fails on the code before it. Real Wine on
the previous revision 4c65ddd (no display, no xvfb-run installed; this revision only puts the launcher's
programs back on direct Wine, as on main, and skips the tests off Linux): GE-Proton 11-11's wine fails ags-layout in 30 s with the message and
the launcher step still runs; a system wine 11.21 given as a relative symlink passes the probe, ags-layout (7 of 7) and
interop (32 tests). The xvfb-run path is covered by the fake only. Line endings and git diff --check are clean.

Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
@phantoslayer21
phantoslayer21 merged commit f8adf1e into phantoslayer21:main Nov 20, 2026
10 checks passed
j0nsh1n added a commit to j0nsh1n/wronggpu that referenced this pull request Nov 20, 2026
phantoslayer21#293); recompute kSourceDigest on the combined sources

phantoslayer21#290 changed the same kSourceDigest line in clean/k/runtime/k_smx_selfcheck.h.
The value is recomputed with clean/k/dx12/smx_selfcheck_digest.py on the
merged tree (stale() is None; test_k_smx_selfcheck_digest passes). No other
conflict.

Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
@j0nsh1n
j0nsh1n deleted the fix/linux-wine-runner-headless branch November 20, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants