Merge org main 0f839bef into the non-Adreno test branch

Conflicts resolved:
- build.yml: main's proot pack pin check and the Venus component fetch both kept.
- compositor.c: main's unpaced release goes through send_buffer_release (DMA-BUF quarantine).
- PulseAudioComponent: the AAudio retry loop stays; both sinks get main's control_dir.
- SessionService: main's add-on pack and proot checks, then the PowerVR driver setup and staging.
- droiddeck-session: main's stretch and refresh arguments with the selectable backend.
- droiddeck-gpu: main's desktop window mode on the wayland backend; PowerVR's sdl backend stays full screen.
- gamescope/release.env: the non-Adreno build stays pinned until the next one is published.
- FrontEndActivity/FrontEndScreen/SessionActivity/SessionFiles/SessionPrefs/LinuxRuntime/strings: both sides kept.
- test_gamescope_backend: the desktop backend test turns window mode off.
This commit is contained in:
The412Banner committed 2026-10-27 12:25:25 +00:00
commit 941cde30f2
394 files changed
+28009 -3092

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
# Added games
Windows games the user adds to DroidDeck's Games tab, each a non-Steam shortcut in the
Windows games the user adds to DroidDeck's Library, each a non-Steam shortcut in the
Steam client that runs under `droiddeck-proton-arm64`. They show with the Custom chip.
## Adding
+38
View File
@@ -0,0 +1,38 @@
# DD-FG flow resources
DD-FG keeps seven luminance pyramid levels for both input frames. Its performance
preset chooses the finest level at which optical flow is solved:
| Preset | Finest solved level | Allocated flow levels |
|---|---:|---|
| 0 | 1 | 1 through 6 |
| 1 | 2 | 2 through 6 |
| 2 (the app default) | 3 | 3 through 6 |
Only those solved levels need RGBA16F flow images, flow UBOs and flow descriptor
sets. The vectors keep their original level indices; unused entries are null.
The full luminance pyramids, full-resolution expanded flow images, regularization
and synthesis are unchanged.
At the default preset this avoids three flow images, three uniform buffers and
three descriptor sets. The removed image payload is
`8 * (width * height + (width >> 1) * (height >> 1) + (width >> 2) * (height >> 2))`
bytes for dimensions at least four pixels:
| Input size | Removed image payload |
|---|---:|
| 1280 x 720 | 9,676,800 bytes |
| 1920 x 1080 | 21,772,800 bytes |
| 2560 x 1440 | 38,707,200 bytes |
These are pixel payloads, not driver allocation sizes or measured FPS gains.
## Validation
Run `python3 -m unittest discover -s tools/tests -p 'test_ddfg_flow_levels.py'`.
The host test needs a C++17 compiler and system Vulkan headers or an Android NDK
selected through the usual SDK/NDK environment variables. It compiles the actual
DD-FG chain against a mock Vulkan dispatch table and checks resource counts,
dispatch order and sizes, valid descriptor bindings, both models, every preset,
2x/3x/4x generation, small/odd extents, resize and live preset changes.
It does not execute shaders on a GPU or replace on-device validation.
+27
View File
@@ -0,0 +1,27 @@
# Focus transitions
Focusable app controls participate in the shared focus glide. Nearby moves stretch
the outline; jumps over 360 dp collapse it into a ball before expanding at the
destination. Rapid repeats keep the faster outline movement. Disabling animations
places the outline directly at the focused control.
`DroidDeckTheme` supplies the host for standalone Compose interfaces. Custom
controls use `glideBorder` with their focus interaction state. Material controls
use `Modifier.focusGlide(shape)` before their focus target. Match the control's
shape, and keep existing selection borders separate from the focus outline.
Filled primary buttons use `hotFillAlpha = 0f` to preserve label contrast.
Use `GlideDialog`, `GlideAlertDialog`, `GlidePopup`, and `GlideDropdownMenu` for app
windows. Android dialogs and popups have separate views and coordinate spaces;
they need their own host. The wrappers preserve the underlying Material layouts
and keep all controls in each window on the same animation. Dropdown hosts also
handle recreation of the popup view after closing.
Touch dismiss backdrops and controller shortcut hints should have
`canFocus = false`. Controls with a larger touch target can register the visible
shape separately, as the toggle switch and pause/resume orb do. Web content,
Android system UI, and native game input surfaces retain their own focus behavior.
`FocusGlideWindowsTest` checks Material controls, Xbox menu entries, dialog focus
handoffs, and dropdown reopening. `FocusGlideRenderingTest` checks the large-jump
ball animation and outline-only rendering with animations disabled.
+1 -1
View File
@@ -98,7 +98,7 @@ custom components can support a different set of options. Android Wine wrapper,
ALSA-server, Box64 and patched async-DXVK options are identified in the editor as
requiring a different/custom component; custom entries remain allowed. The old
`DXVK_FRAME_RATE` environment variable was removed from current DXVK, so it is
not offered as a suggestion. Prefer the session frame limiter for ordinary play.
not offered as a suggestion. Prefer Steam's Quick Access menu frame limiter for ordinary play.
## Launch path and references
+26
View File
@@ -0,0 +1,26 @@
# itch.io collections
On the Library's itch tab a Collections button in the header lists the collections of the signed-in
itch account. Picking one hides every game that is not in it; the games of the collection that are not
installed show in the existing "Not installed" section, and All brings the full library back. The button
exists only while the itch chip is selected.
## Data
`ItchCollections` (`stores/itch/ItchCollections.kt`) asks itch with the account's API key:
```
GET /profile/collections -> collections[{id, title, games_count}]
GET /collections/<id>/collection-games?page=N -> collection_games[{game{...}}]
```
Pages are read until one comes back empty. Each game goes through `ItchLibrary.item`, the reader the
library and shelves share, so it looks the same everywhere. The selection and the loaded games live in
memory; the list is asked again whenever the itch tab opens. Counts are logged
(`itch.io: <n> collections`, `itch.io: collection <id> has <n> games`).
## Filtering
`collectionEntries` keeps the itch entries whose store key is in the collection, then adds the
collection games the library has no entry for as not installed ones. Their game page resolves through
`StoresState.detailItem`, which also looks at the collection games.
+21
View File
@@ -0,0 +1,21 @@
# itch.io install and version picker
Installing an itch.io game opens a version picker first. It lists the game's uploads from `/games/{id}/uploads`, with the platform, size and date of each.
- Windows builds install. A game with a single Windows build skips the picker and installs at once.
- Other builds (macOS, Android, web) open the game's page on itch.io.
- Linux builds are listed but cannot be installed yet.
## Free games
A free game does not need to be in the library. The game's number is read from the `itch:path` meta tag of its page (`games/<id>`), and both the upload list and the download work with the API key alone and no download key. This was checked against a live free game: the upload list answered 200 and a one-byte range request on the download answered 206.
A game that costs money and has no download key in the library is still refused.
## Pieces
`ItchGame` finds the game number and turns the upload list into builds. `ItchUploads.platforms` reads the platform from the upload's flags or `p_*` traits, and treats an upload with none as Windows. `ItchBuildPicker` is the pop-up. The chosen upload is carried in the item's `extra` as `uploadId`, and `ItchInstaller` downloads that upload.
If the upload the user chose is no longer in the game's list when the install starts, the install fails with "No Windows download for this game" and does not pick another build. Only an install with no chosen upload falls back to the newest Windows build. The saved queue keeps whether a game is free, so an interrupted free-game install resumes after a restart.
Before an install extracts, a leftover partial install of the same game (a folder whose marker said "installing" with this game's ID when the install started) is emptied, so a different build chosen after an interruption never mixes with files from the first. A finished or updating install, or another game's unfinished folder that happens to share the folder name, is never emptied.
+90
View File
@@ -314,3 +314,93 @@ it needs `patches/0014`, enabled with `PROOT_FASTPATH=1`.
and `PROOT_FP_STATS` hit rates for steam, steamwebhelper, wine and wineserver.
- **FEX**, inside Proton as a DLL, translates x86 path syscalls through glibc's `syscall()`, not the
wrappers, so they still trap. A `syscall()` hook could route `openat` and `newfstatat` there too.
## Finding the next fast path
The prototype notes above describe the original experiments. Main now includes the fast path,
expanded wrappers, FEX raw-open routing ([#1283](https://github.com/Droid-Deck/DroidDeck/pull/1283)),
and SD-library bind-name resolution ([#1331](https://github.com/Droid-Deck/DroidDeck/pull/1331)).
Those fixes show why wrapper hit rates alone are insufficient: a caller can bypass the wrappers,
or repeatedly hit a path the wrappers cannot resolve.
### Opt-in tracer profiling
With **Setup > Diagnostics > Debugging tools** enabled, queue profiling for one session:
```sh
tools/droiddeckctl proot-profile enable --slow-us 1000
tools/droiddeckctl start steam --wait
# Reproduce the startup, game load, or streaming workload.
tools/droiddeckctl stop
tools/droiddeckctl logs latest ./profile-run
tools/droiddeckctl proot-profile report ./profile-run/session.log --sort wall
# Also inspect --sort cpu and --sort calls.
```
`PROOT_PROFILE=1` is forwarded from the session environment to the host tracer. Patch 0018 records
entry/exit **handler visits**, including PRoot's chained calls, by portable syscall name. It emits
`proot-profile` JSON lines to the existing `session.log`: cumulative totals every five seconds while
handling calls, totals at normal exit, and up to 32 slow-handler samples per five-second window exceeding `PROOT_PROFILE_SLOW_US`
(default 1,000 microseconds). The report uses each counter's last snapshot rather than adding
snapshots together and retains the most recent 128 slow samples. Logs can be pulled and reported while the session is running; final totals can
be lost if the tracer is killed. An empty report (`hasCounters: false`) is not evidence of zero
PRoot cost: check for the `start` record and that the installed PRoot pack contains patch 0018.
**What the clocks mean:** handler wall time includes PRoot's path translation, filesystem waits
inside the tracer, and time the tracer is descheduled inside the handler. Thread CPU time measures
CPU used by that handler. Neither clock includes the tracee's subsequent kernel syscall, the
wake-up/queue delay before handler entry, or work outside `translate_syscall` (such as standalone
SIGSYS emulation, signal delivery, and process-event handling). Fast-path calls that avoid PRoot
are absent. Counts are handler visits, not a count of all guest syscalls. No extra ptrace stops or
syscall-exit interception are enabled for profiling. Profiling still costs clock reads, counters,
and log output; turn it off for final performance measurements.
Rank cumulative time and frequency before chasing individual outliers. High handler CPU suggests
translation work; high handler wall with low CPU suggests filesystem or scheduling waits. Neither
proves how much a new fast path would save. Reproduce with the same app/PRoot/library build,
workload, storage, CPU policy, and cache state, then alternate A/B runs and measure the real load
milestone without profiling too. Keep `PROOT_FP_OFF=1` runs for correctness comparisons.
For path context, the existing `PROOT_FP_LOG=/tmp/fastpath-misses.log` logs wrapper fallbacks and
`PROOT_FP_STATS=1` prints per-process hit/miss counts at normal exit. These are separate opt-ins:
miss logging writes on every fallback, may contain personal paths, and cannot see callers that
bypass the wrappers. Capture it separately from the session artifact folder. The new profiler
records syscall names, numeric IDs, and timings without paths or arguments.
### Test a replacement library without rebuilding the APK
Build a **glibc ARM64** library using the same toolchain as the shipped fast path:
```sh
docker run --rm --platform linux/amd64 --user "$(id -u):$(id -g)" \
-v "$PWD:/src" -w /src droiddeck-local-cross:24.04-v3 \
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -pthread \
-o /src/libblfastpath.so tools/proot/fastpath/fastpath.c -ldl
tools/droiddeckctl stop
tools/droiddeckctl override libblfastpath.so ./libblfastpath.so
tools/droiddeckctl proot-profile enable
tools/droiddeckctl start steam --wait
```
The existing override bridge now recognizes `libblfastpath.so`: it checks ELF class, endianness,
type, and machine, reports SHA-256, and selects that file in `/etc/ld.so.preload` for one session.
It rejects installation while a session is active. This is an architecture check, not validation
of libc compatibility or the library's behavior. The fast path still requires its normal enabled
setting and the patched PRoot pack. Its basename stays `libblfastpath.so`, so `libblsession`'s FEX
routing finds it. Guest-command restaging retains the active selection. After stopping, the next
session stages the bundled preload again; `env clear all` cancels queued overrides.
This replaces a library **for a fresh session**. It does not rebind already-resolved symbols in
running Wine/FEX processes, unload old code, or load arbitrary plug-ins through a new ABI. True
in-process patching would need an explicit dispatch API and synchronization across every process.
[The dynamic loader](https://man7.org/linux/man-pages/man3/dlopen.3.html) resolves symbols within each process.
For now, restarting the session avoids those lifetime and binding problems while removing APK
build/install time from a fast-path iteration. Changes to the trampoline/filter contract still
require a matching PRoot build, not just a library swap. The profiler itself also needs a new
PRoot pack; CI builds and pins that pack alongside the APK.
The next useful extensions are bounded path sampling tied to handler time, separate process/signal
stop counters, and scenario reports that compare the same game-load milestone across builds.
Keep candidate fast paths behind equivalence tests: a slow symlink, `/proc` lookup, unsupported
flag, or ambiguous bind must retain PRoot's semantics.
+1 -1
View File
@@ -227,7 +227,7 @@ flag for an experiment.
Device check (Thor): Alan Wake's American Nightmare with its 1280x720 Game Resolution runs on `:1`
at 1280x720 with no `--force-windows-fullscreen` in the session, 2 frame-size changes, no crash
in logcat. The Games tab and the drawer render without the switch.
in logcat. The Library and the drawer render without the switch.
## Steam picture position
+38 -9
View File
@@ -3,6 +3,21 @@
How the Stores section (`app/src/main/java/com/droiddeck/launcher/stores/`, `ui/Stores*.kt`) fits
the rest of the app, and the on-disk contract that makes a store game an ordinary added game.
## Library and Stores
The rail's Library (`ui/LibraryPage.kt`, rail key `games`) lists every owned game: installed ones
from the scanned library (`FrontEndState.steamGames`: Steam, added folders, store installs), then,
under Not installed, each signed-in store's `StoresState.library` products that are not. An
installed game claims its product by `"<source>:<storeId>" == CatalogItem.key`, so nothing shows
twice. Stores is only for getting games: a store opens on its storefront (search, then the shelves)
under a profile strip whose "Owned games in Library" opens the Library filtered to that store. The
Epic Games Launcher (open, settings, uninstall, install) lives in Epic's profile strip.
Every game opens one page (`ui/GameDetail.kt`) from either place: the hero and its actions by state
(installed, downloading, failed, unfinished, owned, not owned), then tabs LB/RB cycle through:
About, Achievements, Launch, Saves & cloud and Install, each hidden when it has nothing to show.
Library pages are `app:<appId>` for an installed game and `app:<store>:<id>` for a store product.
## Where a store game lives
```
@@ -14,9 +29,11 @@ the rest of the app, and the on-disk contract that makes a store game an ordinar
```
The default root is the app's internal storage - the runtime's tree, `/root/Games/Stores`, no bind
needed - whatever the session's Game storage setting says. When a card the app may write is in the
device (`GameStorage.options`), Install asks "Install to" (internal / the card, free space shown;
the last pick is only the dialog's default). A card's root is `<card app folder>/Games`; when the
needed - whatever the session's Game storage setting says. **Setup > Storage > Default storage**
can send new installs straight to internal storage or the first external target; with **Ask every
time**, Install asks "Install to" when more than one target exists (internal / the card, free space
shown; the last pick is only the dialog's default). An existing install is always resumed in place,
and changing the default does not move it. A card's root is `<card app folder>/Games`; when the
card is the Steam library the library's bind (`/mnt/droiddeck-sd`) already covers it, otherwise
`SessionService` binds the root at `/mnt/droiddeck-stores/<volume uuid>`, so a shortcut's guest
path - and its appid - is the same from one session to the next. Every root is
@@ -180,8 +197,8 @@ The appid Steam derives (CRC32 of the quoted exe plus the name, high bit set) is
listing carries, so the live add and the writer never disagree. Uninstall removes the folder and the
listing drops the entry; the live client is asked to remove it too.
`Library.SteamGame.source` is `steam`, `gog`, `epic`, `amazon` or `added`; the Games tab shows it as
a chip on every row and in the hero.
`Library.SteamGame.source` is `steam`, `gog`, `epic`, `amazon` or `added`; the Library shows it as
a chip on every tile and in the hero, and filters by it.
## Launch
@@ -194,7 +211,7 @@ game that needs arguments or environment gets `.droiddeck-launch.bat` (`StoreLau
the variable it read the code into is cleared on that same line, so nothing of it is left in the
game's environment. A launcher from an earlier build is rewritten before the next Epic launch.
The code is minted for every launch, wherever it starts. The Games tab and Stores call
The code is minted for every launch, wherever it starts. The game page calls
`StoreLaunch.prepare` before they launch; the compat tool (`droiddeck-proton`,
`droiddeck-proton-wrap`) runs `droiddeck-store-launch` before Proton on every real launch, the Steam
client's Play button included. It finds the store launcher among Steam's arguments, reads the
@@ -202,7 +219,7 @@ sidecar beside it, and for an Epic game asks the app through `<session>/stores/r
(`StoreLaunchRequests` → `StoreLaunch.epicCode`), waiting up to 5 s; the app writes the code into
the game's folder itself. Each attempt logs `epic launch id=… code=yes|no reason=…`, never the code.
An Epic game's launch choices are the Epic card in the Games tab's launch settings - "Epic sign-in
An Epic game's launch choices are the Epic card in its page's Launch tab - "Epic sign-in
(EOS)" (on) and "Launch offline" (off), stored in the sidecar's `epic` block so both launch paths
read the same thing - and "Resolve Epic sign-in", which opens Epic's account page behind its
sign-in in Android's browser.
@@ -253,7 +270,20 @@ the prefix's user folder appears, within a minute. Every path logs
`CloudSaveFolder`, e.g. `{AppData}/Game/Saved/SaveGames`. `CloudSavePaths` expands it inside the
game's prefix (`compatdata/<shortcut appid>/pfx/drive_c/users/steamuser`) or its install folder,
case-insensitively, and refuses a path that leaves its boundary. A game whose store gives none
has no cloud saves.
has no cloud saves; a cached none is retried after a day.
- **Galaxy SDK saves:** `cloudStorage.enabled` with an empty `locations` list is Galaxy SDK
IStorage, whose objects live under a location named `__default` in
`%LocalAppData%/GOG.com/Galaxy/Applications/<clientId>/Storage/Shared/Files`. It goes through the
same location-qualified handling below. GET peels gzip when `Content-Encoding` is gzip, or when
the object round-trips as GOG's PUT gzip (deflate 6, mtime 0); a gzip-format save is left intact.
- **GOG names are location-qualified:** the cloud API lists `saves/user1.dat`, where `saves` is the
`name` of the selected `cloudStorage.locations` entry and the folder is that entry's `location`
(`.../Hollow Knight Silksong/default`). `GogCloud` strips the location segment for the local path
and puts it back for `HEAD`/`GET`/`PUT`; files from other locations are ignored. Builds before
this wrote `<location>/...` one folder too deep (`default/saves/user1.dat`); `migrateGogNested`
moves those copies up, deletes byte-identical leftovers and rewrites their baseline keys. The
migration runs once per game (`cloud_layout_<id>`), so a game that legitimately keeps a folder
named like the location is not relocated again; a non-prefixed listing is left unchanged.
- **The services:** GOG `cloudstorage.gog.com/v1/<user>/<client>` with a token issued to the game's
own client (the client secret is kept at install; the Galaxy token is the fallback); Epic's
savesync data storage with signed read and write links (`EpicCloud` → `EpicSaveSync` → the Rust
@@ -293,7 +323,6 @@ report "the store engine is not available".
| Setting | Pref | Where |
|---|---|---|
| Show Stores in the rail | `SessionPrefs.gameStoresEnabled` (off) | Setup › Stores |
| Open a store on: Library · Store | `SessionPrefs.storesOpenTab` (library) | the chip row's cog, Setup › Stores |
| Download speed tier | `SessionPrefs.gameStoresSpeedTier` (fast) | the cog, Setup › Stores, Downloads |
| Downloads at a time | `SessionPrefs.gameStoresParallel` (1) | Downloads |
| Install to (last pick, dialog default only) | `SessionPrefs.storesInstallTarget` | the Install dialog |
+7 -6
View File
@@ -3,7 +3,7 @@
Valve's x86-64 Linux Steam client, run unchanged under FEX beside the default arm64 client. It is
opt-in: Steam settings, **Steam client: x86-64** (`steamClientArch`, passed to the
session as `BL_STEAM_CLIENT_ARCH=x86_64`, applies from the next session), or the desktop menu entry
**Steam x86-64 (FEX, experimental)**. The Games tab lists the active client's games and tags its
**Steam x86-64 (FEX, experimental)**. The Library lists the active client's games and tags its
header "x86-64" while that client's list is shown. This page records why each workaround exists and what was seen
on devices. The timeline is in `docs/progress-log.md`.
@@ -210,16 +210,17 @@ alone would then read as an installed client.
build fails when a program in the package needs a library that is neither bundled nor listed in
`tools/fex/runtime-libs.txt`). They were built and published in The412Banner/DroidDeck; up to r3 their tags point at that
repository's `main`, from r4 at the commit each was built from. Later builds are versions on the single
`fex` release; `fex-2610-r5` stays published as the build `droiddeck-steam-x64` pins.
`fex` release; `fex-2610-r5` stays published as the build `droiddeck-fex-update` pins.
- **Where the app gets it.** The app downloads FEX from Droid-Deck/DroidDeck-Components, where nothing is
uploaded by hand. The app follows its `fex.json`: while the x86-64 client is selected it reads it from
Components' `main` (directly, at most every ten minutes) and keeps the last copy, and a session passes
that build to `droiddeck-steam-x64` (`BL_FEX_TAG`, `BL_FEX_SHA256`, `BL_FEX_URLS` with the download
uploaded by hand. The app follows its `fex.json`: it reads it from
Components' `main` (directly, at most every ten minutes) and keeps the last copy, and every session passes
that build to `droiddeck-fex-update` (`BL_FEX_TAG`, `BL_FEX_SHA256`, `BL_FEX_URLS` with the download
source's mirrors). The script installs a build only after its archive matches the sha256 and every
program in it loads (`ld-linux --list`); the files it replaces are kept aside until the installed copy
loads too and put back otherwise, and the tag is written last. Otherwise it keeps the installed one while that still loads,
then falls back to `FEX_TAG`/`FEX_SHA256` built in, which stay the first-start default when no copy
of `fex.json` has been read. Publishing a FEX build therefore takes a Components run only; a
of `fex.json` has been read. Components' `watch-fex.yml` starts that run by itself every six hours once FEX-Emu
tags a release or `tools/fex` changes on `main`. Publishing a FEX build therefore takes a Components run only; a
replaced archive cannot be pointed back to, so undoing a build means building an earlier ref. The rootfs is
FEX-Emu's own image, unmodified: `fex-rootfs.json` there names its rootfs.fex-emu.gg link, sha256 and
size, and `mirror-upstream.yml` fetches it into the catalog's release only when both match. A newer