mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-02 20:21:59 -05:00
main
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5cd6fe8864 |
feat(session): run the session outside Android's child-process count (#3338)
* docs: research Android's child-process limit without developer options * docs: confirm the child-process gaps on the Thor * feat(session): start long-lived daemons in uncounted worker processes * feat(nativeguest): hand long-lived programs to uncounted worker processes * test(session): run the session bus block with dd_spawn * test(nativeguest): cover the exec handoff's wait and kill * feat(session): run the session root, its jobs and the gamescope chain outside the child-process count * feat(setup): the child-process limit no longer blocks Steam while the session runs in workers * feat(audio): run PulseAudio outside the child-process count * feat(nativeguest): hand off posix_spawn children and keep handed-off daemons alive * fix(nativeguest): let Steam end a handed-off game and keep process-group signals * perf(session): exec a worker as soon as its reply is in and keep two bound ahead; fix review findings * fix(nativeguest): address review findings in handoff waits, signals and spawn errors * fix(session): commit each worker launch explicitly and keep workers with the session that asked * fix(session): let a worker wait for its launch commit on the main thread * fix(session): confirm handoffs, honour wait selectors and stop spawns at teardown * fix(session): one owner per handoff exit, worker launch answers and spawn edge cases * fix(session): send a working directory outside the program's root by its real path * fix(session): recheck a taken exit's child and commit a launch only on a whole go line * fix(session): three-step launch, tagged exit reports and lock-free popen and system children * test(native): popen test shell is static, as the other hook fixtures * test(native): run the popen test program with a clean environment * test(native): skip the popen test where a spawn child cannot exec aarch64 * fix(session): confirm the hook before the worker runs, prefer a late report and free a reused pid * fix(session): tell a reused pid's old entry by start time, not the reaped flag * fix(session): silent failed launches, bounded spawn requests and held check-gone writes * test(native): check the unlisted child's status only where a child can exec aarch64 * fix(session): every exit-only waitid goes through the handoff wait * fix(handoff): exact waitid events, safe exit timer, bounded request receipt * feat(handoff): hand off shell children near Android's process limit * fix(agent): tag handed-off game windows outside the reaper * fix(handoff): a handed-off program's getppid() is its forking process * fix(handoff): exact waitid selection, kept Steam and pipe readers, held reports * fix(handoff): getppid() gives init for an exited or replaced parent * fix(handoff): keep __WALL waitid calls on the handoff path * test(handoff): require a zombie parent in the unreaped-parent case * fix(handoff): honor __WNOTHREAD and check every argument for Steam * fix(handoff): stop waiting on a held entry once its parent has exited * fix(handoff): __WNOTHREAD on waits for a pid, flags on every shim reap * fix(handoff): keep the forking thread of each child in the parent * fix(handoff): a wait that finds no child rechecks live handoffs * fix(handoff): keep a child's forking thread until its end is taken * fix(handoff): the thread selector applies to claims in progress too * fix(handoff): controlling-terminal check via /dev/tty, owned records only * fix(handoff): a child whose forking thread ended is any thread's * fix(handoff): a parent /proc cannot read is checked with kill(), then given up * fix(handoff): one-word fork records, changed only by compare-and-swap * fix(handoff): watch the forking parent through a pidfd opened at start * fix(handoff): fork records by pid, a gone thread's children go to the main one * fix(handoff): keep the parent pidfd through dup2 and check it before use * fix(handoff): no handoff without fork records, unknown thread state keeps the owner * fix(handoff): undo a pidfd move when dup fails, recheck it after the poll * fix(handoff): fresh fork records in a forked child, heir is the first live thread * fix(handoff): one lock over a pidfd move, its dup and the undo * fix(handoff): liveness check under the pidfd lock, forget only a reaped pid's record * fix(handoff): lock only dups onto the pidfd, with signals blocked * fix(handoff): fork record generations, no pidfd restore after a failed move * fix(handoff): every dup in a pidfd process locks, fork prep blocks signals * test(semaphores): tell a child hung in qemu-user from a guest deadlock * fix(handoff): fork records matched by the child's start time, never removed * test(semaphores): count only reaped children, only futex waits as emulator stalls * fix(handoff): a known-start bit in fork records * fix(handoff): dup bookkeeping before the pidfd lock, newer fork records kept * fix(handoff): a fork record stays only for the pid's current process * fix(handoff): keep a pending child's fork record when an older fork records late * fix(handoff): an unknown-start fork record never replaces a pending one * fix(handoff): self-recorded forks, ELF and wait option checks, both nofile limits * test(handoff): find the module in the namespace run under discover too * fix(handoff): a spare parent pidfd made at start, so a dup2 onto it makes no fd * test(handoff): require ENOEXEC for an ELF stub; skip the namespace run without binfmt * fix(hook): change the kept fd list under a sequence lock; readers take a copy * fix(handoff): one report per handed-off child; stops keep a claim; nested waits keep their selector * fix(hook): a table made at runtime outlives closes begun before it; unknown-start fork records kept * fix(handoff): waits look before they reap, so a handed-off fork's child is never reported * fix(hook): settle waits out earlier epochs; unknown-start fork records kept for any handoff under way * fix(handoff): generation-checked reap marks, stops taken as stops, close counts reset in a fork * fix(handoff): one given-up table at most, whole stop codes and rusage, WNOWAIT exits rechecked * fix(handoff): requests name their session; stops of handed-off programs reported; cancellable look * fix(handoff): table setup not cancellable; test spawner never runs what it cannot end * fix(handoff): job-control jobs stay counted; unnamed requests refused; cancel-safe setup * docs(phantom): job-control jobs stay counted; listed programs report no stops * fix(handoff): a listed program a shell runs as a job-control job stays counted * refactor(hook): kept descriptors in their own part, a handoff matched by another program The descriptors close(), close_range() and closefrom() leave open move from privileged.c to hook/kept.c (unchanged), so the bionic runtime's exec shim can build the handoff with them. ddh_try_as() matches DD_HANDOFF against one program and sends another: the bionic shim sends "/system/bin/linker64 PROGRAM ARGS" and lists it by PROGRAM. ddh_try() is ddh_try_as() with both the same. * feat(bionic): hand the bionic runtime's Wine programs to the app's workers The glibc session's hook never sees DroidDeck-Bionic's processes (Wine on Android's libc), so a bionic game's Wine programs all stayed counted under the worker running the tool's launch.sh. The handoff is now built into the runtime's exec shim (tools/bionic-runtime/handoff.c, part of libexecshim.so): - hook/handoff.c and hook/kept.c with what the native hook's other parts do around them: fork(), close(), close_range(), dup2(), dup3(), and exit() for the on_exit() bionic lacks - bionic's execv(), execvp(), execl*() reach the execve system call inside libc, past execshim's execve(); Wine starts its preloader with execv(), so the shim defines them on top of its execve() - a linker64 start is listed by its program - the app starts a handed-off program from the glibc root's bash, which cannot load the runtime's LD_PRELOAD/LD_LIBRARY_PATH: they go as arguments of /system/bin/env, which puts them back for the program - launch.sh keeps DD_SPAWN, DD_SPAWN_SESSION, DD_HANDOFF*, DDH_* and DDNATV_ROOT, and its /proc/N/environ reads no longer print "Permission denied" for idle workers (2>/dev/null before the redirect) Pocket FIT, DroidDeck-Bionic 14.1-r67 with this shim and launcher, handoff on: counted during Brawlhalla 25 -> 17, DiRT Showdown 24-27 -> 16, whole run 28 -> 19-20; with Android's limit on no DroidDeck process and no other app's process was killed (before: Discord, BatteryLog helpers); DiRT 75 fps either way. docs/phantom-processes.md: "The bionic runtime". * fix(bionic): hand off only starts that would succeed here; bionic's execvp fallbacks Review follow-ups on the bionic runtime's handoff (tools/bionic-runtime/handoff.c): - A start is handed to a worker only when it would get past execve() in this process: the file is a regular executable outside the app's data (Android refuses execve() there), and for a linker64 start the program it loads is a readable regular file. A start that failed in the worker failed where the caller could not see it, so Wine never tried its next candidate. The hook's own check looked at /system/bin/env, not the program. - A start whose argv[0] is not its file stays here: env starts FILE with FILE as argv[0]. linker64 and interpreter starts are unaffected (their argv[0] is the file). An empty argv stays here too. - Nothing is built for the handoff without DD_SPAWN and DD_HANDOFF. - execvp()/execvpe()/execlp() follow bionic's: an unset PATH is libc's default, an empty PATH or entry is the current directory, and a file the kernel cannot start (ENOEXEC) runs under /system/bin/sh. - close_range() refuses first > last and unknown flags before it splits the range or unshares the table. - The debug line reads the table's owner only once the table is seen published. * fix(bionic): hand off app-data starts only where SELinux lets them run; bare names stay here Follow-up to |
||
|
|
9ca6fa064e |
fix(bionic): the WSI layer uses its normal bypass check, and zero-copy fallbacks log their reason (#3487)
The Bionic launcher no longer forces the WSI layer's XWayland bypass; the layer runs its normal eligibility check, cached for 100 ms. The compositor logs, rate-limited, why a frame or layer candidate leaves the zero-copy path: no registered gralloc buffer, a failed direct present, or a rejected candidate draw. Tested on a 60 Hz Adreno handheld with the forced bypass on and off and with two driver versions: every run stayed on the zero-copy path at about 60 fps. |
||
|
|
b09e2f9ba7 |
fix(bionic): pack GStreamer's debug plugin, so game videos play (#3294)
winegstreamer puts a capssetter, from the debug plugin, at the front of every video stream's conversion chain. Wine creates it by name at run time, so check-needed.py, which follows linked libraries, could not catch the missing plugin, and those videos played nothing on Bionic. |
||
|
|
1a22d2a1be |
feat(bionic): build DroidDeck-Bionic on the DroidDeck-Proton 11-14.1 Wine layer (#3389)
The tool still packed the 12.8 layer (v16-unwind). The v18 layer is the build of DroidDeck-Proton 11-14.1 Bannerlator ships: Valve Wine a47c73f52fd7, the GE-Proton11-14 picks, and the ARM64EC code-map and unwind fixes 12.8 carried. Same layout as 12.8 (three more files), so only the pin changes. Tools are named DroidDeck-Bionic-14.1-rN; the app's version compare offers 14.1 over 12.8. |
||
|
|
ecaec5da01 |
fix(bionic): run games from a DroidDeck-Proton prefix that start through a launcher (#3336)
* 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 |
||
|
|
2dc74f7574 | fix(bionic): DroidDeck's DirectAudio settings, the microphone among them, reach Bionic Wine's audio driver (#3277) | ||
|
|
9e6f81540f |
feat(bionic): DroidDeck-Bionic compatibility tool (Wine on Android's libc, no proot) (#3037)
DroidDeck-Bionic: a Steam compatibility tool that runs the game itself on Android's libc (bionic) instead of glibc inside proot. Steam, the stores and the session stay on DroidDeck's Linux side; only the game process leaves proot. - Listed in the Proton list only when Run without proot is on, in its own row. Its builds are pre-releases on Droid-Deck/DroidDeck-Proton (DroidDeck-Bionic-12.8-rNN, runtime built by .github/workflows/build-bionic-runtime.yml from tools/bionic-runtime); the app installs and updates them like the other extra tools and never makes one the default unless the user picks it. - With proot on, a launch sent to a bionic tool goes to the newest DroidDeck-Proton (picks stay as set). - ProtonExtras / ProtonMenu / ExperimentalProtons / droiddeck-proton-extra: bionic pre-releases checked and listed only without proot; updates carry the default and per-game picks over; deleting a tool never follows links out of it. ProtonDefault: picks left on an older bionic build move to the installed one. - Components: FEX builds for bionic (bionic-stable on DroidDeck-Components); each tool is offered only the FEX builds that fit it. - Session logs: the bionic game log and its graphics logs are part of Share logs. Synced with main twice before the merge (latest sync |