fix(steam): answer Steam's D3D driver query without starting Wine

At every start, Steam's shader pre-caching runs d3ddriverquery64.exe
through each Proton tool (DroidDeck-Proton and the ARM64 Proton) in
compatdata/0. Here the query has never succeeded (948 of 948 runs in
the client's shader log failed, mostly exit code 1), and each run
started Wine in that prefix, where the two Protons upgraded it back and
forth (11.0-100 <-> GE-Proton11-11) with the 32-bit wine.inf install.
When that overlapped a game's start, AIO ran 25-30 % slower for its
first 5-7 seconds.

Both Proton wrappers now exit 1 for the query before doing anything
else, so Steam gets the same failure without Wine. Other launches are
unchanged.

(cherry picked from commit 0d8dbe4360)
This commit is contained in:
The412Banner committed 2026-10-28 02:48:47 +00:00
1 parent c6a31be049
commit 93bed6e931
2 files changed
+41 -6

No files matched your search

+19
View File
@@ -856,6 +856,25 @@ class GameEnvironmentTest(unittest.TestCase):
subprocess.run(["bash", "-n"], input=script, text=True, check=True)
self.assertIn('bl_run ${BL_TASKSET:-} /usr/local/bin/droiddeck-game-env', script)
def test_both_proton_wrappers_answer_steams_driver_query_without_wine(self):
scripts = (COMPAT["launcher_sh"](), COMPAT["extra_wrapper_sh"]("proton"))
query = "/root/.local/share/Steam/steamrtarm64/../bin/d3ddriverquery64.exe"
for script in scripts:
subprocess.run(["bash", "-n"], input=script, text=True, check=True)
self.assertLess(script.index('case "${1##*/}" in'), script.index("bl_components "))
for args in ([query, "-d3d12"], [query], [query.replace("64.exe", ".exe")]):
result = subprocess.run(["bash", "-s", "run"] + args, input=script, text=True, capture_output=True,
env={"PATH": os.defpath, "HOME": "/nonexistent"}, timeout=10)
self.assertEqual(result.returncode, 1, result.stderr)
self.assertEqual(result.stdout, "")
self.assertIn("D3D driver query is not run", result.stderr)
skip = COMPAT["BL_DRIVER_QUERY_SKIP"]
for args in (["/games/AIO/AIO-Graphics-Test-64bit.exe", "--cube", "dx11"],
["/games/Tool/tool.exe", query], ["/games/d3ddriverquery64.exe.bak"]):
out = subprocess.run(["bash", "-c", "verb=run\n" + skip + "echo continued", "_"] + args,
capture_output=True, text=True, check=True).stdout
self.assertEqual(out, "continued\n", args)
def test_wrappers_preload_the_session_library_before_the_input_shim(self):
overlay = "/root/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so"
with tempfile.TemporaryDirectory() as tmp: