mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 13:26:02 +00:00
Merge org main c5d7cdc0 (0.6.0+) into the non-Adreno test branch
Conflicts: build.yml takes main's component jobs; the Mali bridge client, Venus GL probe and Xclipse layer build in their own step of the components job (with submodules). vk_present.c keeps main's import list and AHB flag, with the #561 AHB present path still limited to the phone's own driver. TU_DEBUG stays Adreno-only and off under Venus.
This commit is contained in:
commit
379dd900f1
371 files changed
+21595
-1701
No files matched your search
@@ -0,0 +1,59 @@
|
||||
# Native arm64 Steam client: channel and runtime
|
||||
|
||||
The default client is Valve's arm64 Linux build (`steamrtarm64/steam`). Valve does not support it, but
|
||||
publishes it on the Steam Deck client channels. `droiddeck-steam-install` installs it and
|
||||
`droiddeck-session` starts it with `STEAM_RUNTIME=1`.
|
||||
|
||||
## Channel
|
||||
|
||||
- The default is `steamdeck_publicbeta` (manifest `steam_client_steamdeck_publicbeta_linuxarm64`).
|
||||
Valve also publishes `steam_client_steamdeck_stable_linuxarm64`.
|
||||
- `droiddeck-steam-install --channel` prints the channel in use. The session passes that value as
|
||||
`-clientbeta` and writes it to `package/beta`. The two must match, or the client loops on rc 42.
|
||||
- Setting: `BL_STEAM_CHANNEL`, otherwise `~/.config/droiddeck/steam-channel`, set to `beta` or
|
||||
`stable`. A set channel never changes on its own.
|
||||
- With no setting, the client falls back to `steamdeck_stable` automatically. It stays on stable
|
||||
(`package/droiddeck-channel`) until a setting says otherwise. The fallback happens:
|
||||
- when the client was started two more times without being shown after the start-failure repair
|
||||
(`package/droiddeck-unconfirmed`: two unconfirmed starts trigger a repair, which writes
|
||||
`repaired`; two more unconfirmed starts trigger the fallback);
|
||||
- when the beta manifest has no `*_linuxarm64_linuxarm64` component. The install log then lists the
|
||||
manifest's block names, so a renamed or removed arm64 build can be seen.
|
||||
- The x86-64 client keeps `steamdeck_publicbeta` (see [x86-64-steam-client.md](x86-64-steam-client.md)).
|
||||
|
||||
## Steam Runtime container
|
||||
|
||||
Valve's 2026-10-15 beta made the x86 Linux client 64-bit and put it in a Steam Runtime container
|
||||
(pressure-vessel). The container needs unprivileged user and mount namespaces and a D-Bus session bus,
|
||||
which an Android app does not have. The x86-64 path already works around this. The arm64 client gets the
|
||||
same treatment if Valve containerizes it too:
|
||||
|
||||
- `STEAM_STEAMRT_RECURSION_GUARD=1` is exported for both clients. It tells the client that it is
|
||||
already inside its container, so after an update it does not re-execute itself through
|
||||
`pressure-vessel-wrap` (bwrap).
|
||||
- `droiddeck-steamrt-shim <client dir> <shim dir>` builds the shim when the client carries
|
||||
`pv-runtime/steam-runtime-steamrt` or a `steam-runtime-check-requirements` probe:
|
||||
- Valve's runtime is linked file by file;
|
||||
- the probe is replaced with `exit 0`;
|
||||
- its own `steam-runtime-launch-client` runs commands directly.
|
||||
|
||||
For the arm64 client the session then starts it with `STEAM_RUNTIME_STEAMRT` and `PATH` pointing
|
||||
at `~/.droiddeck-steamrt-shim` and logs "Valve containerized the arm64 Steam client". Without those
|
||||
files the shim is not built and the start is unchanged.
|
||||
|
||||
## What Valve's manifests carry (checked 2026-10-22)
|
||||
|
||||
- `steam_client_steamdeck_publicbeta_linuxarm64` (1792626604) and `steam_client_steamdeck_stable_linuxarm64`
|
||||
(1792618285) have the same blocks. Three platforms share them:
|
||||
- `*_linuxarm64_linuxarm64`: the native client (`steamrtarm64/`, `linuxarm64/`). No pressure-vessel, no
|
||||
`steam-runtime-check-requirements`. These are the only platform blocks the installer keeps.
|
||||
- `*_steamrt_linuxarm64`: Valve's x86-64 SteamRT 3c client (`steamrt64/steam` is an x86-64 ELF) with
|
||||
`steamrt64/pv-runtime/steam-runtime-steamrt` (pressure-vessel, `steam-runtime-check-requirements`,
|
||||
`steam-runtime-launch-client`). This is the containerized client the 2026-10-15 beta made the default on
|
||||
x86. Valve ships it to arm64 hosts as well, presumably to run under FEX. The installer skips it.
|
||||
- `bins_androidarm64_linuxarm64`: `androidarm64/libsteamclient.so`, `steamservice.so` and friends.
|
||||
- `steam_client_steamdeck_publicbeta_ubuntu12` has stopped at 1792108788, while stable `ubuntu12` follows
|
||||
stable (1792618285). On beta the 32-bit `ubuntu12` client no longer gets updates.
|
||||
- If a future manifest drops `*_linuxarm64_linuxarm64`, the installer logs the block list and moves to
|
||||
stable. If stable drops it too, the remaining option is the x86-64 client under FEX
|
||||
([x86-64-steam-client.md](x86-64-steam-client.md)).
|
||||
@@ -116,6 +116,10 @@ Numbers in brackets refer to the spec's list of unknowns.
|
||||
several native threads.
|
||||
19. **Network window** is the speed tier's value clamped to 1–128; the per-host cap is
|
||||
`max(6, ceil(window / hosts))`.
|
||||
20. **Pause keeps half-written files**: a stopped run keeps each unfinished stage file as a `.part`
|
||||
file named after the file's path, hash and size, with a `.part.list` of the parts already
|
||||
written. The next run writes only the other parts and hashes the whole file when it is complete;
|
||||
that SHA-1 check still decides whether the file is kept, so files without one start over.
|
||||
|
||||
**Kept at parity (known weak spots)**
|
||||
|
||||
@@ -131,7 +135,7 @@ Numbers in brackets refer to the spec's list of unknowns.
|
||||
- `AdditionalCommandLine` is one argument, frozen at install [11].
|
||||
- Shop search, an unused "wants an exchange code" helper and per-game uninstall work are not
|
||||
ported; DLC stay hidden and are never installed separately; optional (non-language) install tags
|
||||
are never selected; resume restarts a partially written file from zero [15–18].
|
||||
are never selected [15–18].
|
||||
- Library details are fetched one game at a time, as before.
|
||||
|
||||
## What needs device testing
|
||||
|
||||
@@ -52,6 +52,12 @@ environment entries and is intentionally narrower than **Reset game profile**.
|
||||
Values are literal strings, with no shell expansion; quotes are only needed when
|
||||
the consuming program expects them.
|
||||
|
||||
A Unity game under FEX (`UnityPlayer.dll` for Windows builds under Proton,
|
||||
`UnityPlayer.so` or `GameAssembly.so` for native Linux builds started by
|
||||
**Linux x86 (FEX)**) keeps FEX's TSO on when the Default profile's FEX preset
|
||||
turns it off: without TSO such games can deadlock or crash (seen with Megabonk
|
||||
and Crab Game). A FEX preset chosen for the game itself still applies.
|
||||
|
||||
## Defaults and available suggestions
|
||||
|
||||
The initial configuration enables Mesa shader caching with
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# itch.io browsing
|
||||
|
||||
The itch Store tab opens on the front page shelves. A row of chips above them (`ui/ItchBrowseBar.kt`)
|
||||
sets an order (Popular, New, Top rated, Top sellers) and a price (Any, Free, On sale). Leave both at
|
||||
their defaults and the shelves stay; pick anything else and the tab shows that query's games as a grid
|
||||
that loads the next page as it scrolls into view.
|
||||
|
||||
## Data
|
||||
|
||||
`ItchBrowse` (`stores/itch/ItchBrowse.kt`) turns a `BrowseQuery` into itch's listing feed:
|
||||
|
||||
```
|
||||
https://itch.io/games[/<sort>][/<price>][/platform-<name>...][/tag-<slug>...].xml[?page=N]
|
||||
```
|
||||
|
||||
`BrowseQuery` already carries platforms and tags, so the URL builder is complete; the controls for them
|
||||
come in a later change. The path pieces are itch's own, copied from its links: sorts `new-and-popular`, `top-sellers`, `top-rated`,
|
||||
`newest` (Popular has none); prices `free`, `on-sale`, `store` (Paid), `5-dollars-or-less`,
|
||||
`15-dollars-or-less`; platforms `platform-windows`, `-osx`, `-linux`, `-android`, `-ios`, `-web`,
|
||||
`-mobile-web`; a tag is `tag-` and its lowercase name with hyphens. `ItchBrowse.path()` builds the page
|
||||
address, `url()` adds `.xml` and `?page=N`. Every request is logged
|
||||
(`itch.io browse: <url> answered <code> with <n> games`).
|
||||
|
||||
Requests go out one at a time, at least 1.2 s apart. A 429 waits 8 s and tries once more; if that fails
|
||||
the games already on screen stay. Each page is kept under the app cache for three hours, so going back to
|
||||
a query does not ask itch again. Results are parsed by `ItchShelves.parse`, the same reader the shelves
|
||||
use, so a game looks the same wherever it appears.
|
||||
|
||||
`ItchBrowseState` holds the query, the games loaded so far and whether more can be asked for. A newer
|
||||
query bumps a generation counter, so a slow answer for an older one is dropped. A game already in the
|
||||
library replaces its browse copy on the grid, so Install and the owned markers are right; the detail page
|
||||
looks browse results up through `StoresState.detailItem`.
|
||||
|
||||
## When a page fails
|
||||
|
||||
A fetch that throws or answers with a non-2xx status marks the list as failed but leaves it open. The end of the list then shows a Retry button that asks for the same page again. Scrolling does not retry on its own, so a failing page cannot loop. Only a successful page with no new games ends the list.
|
||||
|
||||
## Platform and tag
|
||||
|
||||
The platform and tag rows take several choices, and the address lists them as itch does (`platform-windows/platform-linux/tag-pixel-art/tag-2d`, platforms in the order of the chip row). A typed tag becomes its slug (`Pixel Art` is `pixel-art`) and the address gets `tag-<slug>`.
|
||||
@@ -48,6 +48,15 @@ inherit those routes. Managed shortcuts are replaced; user-created shortcuts and
|
||||
unreadable shortcut files are preserved. Both routes use the existing ARM64 Proton
|
||||
registration.
|
||||
|
||||
## Launcher artwork
|
||||
|
||||
The installed Steam game scan lists each game's `appcache/librarycache/<appid>`
|
||||
directory once for its cover, background, icon and logo. Filename preference is
|
||||
checked before directory preference: the app folder, then hash folders sorted by
|
||||
name. Hash-named fallback icons are still taken only from the app folder in its
|
||||
listing order. The directory snapshot is not kept between scans, so the next
|
||||
scan sees new artwork folders.
|
||||
|
||||
## Validation
|
||||
|
||||
Run `python3 -m unittest discover -s tools/tests -p 'test_*.py'` and Android unit tests.
|
||||
|
||||
@@ -85,18 +85,22 @@ installed record (`StoreInstalls.complete`). Resume, update and repair are the s
|
||||
no cache (needs only the net peak); when even that does not fit the install is refused before any
|
||||
chunk request, naming the storage, the need, the free space and the shortfall.
|
||||
- **Progress**: the bar counts pending-file bytes written (not compressed chunk bytes), at most every
|
||||
50 ms plus once per finished file. The run logs `epic: plan …` and `epic: summary mode=adaptive|narrow
|
||||
50 ms plus once per finished file. A resumed run starts the bar at what earlier runs kept; on a
|
||||
fresh install that includes the files already complete, so the bar carries on from the pause. The run logs `epic: plan …` and `epic: summary mode=adaptive|narrow
|
||||
files=… bytes_written=… avg_mbps=… fetches=… refetches=… peak_cache_mib=… hosts=…`.
|
||||
- **Cancel / pause / failure**: the cancel flag is forwarded within 250 ms; the run stops its
|
||||
requests, joins its threads, removes every unfinished stage file and `.part` cache entry, and only
|
||||
then returns. Swapped files stay; unswapped destinations keep their old content; the chunk cache
|
||||
requests, joins its threads, removes every `.part` cache entry, and only then returns. On a cancel
|
||||
or a download error each unfinished stage file is kept in the staging folder as
|
||||
`<path id>-<sha1>-<size>.part`, with the written parts' offsets in `<same>.part.list`; the next run
|
||||
fetches only the other parts and hashes the whole file once it is complete (a partial that no
|
||||
longer matches the manifest, or whose file has no SHA-1 in it, is deleted). Any other failure removes the unfinished stage files. Swapped files stay; unswapped destinations keep their old content; the chunk cache
|
||||
stays for the next run. Success removes the cache and the staging folder (when only its marker is
|
||||
left).
|
||||
|
||||
The staging folder is recognised by its `owner` marker (`DroidDeck Epic staging v1` + LF). Before
|
||||
the delta pass the run checks that the folder is a real directory at the expected canonical path,
|
||||
that the marker matches and that every other entry is a plain `.stage` file directly inside it; only
|
||||
then are those orphans deleted. Anything unexpected fails the run without deleting. A manifest path
|
||||
that the marker matches and that every other entry is a plain `.stage`, `.part` or `.part.list` file
|
||||
directly inside it; only then are the `.stage` orphans deleted. Anything unexpected fails the run without deleting. A manifest path
|
||||
naming the staging folder, an absolute path or a `..` segment is refused. `.stage` / `.part` files
|
||||
elsewhere in the game folder are never touched.
|
||||
|
||||
|
||||
@@ -23,3 +23,17 @@ Setup shows Primary and Secondary under the theme when Gradient is chosen, each
|
||||
square. It opens `ColorPickerDialog`: a wheel (hue and saturation, touch), hue / saturation /
|
||||
brightness sliders (they work with a controller) and a hex box, with the old and new colour side by
|
||||
side. OK applies it.
|
||||
|
||||
## Inner Gamer theme
|
||||
|
||||
`Themes.INNER_GAMER` is an RGB theme: the accent walks round the colour wheel. It sits just above
|
||||
Gradient in the list, and Setup shows a Speed slider (1 to 10, `SessionPrefs.rgbSpeed`) under the
|
||||
theme while it is chosen.
|
||||
|
||||
`Themes.innerGamer(hue)` builds the palette for one hue through `ThemeColors.palette`, so button text
|
||||
keeps the same contrast along the gradient at every hue. `DroidDeckTheme` runs one
|
||||
`rememberInfiniteTransition` while Inner Gamer is chosen, so the system's animation clock drives it.
|
||||
Compose applies Android's animator scale to it, and the colour holds still when animations are off
|
||||
in the app (`Motion.scale`) or in Android's own settings. The hue is written to `Themes.rgbHue` in 3° steps, which restyles the
|
||||
app only when the colour visibly moves; a slow cycle costs few recompositions.
|
||||
|
||||
@@ -53,7 +53,8 @@ arm64 client down first.
|
||||
("Steam now requires user namespaces") when `steam-runtime-check-requirements`' bwrap probe cannot
|
||||
create a user namespace, which no Android app can. `STEAM_RUNTIME_STEAMRT` points at
|
||||
`steamrt-shim`: Valve's runtime linked file by file with only the probe replaced (`exit 0`). proot
|
||||
is the container, as for the arm64 client.
|
||||
is the container, as for the arm64 client. `droiddeck-steamrt-shim` builds it, and builds the same
|
||||
shim for the arm64 client if that one is containerized too ([arm64-steam-client.md](arm64-steam-client.md)).
|
||||
- **Re-exec after an update.** The client re-executes itself inside the SteamRT container through
|
||||
`pressure-vessel-wrap` (bwrap). `STEAM_STEAMRT_RECURSION_GUARD=1` says it is already inside one; the
|
||||
FEX rootfs with the client's `steamrt64` libraries is that container.
|
||||
@@ -290,13 +291,29 @@ alone would then read as an installed client.
|
||||
|
||||
## Libraries, SD card and sharing between clients
|
||||
|
||||
- **Separate libraries.** With folders shared, each client could update, verify or switch the
|
||||
other's games. A title with a Linux build runs as that in the x86 client and as the Windows build in
|
||||
the arm64 one, so opening it in the other client switched the files and the first client downloaded
|
||||
its version again (Left 4 Dead 2, 8.6 GB). Hard links do not help: switching platform makes Steam
|
||||
download depot 551 anyway. A game wanted in both clients is installed in both. Folders an earlier
|
||||
version shared are taken out of the x86 client's lists (written only while no x86 client runs); the
|
||||
games stay in the arm64 library.
|
||||
- **Shared games.** Before either client starts, `droiddeck-steam-share` gives it a view of the games
|
||||
the other client installed: `~/.droiddeck-x64/shared/arm64` for the x86 client ("ARM64 client
|
||||
games") and `shared/x86-64` for the arm64 one ("x86-64 client games"). A view holds a copy of each
|
||||
finished game's manifest and links to its `common` folder and `compatdata`, so the game shows as
|
||||
installed in both clients, runs from the same files and keeps one prefix and one set of saves.
|
||||
Runtimes, Proton and FEX are not shared. Device: the x86 client listed the 14 arm64 games as
|
||||
installed (13 ready to launch, Valheim fetching its shader cache) and started Stardew Valley from the
|
||||
arm64 files with no game data downloaded; the arm64 client listed Spacewar installed only in the x86
|
||||
client.
|
||||
- **Same build in both.** A title with a Linux build ran as that in the x86 client and as the Windows
|
||||
build in the arm64 one, so opening it in the other client switched the files and the first client
|
||||
downloaded its version again (Left 4 Dead 2, 8.6 GB; hard links do not help, switching platform makes
|
||||
Steam download depot 551 anyway). A shared game gets the tool its own client uses: `droiddeck-fex`
|
||||
there becomes `droiddeck-direct` here and the other way round, a Proton build keeps its Proton. Only
|
||||
an automatic choice that would switch the build is replaced; any other choice, including another
|
||||
Proton, stays.
|
||||
- **Updates and uninstall.** The newer manifest wins: an update made through a view is written back to
|
||||
the client that owns the game. Uninstalling a shared game removes it from that client only; its files
|
||||
stay with the client that installed it (Steam does not delete through the link) and it stays hidden
|
||||
there until that client updates or reinstalls it. A game installed in both clients is each client's
|
||||
own and is not shared. A view with nothing in it is not offered as an install location. Views are
|
||||
written only while no client runs. Shader pre-caching stays each client's own: the x86 client may
|
||||
fetch a shared game's shader cache into its own folder (Valheim, 1.8 GB).
|
||||
- **SD card.** The x86 client's card library is a folder inside the arm64 one (`/mnt/droiddeck-sd/x86-64`,
|
||||
`GameStorage.X64_CARD_DIR`, passed as `BL_X64_STEAM_LIBRARIES`), so the install dialog offers Internal
|
||||
Storage and SD card. compatdata, shadercache and runtime tools stay private, as in the arm64 card
|
||||
@@ -333,9 +350,11 @@ alone would then read as an installed client.
|
||||
redactor learns account names from both clients. The startup movie is staged into the x86 client's
|
||||
config only once its first start has created it; `--prepare` links the arm64 `config/uioverrides`
|
||||
and copies the `StartupMovie` choice.
|
||||
- **Storage page.** It lists both clients' games, the x86 ones labelled; a game can be installed in
|
||||
both and an id left over in several libraries. `steam://uninstall` reaches only the session's client,
|
||||
so the other client's copy is uninstalled after switching clients. Tools in the x86 client's
|
||||
- **Storage page.** It lists both clients' games, the x86 ones labelled, each where its files are, so a
|
||||
shared game is counted once; a game can be installed in both and an id left over in several
|
||||
libraries. The Games page of each client lists the games shared with it. `steam://uninstall`
|
||||
reaches only the session's client, so the other client's own copy is uninstalled after switching
|
||||
clients. Tools in the x86 client's
|
||||
libraries are shown as required (it runs its Linux games with Valve's runtimes). Proton tool files
|
||||
live only in the arm64 root; the x86 client has wrappers. An x86 client without `config.vdf` has
|
||||
never mapped a game.
|
||||
|
||||
Reference in new issue
Block a user