* 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
* 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]>
* 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
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.
* 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
* 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
* 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
- **Perf:** Optimize DD FrameGen flow image initialization and shader
sampling.
> FrameGen should start faster and be more reliable.
- **Perf:** Skip unused FLOWREG image initialization and remove
redundant final FLOWREG barrier.
- **Perf:** Use initialization barriers for fresh framegen images.
> Helps with reliability and performance.
- **Perf:** Reserve capacity for image initialization barriers and Use
fixed storage for image initialization barriers.
- **Perf:** Batch FrameGen image descriptor updates and some FrameGen
image barriers.
> Less calls to the vulkan API.
- **Perf:** Skip unused global motion reduction sums.
- **Docs:** Add OF3_FLOWREG shader documents and some comments.
> This should be helpful when making future changes in the shader, only
for testing and development.
## Fixes
- Fix: Derive OF3 Flow Length from Array Size.
> Should make future changes easier.
- Fix: DD FrameGen scratch resource leak on resize.
- Fix: Present semaphore synchronization to prevent device loss on some
devices.
> Reported by a user, DDFG never worked on his device, this didn't
actually helped him, but im keeping because it can be useful for other
devices.
> issue reported on discord [Link to bug
report](https://discord.com/channels/1552707793247539220/1575946870151446589)
> This file contains the investigation made, in Portuguese:

## Performance
**OLD DroidDeck FrameGen**
| FPS (reported) | 1% low | Frametime | Game | DDFG | Device | DD
version |
|:--:|:--:|:--:|:--|:--:|:--|:--|
| 39.9 → 118.8 | 16.1 | 25.1 ms | Mass Effect | 3× | RP Nova, 12 GB,
Snapdragon 8 Gen 2 | 0.7.11 Stable |
| 32.5 → 91.4 | 21.9 | ## | NieR:Automata | 3× | S26U, SD 8 EG 5, Adr
840 | Preview b08d8e8 |
| 25.2 → 60.0 | ## | ## | Roadside Research | 4× | Odin2 Portal, Adreno
740 | 0.7.11 Stable |
*Report 1 — coleslaw117*
*Report 2 — twitchlemaxou*
*Report 3 — Dylon*
**NEW DroidDeck FrameGen**
| FPS (reported) | 1% low | Frametime | Game | DDFG | Device | DD
version |
|:--:|:--:|:--:|:--|:--:|:--|:--|
## Testing
- All checkd on Github green
- APK compiles
- All verification passed on my fork
- Working on test build
* fix(bionic): run games from a DroidDeck-Proton prefix that start through a launcher
Europa Universalis IV, moved from DroidDeck-Proton to DroidDeck-Bionic, never got past its launcher:
- The network adapter list (GetAdaptersAddresses) never answered with the layer's default if_nameindex code, so the
Paradox Launcher waited forever. launch.sh sets WINE_NEW_NDIS=1 (the layer's getifaddrs code); a game's
environment can still set 0.
- The game reported "Steam not detected": the prefix still named Proton's steam.exe (PID 0x20) as Steam's running
client, and here that PID is the program Steam started, which quits after starting the game. launch.sh writes
the PID this tool's own prefixes carry (0xfffe) before Wine starts.
- Its Workshop mod was missing: DroidDeck-Proton's s: drive names the guest path of the Steam library, which this
Wine cannot follow. proton gives the prefix's guest drive links their Android paths for the launch; a session's
start gives them their guest paths back.
* fix(bionic): give each launch its own temporary file for the registry and drive rewrites
* fix(gamescope): only the first finger drives the emulated mouse
In the click touch modes every finger warped the X pointer and any
finger lifting released the click, so a second finger made the pointer
jump between both contacts and dropped whatever the first was dragging.
The first finger of a gesture now owns the emulated mouse until it lifts,
and later fingers are ignored until every finger is up.
* fix(gamescope): motion into the screen edge does not decide the pointer hold
A drawn-cursor game whose X pointer sat at the screen edge looked like it
held the pointer whenever motion pushed outward, which kept the hold on
and turned touch drags into relative motion. The sent motion is clamped
to what the pointer can reach before the comparison.
* fix(gamescope): touch warps do not decide the pointer hold
* fix(gamescope): only touch-down warps are left out of the pointer hold
Touch drags are real pointer motion, so they count toward releasing the
hold again. Only the jump a touch-down makes is skipped.
* test(semaphores): tell a child hung in qemu-user from a guest deadlock
* test(semaphores): calibrate qemu's guest base and end a stuck child on timeout
* fix(desktop): apps built on Qt's web engine start in the desktop and from AppImages
The desktop runs as root, and Qt WebEngine refuses to start as root with its
sandbox on, so Help Center and any other QtWebEngine app exited at once. Flatpaks
already had the sandbox off; the desktop and the AppImage runner now set it the
same way they turn off Firefox's sandboxes.
* fix(desktop): Software Sources and the driver manager open
software-properties-qt imports PyQt6.uic and UbuntuDrivers but does not depend
on the packages that ship them, so both tools died with an ImportError on the
installed-without-recommends desktop. The desktop package list now carries
pyqt6-dev-tools and ubuntu-drivers-common.
## Problem
When Vulkan returns `VK_ERROR_DEVICE_LOST`, the compositor stops
presenting and remains in a terminal state. Shared-memory-backed images
also need to keep receiving fresh pixel data while the renderer is
unavailable.
## Fix
- **Fix:** Keep the shared-memory image backup up to date while Vulkan
is unavailable.
- **Fix:** Preserve incoming pixel updates in CPU memory instead of
relying on stale Vulkan resources.
- **Fix:** Keep the unsafe device-reinitialization path guarded when GPU
work may still be pending.
- **Build:** Add the missing Frame Generation stub for builds without
that feature.
- **Tests:** Cover shared-memory updates during device loss and the
recovery failure path.
The recovery path is best-effort and remains optional; it does not
become a requirement for starting the rest of DroidDeck.
## Info
This hopefully should help in some cases, this fix was found in the
investigation for the bug in pr #3343, idk if it will fix that problem.
But should essentially the last hope for some devices in some cases.
## Testing
- Added regression coverage for shared-memory pixel updates during
device loss.
- Added test stubs for renderer-module cleanup callbacks.
- Full test/build results are tracked by GitHub Actions; device-level
recovery still needs verification on affected hardware.