* fix(droiddeckctl): gamepad and pen input on Android 13 and 14 QPR1
* fix(droiddeckctl): read the pen's codes before its bus so Android 14 QPR1 retries numerically
CAS derives texel centres from the input size in its push constants instead of textureSize on the imported scene image, as the previous CAS shader did. Fixes the grid of black marks with CAS on 10-bit game images on Adreno 8xx.
* Return a forwarded client buffer to its client only after the display finished scanning it out
* Test that a forwarded client buffer waits for scanout and composite images do not
* Pin the gamescope build that holds forwarded client buffers until scanout ends
When the kernel cannot attach a display release fence to the buffer, the
compositor waits on the fence itself. A second release of the same buffer
before that fence signalled overwrote the pending wait, so the first wait
removed the second one and then fired again with no source to remove,
crashing the compositor and losing the session.
A second unsignalled fence is now merged into the pending wait, and a
signalled or attached one leaves the pending wait in charge of the
deferred release.
DroidDeck-Bionic preloads libfakeinput.so into its Wine processes
(tools/bionic-runtime/build.sh builds fakeinput_steam.cpp for bionic). The
fortified read/poll/ppoll entry points (#2916) call glibc's __chk_fail, which
bionic does not export, so the bionic build of the library cannot be loaded:
"CANNOT LINK EXECUTABLE .../wine: cannot locate symbol "__chk_fail"" and no
Wine program starts. Every DroidDeck-Bionic pack built from main since #2916 is
affected (r67 predates it).
The bounds failures now go through fakeinput_chk_fail(): abort() on bionic,
__chk_fail() as before on glibc. tools/tests/test_fakeinput_bionic.py fails if
__chk_fail is named outside the non-bionic branch again.
Co-authored-by: The412Banner <[email protected]>
* feat(agent): connect the agent on Quest, which has no pairing screen
Quest hides Android's Wireless debugging pairing, so the agent's connection
step could not be completed there. On a Quest the step's action is now Allow:
DroidDeck connects to adbd on 127.0.0.1:5555 (after a one-time `adb tcpip 5555`
from a computer) and the headset asks "Allow debugging?" for DroidDeck's key.
Wireless debugging accepts a key allowed that way, so the saved loopback
connection then works like a pairing.
DroidDeck also declares WRITE_SECURE_SETTINGS. When it is granted over adb,
DroidDeck turns Wireless debugging on itself before looking for its port.
* fix(agent): keep the Quest setup hint visible and report a declined prompt correctly
A late connection lookup no longer overwrites an Allow that is running.
On a Quest, the connection row shows its status above the full hint, which
holds the one-time commands. The failure message no longer claims port 5555
was silent, since a declined or unanswered prompt fails the same way.
* fix(agent): connection checks from before an Allow no longer overwrite it
A check started before Allow could land after it and mark the step as not
done, or replace the prompt instructions while Allow was still waiting.
Each Allow now starts a new generation, and older connection results are
dropped, as are results that land while Allow is running.
* ci: rerun after the Maven 429 rate limit
* fix(quest): turn Wireless debugging on by itself only on Quest
Other devices keep exactly their pairing flow even if WRITE_SECURE_SETTINGS
is granted. Once connected, the Quest agent row shows its usual short hint
instead of the setup instructions.
* fix(quest): connect after a reboot without a second Allow
After a reboot, turning Wireless debugging on makes the Quest ask again to
allow it on this network, and the 2 s wait ran out before that was
answered, so the row showed Allow. Allow then failed, since port 5555 is
closed after a reboot. The lookup now keeps trying for up to 30 s after
turning Wireless debugging on, and Allow first tries the already-trusted
key over Wireless debugging before asking on port 5555.
* ci: rerun after download timeouts in the Python tests
---------
Co-authored-by: FryMcNugget <[email protected]>
* Prepare FrameGen for instance-owned scratch lifecycle
* Make DD-FG rebuild and teardown completion-aware
* Restore DD-FG namespace boundary
* Isolate DD-FG scratch state and reclaim resources on rebuild
* Declare per-instance scratch builder before recording code
* Make DD-FG ring teardown report unsafe GPU completion
* Retain DD-FG input ring until GPU completion is confirmed
* Add DD-FG lifecycle and resource-isolation tests
* Cover DD-FG teardown and rebuild failure cases
* Document DD-FG scratch ownership and teardown semantics
* Guard DD-FG teardown when GPU completion cannot be queried
* docs: clarify DD-FG device-loss teardown
* fix: define DD-FG scratch state before resize
* fix: define DD-FG scratch state before resize
* fix(ddfg): wait for the GPU before replacing the input ring on resize
* Fix DD-FG ring cleanup after device loss
* Propagate DD-FG device-loss status
* Retain DD-FG resources when GPU completion is unknown
* Retain DD-FG resources when GPU completion is unknown
* Retain DD-FG resources when GPU completion is unknown
* Retain DD-FG resources when GPU completion is unknown
* Retain DD-FG resources when GPU completion is unknown
* Retry DD-FG cleanup after an idle-wait failure
* Test DD-FG cleanup retry after GPU wait failure
---------
Co-authored-by: maxjivi05 <[email protected]>
getcwd(NULL, ...) and realpath(path, NULL) returned the host path of a
session mount whenever its guest path was longer than the host path,
because the translation had to fit the buffer the C library allocated.
Shells export that host path as PWD, and Wine prefers a valid PWD, so a
program started from an added game folder on a removable card got a
working directory it could not open and started in the Windows folder.
Grow the allocated result to fit the guest path.
* fix(battlenet): an install folder chosen in Battle.net on the library's drive is kept
Every open set Battle.net's default install folder back to the library folder whenever the two differed, so a folder the user picked in Battle.net on the same drive was replaced on the next open. The folder is now only moved to the library when it is unset, missing, or on another drive.
* fix(battlenet): check the trimmed folder against the rootfs drives
A game storage folder saved as a raw volume path is opened through the volume's /storage path when only that one is usable, and its private directories are kept under either path. Battle.net is only given a library folder when the configured one is attached, so a missing card no longer moves its install folder to internal storage.
Since each pad was described to Wine's udev backend with the identity its
SDL backend sees, the udev backend left every pad to SDL. Where SDL does
not open the pad, such as a session without proot, Windows games lost both
the gamepad and the on-screen controls.
The udev backend owns the pads again with the Steam Input identity it had
before. SDL inside Wine's bus driver now reads the same identity for those
pads and skips them as it skips any Steam Input pad, so each pad is still
listed once and both triggers keep reading together.
Keep the Steam install picker state out of the Steam engine object
The picker state lived on SteamStore, which is first touched from the
background stores refresh thread. On the Compose runtime in use, a state
object created outside a snapshot while the composition holds an open
snapshot is unreadable inside it, so the front end crashed on startup
with "Reading a state that was created after the snapshot was taken".
The state now lives on StoresState next to the other UI-facing store
state, and SteamStore holds no Compose state.
* fix(steam): mark ARM64-uninstallable tool dependencies installed
The ARM64 client cannot install Proton EasyAntiCheat Runtime (1826330),
which it refuses as an invalid platform, or that tool's Steam Linux
Runtime 1.0 (scout) dependency (1070560), which has no ARM64 depot. After
the EULA hand-off the client starts the dependency install and aborts in
glibc's smallbin check.
Write the bare installed manifest DroidDeck already uses for adopted games
for those two tools before the client starts: only on the ARM64 client,
only when appinfo shows no ARM64 depot, and never over a fully installed
manifest.
Refs: ValveSoftware/steam-for-linux#13937, DroidDeck #2313
* fix(steam): seed a tool only when no library has it installed, and write manifests atomically
A partial manifest in the first library no longer hides a full install in
another one, and a failed write leaves no truncated or stray manifest.
* fix(steam): publish tool manifests without replacing concurrent installs
* fix(desktop): Log Out returns to DroidDeck, Return to Gaming Mode opens Steam
Both ended Plasma through the same logout call and the desktop script always
started Steam afterwards. Return to Gaming Mode now leaves a request that the
script reads; a plain Log Out ends the desktop. The app ships the shortcut
with the script so both always change together.
* Wait for the logout reply so a cold Shutdown service still gets the request
* Forget the return to gaming mode when the logout request fails
The Steam copy (AppID 12100) died on "Start new game" at 0042A703: FEX's reduced x87 precision turns a float into a bad pointer. GameEnvironment.knownGames sets FEX_X87REDUCEDPRECISION=0 for it, above the shared settings and below the game's own, and picking a FEX preset for the game keeps the fix.
Co-authored-by: Unixcision <[email protected]>
Co-authored-by: Kurt Himebauch <[email protected]>
* fix(input): programs built with _FORTIFY_SOURCE read the virtual pads
Fortified builds, Flatpak runtimes among them, call __read_chk, __poll_chk
and __ppoll_chk in place of read, poll and ppoll, and glibc's versions go
straight to the kernel. Such programs opened a pad through the shim but read
its backing ring file instead of events, so they never saw input: Marathon
Recompiled's SDL reads the pad through __read_chk.
The shim now provides all three, with glibc's bounds checks, on the same
paths as read, poll and ppoll.
* fix(input): keep glibc's __read_chk for descriptors that are not pads
Only pad descriptors take the shim's read path; the rest go to the next
__read_chk, so fortified reads keep libc's cancellation point. The test
also polls the empty ring with a zero timeout, which a __poll_chk that
bypasses the shim would report as ready.
---------
Co-authored-by: Kurt Himebauch <[email protected]>
* fix(ci): Robolectric's jar cache is saved again, and a Maven 429 runs the unit tests again
* fix(ci): retry Gradle artifact download rate limits too
* fix(ci): restrict Maven retry to dependency download exceptions
---------
Co-authored-by: Kurt Himebauch <[email protected]>
* fix(input): each pad is listed once in Windows games so both triggers read together
A pad that Wine's SDL backend also reads was described to Wine's udev
backend as a Steam Input virtual pad, so Wine built two devices for one
pad. SDL RawInput games could not match the two and read held triggers as
released. The pad now keeps the identity the SDL backend sees unless that
backend is told to skip it.
Rumble that Wine starts through SDL is now held until the next update,
matching the udev path, instead of stopping after one second.
* fix(input): hold only the rumble Wine starts through SDL, not later SDL rumble in the same process
* fix(input): read @file SDL ignore lists when choosing the pad identity
SDL reads the ignore and except lists from a file when the value starts
with @. Match the ring pad ID against that file's contents too.
* fix(input): parse SDL controller ID lists the way SDL does when choosing the pad identity
Prepare the rootfs before a native program starts outside a session
The linker and libc are patched for Android's seccomp filter only when a
session starts. A helper started between sessions, after a runtime
update and before the first session, ran the unpatched linker and died
of SIGSYS (exit code 159). The shared native process builder now
prepares the rootfs itself when no session is running.
* fix(mali): Auto respects Venus turned off and picks the bridge on Mali-G2-Ultra
With GPU drivers on Auto, Mali (Venus) was turned back on after the user turned it off. Auto now respects that choice, and picks the bridge on Mali-G2-Ultra, where Steam's web helper dies on its first window through Venus (#2879). When Auto itself turns Venus off it clears the stored key, so its own decision does not read as the user's later.
* fix(mali): clear Auto-owned Venus preference when fallback ends
---------
Co-authored-by: Unixcision <[email protected]>
Co-authored-by: Kurt Himebauch <[email protected]>
* fix(game-env): resolve store launcher executable from sidecar
Store titles launched through .droiddeck-launch.bat passed the wrapper
path directly into engine_fixes and other exe-based checks, so stem
checks saw .droiddeck-launch and game_files scanned from the install
root rather than the executable's folder. For Epic's Batman: Arkham
City, Binaries/Win32/BatmanAC.exe sat one level deeper than game_files
scans, so arkham_city_x87 never set FEX_X87REDUCEDPRECISION=0.
Resolve .droiddeck-launch.bat to the validated exe entry from
.droiddeck-store.json when inspecting the game, while keeping the
launcher path in the Proton command.
* fix(game-env): reject parent segments before normpath in store_game_exe
os.path.normpath lexically collapses symlink/../file before the
filesystem is consulted, which could validate a different file than a
symlinked subdirectory path denotes. Reject any ".." path component
after separator normalization before calling os.path.normpath.
---------
Co-authored-by: sergeymetallic <[email protected]>
* fix(game-env): run Inno Setup installers with the FEX Stability settings
An Inno Setup installer added as a game stops with Wine's "Path not
fpund." dialog under the default FEX preset. The 32-bit setup stub
corrupts its own paths before it opens its archive (#1277, #3067). #1174
avoids the stub only for GOG installs, by extracting them natively.
droiddeck-game-env now finds the stub by the setup loader's offset-table
ID in its resources, or the "Inno" marker older loaders keep at 0x30, and
launches it with the Stability preset's FEX settings. A FEX preset chosen
for the game itself still wins.
Fixes#3067
* fix(game-env): name only the preset seen to corrupt Inno Setup paths
The launch note and the docs said the faster presets corrupt the setup
stub. Only the default Performance + TSO preset was seen doing it.
* fix(game-env): give Inno Setup installers started with run the Stability settings
The run verb skips engine_fixes and gets only the sync settings, so an installer started that way kept the inherited Performance + TSO preset. Apply the Stability values on that path too; explicit game settings still win in apply_config.
* fix(game-env): keep the game's own FEX settings for installers started with run
The run path filtered the game entry down to sync keys, so a FEX preset
chosen for the game was replaced by the installer's Stability settings,
and a null could not unset a preset key. Copy the game's Stability FEX
keys into the synced config before applying it, so the game's own
settings still win on every launch path.
---------
Co-authored-by: Kurt Himebauch <[email protected]>
* fix(venus): OpenGL quads no longer crash Mali's shader compiler through Zink
The Mali-G610's driver crashes compiling Zink's geometry shaders
(SIGSEGV at 0x40 in cmpbe_v2_compile_multiple_shaders), and the render
server and the application die with it. A plain geometry shader that
only passes triangles on does not crash it, but draws nothing. Zink
draws GL_QUADS through a geometry shader when the device has the
feature, so OpenGL programs died on their first quad.
The Mali layer now reports no geometryShader to Zink on ARM GPUs.
Mesa then splits quads into triangles itself. DXVK keeps the feature,
which it needs for D3D10 and 11. DROIDDECK_MALI_COMPAT_NO_GS=0 keeps
it for Zink, =1 hides it from every application.
* test(venus): clear DROIDDECK_MALI_COMPAT_NO_GS before the layer tests
The geometry shader test checks the default first. With the variable
exported in the shell, it failed before it reached its own settings.
* test(venus): check that other ARM applications keep the geometry shader
* Release zero-copy display buffers at latch; gamescope waits for scanout before reusing an image
* Test that zero-copy releases follow the kernel's fence attach, not the buffer kind
* Pin the gamescope build that waits for scanout before reusing an image
* Probe the fallback output image for scanout so the composite waits on it too
* Pin the gamescope build that probes the fallback output image
## Problem
Zero-copy layer transitions could leave the compositor in an
inconsistent state when allocating an `ASurfaceTransaction` completion
callback failed.
Some failure paths released the current or previous `ASurfaceControl`
even though the transaction had not been applied. This could invalidate
layer state or release resources before the transition completed.
## Fix
- Cancel and delete transactions when completion callback allocation
fails.
- Preserve the current layer and buffer state instead of releasing
resources prematurely.
- Roll back surface swaps when presentation cannot proceed.
- Return an error from failed presentation paths and leave the layer
available for recovery.
- Apply the same failure handling to presentation, layer hiding and
surface retirement.
## Tests
- `git diff --check`: passed.
- Native build: not run locally.
- Device testing:
> Tested on one device and helped with his problem, test build is up for
further testing.
## Changes
- Add vertical page scrolling using the controller's right stick.
> Reuse existing right stick axis detection for better controller
compatibility.
> Convert stick movement into scroll events for Compose scrollable
components.
> Add a dead zone threshold and rate limiting to prevent unintended
scrolling.
## Compatibility
- Supports controllers with different right stick axis layouts.
- Scroll behavior depends on the page's handling of scroll events.
Suggest by _corcse on discord
UwU