Commit Graph
912 Commits
Author SHA1 Message Date
MaxsTechReview d967dd03a3 fix(desktop): Electron and Chromium apps start however they are launched (#3106)
* fix(desktop): Electron and Chromium apps start however they are launched

The session preload only added --no-sandbox when the program path itself
sat beside chrome-sandbox, so a PATH link such as /usr/bin/vesktop was
missed and the app aborted on the setuid sandbox. It now resolves the
path and also checks the parent folder, and adds --ozone-platform=x11
when an X display is set, since Wayland cannot open the GPU stand-in.

The desktop menu overrides that added the same flags are removed: they
covered only menu launches made after the desktop started, and the
preload now covers every launch. Stale overrides are cleaned up by the
existing marker check.

* fix(preload): execvp checks the program found on PATH for the Chromium flags

* fix(preload): the PATH lookup prefers the program execvp would run
2026-11-23 21:23:56 -05:00
MaxsTechReview 366afa6b73 fix(desktop): an arm64 AppImage started directly runs like one opened from the file manager (#3108)
* fix(desktop): an arm64 AppImage started directly runs like one opened from the file manager

Without proot a guest program starts through the dynamic loader, which
refuses the nonzero ABI version byte that marks every type 2 AppImage,
so running an arm64 AppImage from a terminal or from a menu entry that
names the image failed with "ELF file ABI version invalid". The preload
already hands foreign programs to droiddeck-open; AppImages now go there
too, where they are unpacked and started as the file manager does.

* fix(desktop): hand off only AppImages that carry a filesystem, never a bare runtime
2026-11-23 21:17:17 -05:00
MaxsTechReview 5cb8e7fdf3 fix(hook): /dev/fd in a forked process names that process's own descriptors (#3105)
* fix(hook): /dev/fd in a forked process names that process's own descriptors

The /dev/fd and /dev/std* binds point at /proc/self/fd. Their sources were
resolved with realpath when the binds were loaded, which turned /proc/self
into the loading process's pid. A child that forks without exec, such as a
bash subshell running cat < <(...), then opened its parent's descriptors
and failed with ENOENT. Sources under /proc keep their own path.

* fix(hook): keep canonical bind sources for /proc paths that name no process

* fix(hook): only /proc bind sources that name a process keep their form
2026-11-23 21:17:13 -05:00
MaxsTechReview 8ee80aa20f fix(appimage): arm64 programs use the session's GL libraries over bundled copies (#3103) 2026-11-23 20:02:13 -05:00
MaxsTechReview 78f942313d fix(fex): x86 programs no longer see the host's arm64 preload libraries (#3098)
* fix(fex): x86 programs no longer see the host's arm64 preload libraries

* test(fex): build the x86 preload fixtures with an x86-64 compiler
2026-11-23 20:02:08 -05:00
MaxsTechReview 8576652fb6 fix(fex): thunk libOpenGL with the host GL library (#3099)
* fix(fex): x86 programs that use libOpenGL load again

* fix(fex): thunk libOpenGL with the host GL library
2026-11-23 19:09:23 -05:00
MaxsTechReviewandmaxjivi05 f539660650 fix(nativeguest): keep parent lookups inside the guest root (#3094)
* fix(nativeguest): keep the parent of the guest root inside the rootfs

* fix(nativeguest): keep every .. walk inside the guest root and its mounts

Absolute paths that climb above /, relative paths from the working
directory or any descriptor, and paths that climb out of a mount were
resolved by the kernel from the rootfs folder or the mount's real place,
so /.., chdir("..") from / and fstatat(fd, "../..") listed the app's
files folder. The walk is now resolved in the guest's view first.

* fix(nativeguest): .. from a linked mount ancestor follows the real directory

---------

Co-authored-by: maxjivi05 <6025299+maxjivi05@users.noreply.github.com>
2026-11-23 18:55:37 -05:00
MaxsTechReview ba3f840b8d fix(fex): x86 programs reach Unix sockets inside the rootfs (#3097)
* fix(fex): x86 programs reach Unix sockets inside the rootfs

* fix(nativeguest): bind uses only the socket path length the caller gives
2026-11-23 18:48:52 -05:00
MaxsTechReview ec31c9e2b6 fix(nativeguest): load glibc locales and iconv modules without proot (#3096)
* fix(nativeguest): load glibc locales and iconv modules without proot

glibc opens its locale files and gconv modules with its own internal
open(), which the hook never sees, so every program ran in the C locale
and iconv knew only built-in charsets: Qt warned it could not switch to
UTF-8, setlocale() failed for C.UTF-8 and the app's language, and
iconv -t latin1 was unsupported. The hook now points LOCPATH and
GCONV_PATH at the rootfs; droiddeck-fex keeps x86 guests on their own
gconv modules.

* test(nativeguest): the locale default test ignores the developer's own paths
2026-11-23 18:36:48 -05:00
Kurt Himebauch 59e98afae7 feat(onboarding): background first-run downloads, one setup card, no wait for Steam (#3091)
* feat(onboarding): one setup card, Steam client and Proton downloaded in the background, no component toast

* feat(onboarding): an optional Bluetooth controllers row in the setup card asks for the permission up front

* feat(onboarding): prefetch Steam's whole package cache, one foreground notification, child-process setup while downloads run

* test(steam): the cache pass keeps packages under Steam's names and is not repeated

* feat(onboarding): unpack the whole Steam client ahead of time and record it as installed, downloads no longer wait for a cool device

* feat(onboarding): setup progress on the Steam home page, Bluetooth asked only from the setup card, Steam unpacks its own files

* fix(onboarding): review fixes: removal does not report setup progress, cancel stops the whole prefetch, cache files are verified, no resume toast

* fix(onboarding): a cancelled prefetch is never a setup failure

* fix(onboarding): the Steam fact is updated atomically

* feat(onboarding): Bluetooth controllers moves into the Steam integration list
2026-11-23 17:31:24 -05:00
Kurt Himebauch 15b1e196af fix(remote-play): the decoder reports a changed stream size, so fullscreen streams are not cropped to a corner (#3095)
* fix(remote-play): the decoder reports a changed stream size, so fullscreen streams are not cropped to a corner

* fix(remote-play): capture buffers are sized for large streams up front and a size change reopens only the app decoder

* fix(remote-play): reject out-of-range scaling deltas and an SPS that ends before its frame flag
2026-11-23 17:31:13 -05:00
MaxsTechReview b0a8c0898e ci: keep unit-test scratch out of the runner's shared /tmp (#3083)
* ci: keep unit-test scratch out of the runner's shared /tmp

Test JVMs now write temp files under the test task's build folder,
which checkout wipes on every job, so a killed run no longer leaves
Robolectric and JUnit folders behind in /tmp.

Self-hosted runners also clear stale test folders they own in /tmp,
drop the regenerable Gradle build cache when the workspace has under
20 GB free, and log disk use so a full disk is visible in the job.

* test(agent): size check no longer depends on the temp path's length

A symlink's own size is the length of its target path, so the old
100-byte bound failed once the temp dir moved under the build folder.

* ci: never remove a mount point while clearing runner scratch

* ci: keep a scratch folder that anything inside it touched recently

* ci: keep a scratch folder the freshness scan could not read
2026-11-23 15:24:05 -05:00
Kurt Himebauch e3b1b60914 feat(steam): first-run defaults for big art and the bouncing logo screensaver (#3087)
* feat(steam): first-run defaults for big art on Library home and the bouncing logo screensaver

* fix(steam): seeded keys land in the root store when nested stores close on its last line
2026-11-23 14:16:51 -05:00
Kurt Himebauch db80e7592a tools: quick_deploy skips lint vital (#3085) 2026-11-23 13:34:27 -05:00
MaxsTechReview 823f70320f fix(nativeguest): x86-64 path calls, SIGSYS handlers and re-execs stay inside the rootfs hook (#3074)
* fix(nativeguest): x86-64 path system calls and SIGSYS handlers stay inside the rootfs hook

FEX passed most guest path system calls to the kernel with an inline svc, so the
native path hook never mapped them, and it mirrored guest SIGSYS handlers with a
raw rt_sigaction that replaced the hook's own handler, after which the next
blocked system call killed the program. Path calls now go through libc's
syscall(), which the hook maps (guarded until the hook is initialised so an early
allocator cannot deadlock), and a SIGSYS handler set through syscall() is
recorded and chained like one set through sigaction().

* fix(ddexec): a program that re-execs itself keeps the rootfs hook

A re-exec through /proc/self/exe starts the program through the guest
ld.so again but left out the hook, so the child saw host paths. Steam's
reaper then recorded host install folders, and Battle.net games moved to
a mapped drive the Library could not resolve. The re-exec now preloads
the hook of the root the same way the first start does.
2026-11-23 11:11:10 -05:00
The412Bannerandmaxjivi05 bf7f7ecda7 fix(nativeguest): a spawned "ld.so --list PROGRAM" loads the program from the rootfs (#3054)
* fix(nativeguest): a spawned "ld.so --list PROGRAM" loads the program from the rootfs

* fix(nativeguest): keep the existing ld.so start comments

---------

Co-authored-by: maxjivi05 <maxjividen@gmail.com>
2026-11-23 10:40:16 -05:00
MaxsTechReview 3b8b14b06c fix(session): FEX and AppImage extraction no longer hang at start-up (#3070)
The clock pause preload opened its control file on the first monotonic
clock read. A program whose allocator reads the clock while holding its
own lock, as FEX does while it starts, re-entered that allocator through
the open wrappers and deadlocked. The control file is now opened only in
the preload's constructor, so a clock read never opens a file.
2026-11-23 10:27:47 -05:00
MaxsTechReview 2478c44948 fix(fex): free host signal state when a guest leaves its handler (#3052)
* fix(fex): free host signal state when a guest leaves its handler

FEX keeps each signal's host context on the host stack and frees it only
on rt_sigreturn. A guest that leaves its handler another way (siglongjmp,
or CoreCLR resuming a catch after a NullReferenceException) left about
2 KB of host stack and one SignalHandlerRefCounter count behind. Some
3500 such exceptions on one thread overran the guard-less 8 MB host
stack, and the CurseForge agent died with "Internal CLR error.
(0x80131506)" and "Stack overflow occurred on the same thread again!"
at the start of its second addon scan.

0009 chains each thread's signal frames with the guest frame range and
alternate stack they used. A signal that arrives in JIT code at the host
level of the newest frame, after the guest stack pointer has left that
frame, drops the left frames and stores its context where the newest
live frame (or the dispatcher entry) left the host stack. rt_sigreturn
pops its frame and any newer ones it skips; thread stop clears the
chain. Signals inside system calls or thunk callbacks are left alone.
This follows the approach suggested in FEX-Emu/FEX#2487.

0008 now restores InSyscallInfo only for signals that interrupted JIT
code, the only case that saves it. Restoring 0 for a signal that
interrupted a system call cleared the mark while the call was still
running; an itimer loop around time() crashed in 15 of 15 runs.

Pocket FIT Elite: siglongjmp out of a SIGSEGV handler died after about
3500 iterations under FEX-2611.1 with and without 0008 and finishes
200000 with 0009; the new probe (350000 escapes on and off the alternate
stack, mixed with returning handlers and nested handlers) finishes under
0009 and crashes before 2000 iterations without it. The 0008 probe
still reports no stale registers.

* test(fex): check every delivery hunk of the 0009 patch

* fix(fex): reset the host stack when a system call ends a block

* fix(fex): thunk calls mark the guest state as spilled

* fix(fex): signal returns apply the handler's register changes

* docs(fex): describe patches 0010 to 0012 and credit the upstream fix

* test(fex): require AVX2 for the ymm probe and keep vdso canaries live
2026-11-23 07:20:33 -05:00
MaxsTechReview 527cb85867 fix(fex): signal return restores syscall state; CurseForge runs headless (#3040)
* fix(fex): signal return restores the interrupted syscall state

A guest rt_sigreturn goes through FEX's syscall stub, which marks every
static register as spilled. Returning to unchanged JIT code skipped the
stub's reset, so later asynchronous signals skipped the register spill
and guest handlers read stale registers. CoreCLR's GC suspension reads
and redirects that context, which made x86-64 .NET programs fail with
random access violations. Restore the value saved at signal entry.

* fix(addons): run CurseForge headless from the addon browser, without a session

- The CurseForge source starts the app in its own headless gamescope
  (droiddeck-headless, shared with the Battle.net Agent) instead of a hidden
  session: no SessionService, compositor output or ImageReader.
- The helper's start keeps running until the app exits, so the app lives
  for as long as the addon browser holds that guest command; closing the
  dialog asks the app to quit, stops its process group and cancels the
  command, which ends the app, its gamescope and the guest.
- An app the user already has open is reported busy and left alone.
- Removes BackgroundSession and the CompositorHost start path it shared with
  SessionActivity, with their tests.

* fix(addons): bind each CurseForge stop to its launch and keep the inspector URL out of logs

A stop now only acts on the launch that registered it, so a late stop
from a closed browser cannot end a newer launch, and the browser stops
once. Command logs redact the inspector URL. The signal probe reports a
sender thread that cannot start, sets ECX before the measured region and
its test accepts a valid overshoot of the target count.

* fix(fex): unblock the probe signal before sampling
2026-11-22 20:40:30 -05:00
MaxsTechReview 210c127446 feat(addons): add a CurseForge source to the addon browser (#3028)
* feat(addons): add a CurseForge source to the addon browser

Search and install CurseForge addons from the Download addons window by
driving the installed CurseForge app in the background: it starts minimized
on the session's X display with its inspector bound to 127.0.0.1, and the
window's own renderer services handle game detection, search, install and
shutdown. Sign-in stays inside the CurseForge app.

The Install buttons in the addon list now size to their label, so the label
is centered and the button matches the other compact buttons.

* fix(curseforge): secret inspector URL, hold mode and serialised starts

- Start CurseForge with its Node inspector on 127.0.0.1:0 and publish only
  the UUID websocket URL, kept in the 0700 state directory, so no fixed
  unauthenticated debug port is exposed.
- The agent evaluates through that URL instead of a fixed port.
- Add a hold mode that runs as a session program and stops the app on
  exit, and a lock so hold and start never launch twice.

* feat(addons): run CurseForge in a hidden session when none is running

- Opening the CurseForge source with no session starts one headlessly
  (offscreen compositor output, shared start path with SessionActivity via
  CompositorHost) running the CurseForge hold helper; leaving the dialog
  stops the app and that session. A session the user already had is
  reused and left running.
- Drop the "start a session" notice from every locale.
- Addon browser link: cleanup shares the link's lock off the UI thread,
  stops the app at once on close, refuses work after close and stops a
  launch that finishes after close.
- CurseForgeApp.start stops the app before every failed return.
- instanceFor returns no instance when the populated list has no match.

* Harden headless CurseForge session and helper lifecycle

Scope the hidden session to its id, roll back partial starts, release the
offscreen reader once the session ends, re-acquire the inspector when its
endpoint goes away, bound DevTools calls by one deadline, key the installed
snapshot by target, track the helper launch by pid start time and directory,
fail on lock errors, and update the HDR gate test to its new location.

* Map DevTools send failures and recheck the hidden session id

* fix(addons): bind the hidden session to the id it claims at launch

* Keep the CurseForge helper quiet when no launch is recorded
2026-11-22 17:02:35 -05:00
MaxsTechReview 2c2d55058e fix(preload): open synthesized socket tables when the fd reopen is denied (#3034) 2026-11-22 16:20:34 -05:00
MaxsTechReview 7f61e514e6 chore: pin gamescope to the release with the opacity focus fix (#3031) 2026-11-22 14:27:08 -05:00
MaxsTechReview b891019b87 fix(steam-x64): keep the session's GL thunk for the x86 web helper (#3027)
* fix(steam-x64): keep the session's GL thunk for the x86 web helper

FEX's global AppConfig for steamwebhelper turns the GL thunk off and is
read after FEX_THUNKCONFIG, so the x86 helper used the rootfs's x86 Mesa.
Steam's browser compositor creates its window through SDL3 and GLX in
the helper's browser process, x86 Mesa faulted in driCreateNewScreen3
(SIGSEGV) about 11 s after each start, and the client restarted the
helper every 12 s.

For every global FEX AppConfig that turns off a thunk the session uses,
the launcher writes a local AppConfig with the session's thunk set. It
leaves local files with other content alone and removes its own files
when the client runs in software.

* fix(steam-x64): write FEX AppConfig overrides atomically

* fix(steam-x64): stage AppConfig overrides in a unique temporary file

* fix(steam-x64): publish AppConfig overrides without replacing a newer file
2026-11-22 14:16:34 -05:00
MaxsTechReview 1a29c65d4f fix(gamescope): choose focus again when a window's opacity crosses zero (#3030)
A window is a focus candidate only while _NET_WM_WINDOW_OPACITY is above
zero, but a change of that property never re-ran focus selection. A
layered window that maps fully transparent and fades in was skipped at
map time and stayed skipped once opaque, so a nested desktop session
hid its gamescope window and the game ran with nothing on screen.
2026-11-22 13:47:22 -05:00
MaxsTechReview ff5e4c7ac7 fix(preload): accept NETLINK_ROUTE multicast subscriptions (#3015)
* fix(preload): accept NETLINK_ROUTE multicast subscriptions

Programs that watch for network changes bind their route socket with
multicast groups or join them with NETLINK_ADD_MEMBERSHIP. The emulated
socket refused both with EACCES, and .NET's NetworkChange treats that as
fatal: CurseForge's Mods Agent failed to initialise with "Permission
denied" from NetworkChange.CreateSocket(), so the app never loaded its
library.

Real Linux lets unprivileged sockets join rtnetlink groups. Accept the
groups at bind and through ADD/DROP_MEMBERSHIP, report them from
getsockname(), and keep queries on the same socket working. No change
events are generated yet; queries still return the current snapshot.

* fix(preload): keep netlink group membership in the shared socket state

Memberships now live in the peer metadata the kernel holds for the socket, next to the port and cap ack, so they survive exec and a change made by one process after fork is seen by every process holding the socket.

* fix(session): answer denied /proc/net socket tables

Android's SELinux policy denies app processes every file under /proc/net.
.NET lists TCP listeners from /proc/net/tcp and tcp6 before it binds a
server port, so the CurseForge Mods Agent failed on every port with
"An error was encountered while querying information from the operating
system" on stock firmware. Denied tcp, tcp6, udp and udp6 reads now get a
header-only table, through open and openat as well as fopen, the same way
the route and interface tables already are.

* fix(session): keep synthesized socket tables read-only and file-only

Reopen the populated table read-only instead of duplicating its writable
descriptor, and leave O_DIRECTORY opens with their original failure.
2026-11-22 13:37:44 -05:00
MaxsTechReview 2d38f11b36 Build FEX's latest release, point releases included (#3026)
The FEX build pinned FEX-2610 and its tag checks only accepted four
digits, so FEX-2611.1 was never picked up. The build now takes the
latest release tag, and Fixed-upstream compares the four-digit release.
CMake 4.5 rejects DEPENDS in install(CODE), which stopped host thunk
builds; patch 0007 drops it.
2026-11-22 13:03:43 -05:00
MaxsTechReview fd2e1652ad fix(fex): invalidate translated code written through a later writable alias (#3020)
* fix(fex): invalidate translated code written through a later writable alias

x86-64 CoreCLR maps its W^X memfd writable after the executable view was
translated. Under SMCChecks=mtrack the new alias was never write-protected,
so writes through it did not invalidate stale translations. Protect the
overlapping part of an executable alias on mmap and mprotect.

* fix(fex): protect every writable alias in one mprotect range and build fmt without modules

* fix(fex): build without C++ module scanning or import std
2026-11-22 12:22:11 -05:00
MaxsTechReview 501debc7f6 fix(game-env): Dragon's Dogma 2 starts with its Wine detection off (#3011)
Dragon's Dogma 2 checks for Wine and takes a path that does not start.
Launches of Steam app 2054970 now append the game's own
/WineDetectionEnabled:False switch at launch time. Steam's stored Launch
Options are untouched, and a /WineDetectionEnabled: value the user already
passes keeps priority and is not repeated.
2026-11-22 09:31:40 -05:00
Tamim Kabir a8d03d687f fix(input): SDL 3 games no longer crash on the virtual pads' udev devices (#2915) 2026-11-22 02:43:32 -05:00
Kurt Himebauch 9cfab884d5 feat(session): the DroidDeck menu is a bottom-screen mode, and the controller stays with the game (#3001) 2026-11-22 00:16:49 -05:00
MaxsTechReview 6de3c59d7c fix(venus): lower the guest's SPIR-V to 1.3 for the phone's shader compiler (#2587)
* fix(venus): lower the guest's SPIR-V to 1.3 for the phone's shader compiler

* fix(venus): lower SPIR-V to 1.3 for Mali drivers

* fix(venus): keep the SPIR-V cap valid and scoped to active layers

Cap inline compute pipeline code too, leave the shader hooks off when
the layer is turned off, strip clip and cull distances only where they
are emulated, and leave modules alone whose capabilities, decorations or
OpSelect results need a newer version or an undeclared extension.

* fix(venus): keep application pipeline chains read-only and check non-semantic imports

Inline stage code is handed to the driver through a copy of the stage's
pNext chain instead of being written into the application's create info,
pipeline hooks return VK_ERROR_OUT_OF_HOST_MEMORY when their allocations
fail, and a NonSemantic import is only lowered to SPIR-V 1.3 when the
module declares SPV_KHR_non_semantic_info.

* fix(venus): preserve valid pipeline and shader behavior

* fix(venus): lower compatible read-only shader parameters

* fix(venus): install SPIR-V 1.3 lowering hooks on Vulkan 1.2+ devices or emulated gaps
2026-11-21 23:52:56 -05:00
MaxsTechReview bc11653c15 fix(steam): start the web helper when Android refuses CPU pinning on every GPU (#2819) 2026-11-21 23:52:53 -05:00
Kurt Himebauch a2587f4f20 fix(display): preserve padded layer buffer layouts (#2985)
* fix(display): preserve padded layer buffer layouts

* fix(display): fall back when layer allocation fails

* fix(display): write linear targets at their row pitch
2026-11-21 23:40:11 -05:00
Kurt Himebauch b2687701c1 build: run the local macOS build natively, with no emulation (#2999)
build: make the local macOS build run natively, with no emulation

On an arm64 Mac the x86/i386 session preloads were built in a linux/amd64
container under emulation, and the Rockstar launcher failed to link against
Homebrew's SJLJ i686 mingw. Both now build on the host's own architecture.

- build_local.sh: on arm64 build the x86 preloads in a native arm64 Debian
  bullseye container with the x86_64/i686 cross toolchains (glibc 2.31, as
  before); x86 hosts keep the native gcc-multilib path.
- build-x86-preloads.sh: X86_CROSS=1 selects the cross toolchains.
- rockstar-launcher/build-container.sh: build the launcher in a native
  Ubuntu container with a DWARF2 mingw, used on macOS only.
- vr/build.sh: stop aborting silently when ANDROID_NDK_HOME names an NDK
  that is not installed.
- build_local.sh: expand the empty stores_check array safely on bash 3.2 so
  the script reaches its signing step.
2026-11-21 22:51:27 -05:00
MaxsTechReview 183cbd9351 fix(preload): start apps that check for a single thread and stop the first-call allocation hang (#2995)
* fix(preload): look up the native glibc symbol version first so wrapped calls never allocate

On x86 the first dlvsym lookup asked for GLIBC_2.17, which only exists on arm64. The failed lookup makes glibc allocate, which deadlocks when the first wrapped call happens inside a program's own allocator setup. Each architecture now asks for its base version first.

* fix(zram): start the page-out worker per request instead of keeping a thread in every process

Every process that loaded the session preload carried a resident zr-worker thread from its constructor on. Programs that check they are single-threaded before forking or before unshare(CLONE_NEWUSER) failed, for example Chromium's zygote, which could not start its GPU process.

The signal handler now starts the worker with a raw clone on a stack the preload maps itself. The worker makes only raw system calls and exits when no request is left, so starting it from the handler is safe and idle processes stay single-threaded. When the worker cannot be started, the process trims inline in small steps as before.

* fix(preload): start the page-out worker with the same clone flags as a thread

Programs that filter clone to the flag set threads use, as browser
sandboxes do, now accept the worker. The kernel clears the stack-busy
word and wakes waiters when the worker exits.

* fix(preload): page out inline in single-threaded and self-sandboxed processes

A process with one thread may be about to check that it is single-threaded
before fork or unshare, and a process that added a seccomp filter after it
started may trap system calls into its own handler. Neither gets a worker
thread now; both trim inline in small steps as before.

* fix(preload): check the signalled thread's own seccomp filters before starting the worker

Read Seccomp_filters from /proc/thread-self/status so a thread that installed its own filter
without TSYNC trims inline instead of calling clone under that filter, and fall back to the
inline path when the signal mask cannot be changed.

* test(preload): start parked threads with SIGURG already blocked

* test(preload): count only page-out workers when checking for leftover threads
2026-11-21 20:11:18 -05:00
MaxsTechReview 088c8ff1cf fix(battlenet): follow the selected FEX instead of pinning an old build (#2987)
* fix(battlenet): follow the selected FEX instead of pinning a d2rfix build

The Battle.net prefix forced the newest FEXCore d2rfix package from the Nightlies listing, which stopped updating. Its fixes are in the bundled and nightly FEX, so the prefix now uses whatever FEX is selected. Existing d2rfix selections for the Battle.net profile are cleared once; any other choice is kept. The DXVK memory cap and Start without Steam defaults are now applied when a session starts.

* fix(battlenet): import the legacy plugin state before unpinning the Battle.net FEX
2026-11-21 15:31:18 -05:00
MaxsTechReview 4349563fd1 feat(display): zero-copy presentation toggle and compositor display buffers (#2905)
* feat(display): zero-copy presentation toggle and compositor display buffers

Adds a Zero-copy presentation switch under Steam Settings, Display,
Session Display (on by default), and a display-buffer allocator in the
compositor: a Vulkan driver that states displayBuffers asks it for the
memory of the images it exports, so frames presented through the nested
compositor are gralloc buffers that go on the display layer without a
copy. Compressed buffers are offered only where the device's allocator
matches the layout the drivers render to; everything else stays on the
copy path.

The private buffer protocol is renamed to droiddeck-ahb-v1.

* fix(display): zero-copy frames keep the full refresh rate

Two buffers set on the game layer inside one refresh replaced each other, and a frame that slipped into the next refresh made the compositor hold and drop the on-time frame behind it. The layer now queues buffers, and a refresh takes a second frame when the one before it took none. The pacing tool no longer counts its dump time in the frame rate.

* Keep cropped scenes on the display layer and pace layer frames evenly

Accept any in-bounds source crop for the display layer and map the draw
geometry the same way the copy path does. Time layer frames against the
display's frame timeline, and when the game's rate is a steady whole
fraction of the refresh rate show each frame a fixed number of refreshes
after the last so uneven arrivals no longer reach the screen.

* List zero-copy in the settings map

* Hold display buffers until the display releases them

A buffer the game or gamescope rendered straight into went back to its
client as soon as the next one was latched, with the display's release
fence attached to the dma-buf. The KGSL driver does not wait on that
fence, so the client could draw into a buffer the panel was still
reading. Display buffers now wait for the release fence before the
release event, and gamescope composites only into output images the
host has released.

* Keep the game picture copy-free when an overlay has no display layer

When the display cannot give a second layer of its own to an overlay,
the compositor tells gamescope how many planes it can show directly.
gamescope then composes its overlays into the game picture, which still
reaches the display without a copy.

* feat(session): the panel refresh rate follows the session's frame rate

The session learns the panel's refresh rates and reports the refresh rate and
frame rate it wants. The panel moves to the highest rate the frame rate divides
evenly, frame generation counts at its output rate, and a panel whose rate the
system holds offers only that rate.

* feat(session): the panel follows a frame rate the game holds on its own

The compositor reports the game's frame rate once a second. A rate that
holds for three seconds and divides a panel rate becomes the content
rate when neither the app's limit nor the session's limiter is setting
the pace, so a game capped in its own settings gets a panel rate its
frames divide into. A rate that was dropped has to hold twice as long
before it is used again.

* Show generated frames on the game's display layer

With frame generation on, the game's own frames stay on their display
layer untouched and each generated frame is placed on the same layer
between them, timed across the game's frame interval. The compositor
pass is kept when effects, HDR routing or a cursor need it, or when the
panel cannot show the multiplied rate.

* Keep scaling, generated frames and HDR on the display layer

A scaler or frame generation with zero-copy on now draws once into the
display layer instead of falling back to the copied surface. HDR output
goes to the layer when the panel supports it; on a panel without HDR the
picture is tone-mapped on the same path, and the toggle is labelled to
match what the panel can do.

* Spread a frame limit the refresh rate does not divide evenly across refreshes

* Cover the spare-tick and panel-rate paths in the compositor source tests

* Pin the gamescope build with the display-plane, release, refresh and limiter patches

* Give the layer and terminal-caller harnesses the black fill state they compile against

* feat(display): switch HDR during a session without restarting the app

The compositor now offers HDR whenever the device can present it, and the
HDR setting only decides whether the session uses it. Both HDR switches set
gamescope's hdr_enabled, the compositor's HDR output and zero-copy for the
running session. gamescope patch 0139 lets hdr_enabled change after start.
The 'Restart the app to apply.' hint is removed from every locale.

* Remake the output images in the new format when HDR is switched during a session

* Pin the gamescope build that switches HDR during a session

* Apply a saved HDR opt-out at session start and keep HDR retries with their session

* Serialise the HDR output switch with the gate opening

* feat(display): keep the client's HDR setting and the session's in step

The session publishes its HDR state with the other device controls and the
client helper applies it to the client's own display setting. A change made in
the client is reported back and goes through the same switch the drawer and
Session Display use, so all three always show one value.

* fix(desktop): keep the display-buffer socket when the runtime directory is cleared

The desktop launcher removed everything in the runtime directory except the
compositor's Wayland socket, which took the display-buffer socket with it, so
no desktop program could ask for display buffers and every frame was copied.

* fix(display): the client's HDR setting follows the session in every client mode

The bridge only ran when a variable nothing sets was present, so the client's
HDR setting and the session's never met. It now runs whenever the session
publishes an HDR state, and a client that has no such setting is asked again
only every ten seconds.

* fix(display): harden display-buffer hand-off, layer fallbacks and HDR sync

- Stop closing a buffer handle's descriptor the allocator still owns, and free an allocation whose reply could not be sent.
- Rebuild the advertised buffer formats when zero-copy is switched during a session.
- Fall back to the copy path when a layer buffer cannot be allocated, and hide the game layer when it is skipped for a frame.
- Keep a release fence that has not signalled instead of rendering into a buffer the display still reads.
- Ignore a refresh-target reset from a client that does not own the target.
- Restart the content-rate measurement after a pause, clear it when the game stops, and lengthen engagement only for a rate that was released before.
- Compare colour conversions by their values, and read padded cursor buffers at their row width.
- Use the running session's mode for the HDR and zero-copy settings, probe the display before screen effects are pushed, retry a held panel mode, and ignore callbacks after the activity is destroyed.
- Write a newer HDR value while an earlier write is settling, and reapply the value after the bridge is reinstalled.
2026-11-21 00:26:50 -05:00
Kurt Himebauch f29f72d5d9 fix(input): restore Steam controller reattach (#2963) 2026-11-20 20:17:52 -05:00
K11MCH1andMaxsTechReview 367151be2c fix(epic): start parent-checking Epic titles under an EpicGamesLauncher.exe stand-in and stage their Rockstar SDK (#2932)
* fix(epic): start Epic titles that check their parent under an EpicGamesLauncher.exe stand-in

Rockstar's launcher only accepts an Epic copy of GTA V when a process
named EpicGamesLauncher.exe started it. DroidDeck's Epic client is a
Linux program, so the launcher logged "Epic Games Launcher not detected
as parent process", failed to relaunch through Epic and showed the game
as unowned.

- tools/epic-launcher: a small Windows EpicGamesLauncher.exe that starts
  the game with the rest of its own command line, unchanged, waits for
  it and returns its exit code. It ships as the epic add-on pack.
- The Epic .droiddeck-launch.bat runs the game through it for Epic
  titles known to need it (GTA V, GTA V Enhanced, RDR2, RDR, GTA SA DE,
  Returnal, Phantom Blade: Executioners), or for any Epic game whose
  per-game environment sets DD_EPIC_PARENT=1; DD_EPIC_PARENT=0 turns it
  off. Those titles also start without Steam's SteamAppId. Without the
  staged stand-in the game starts directly, as before.
- Steam launch options now reach Epic games (%*).
- The launch hook fetches the pack when such a title finds it missing.
- Rockstar's launcher found no Social Club SDK in the prefix and ran
  Social-Club-Setup.exe /silent, which never exits under Wine. For Epic
  titles that carry a Rockstar SDK installer, the hook now extracts the
  SDK from the launcher's own Redistributables copy (the version the
  launcher compares against) or, before the launcher is installed, from
  the game's copy, and registers it. It re-extracts when that installer
  changes and leaves the Rockstar Games Launcher key alone, so PlayGTAV
  still installs the launcher on first start.

* fix(epic): fetch the parent stand-in exactly when the game will use it; keep Cargo output out of source digests

The launch hook runs before droiddeck-game-env applies per-game
variables, so it now resolves DD_EPIC_PARENT through
droiddeck-game-env's own apply_config and game_id: an unlisted title
with DD_EPIC_PARENT=1 fetches the pack, a listed title with
DD_EPIC_PARENT=0 no longer waits for it.

runtime_inputs no longer hashes the target directory beside a Cargo.toml
under its source paths, so a local cargo build of a Windows helper does
not fail verify(). tools/epic-launcher gets the same .gitignore as the
other helpers.

* fix(epic): a DD_EPIC_PARENT in the game's sidecar env decides the stand-in fetch too

The .bat sets the sidecar's env before it reads DD_EPIC_PARENT, so that
value overrides the game environment there; the launch hook now gives it
the same precedence when deciding whether to fetch the pack.

* test(epic): keep an inherited DD_EPIC_PARENT out of the launch hook tests

---------

Co-authored-by: MaxsTechReview <maxjividen@gmail.com>
2026-11-21 09:56:31 +09:00
Kurt Himebauch 9925873764 revert(input): restore pre-overhaul controls (#2958) 2026-11-20 19:43:09 -05:00
The412BannerandKurt Himebauch 3c0d25d83b fix(display): read linear client frames at their row pitch when the driver has no explicit modifier layouts (#2927)
* fix(display): read linear client frames at their row pitch when the driver has no explicit modifier layouts

* fix(display): keep row-pitch copied client frames eligible for layer presentation

* fix(display): order the readback layout change after the staging copy

* fix(display): skip the modifier import query when the driver lacks VK_EXT_image_drm_format_modifier

* test(display): the compositor's source-extracting tests follow the linear dma-buf helpers

vkp_image_destroy now frees through destroy_image_objects, render_impl stages
linear dma-bufs and the external-image release asks foreign_image; the two
tests that compile these functions out of vk_present.c extract or stub them,
with the image's new buffer fields in their fakes.

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-20 14:42:44 -05:00
Kurt Himebauch a3e8b44145 fix(input): Remote Play connects again with the virtual pads present (#2946)
Since #1593 every process except the Steam client gets DroidDeck's udev
answers through dlsym. Steam's Remote Play client, streaming_client, is
an SDL3 program: for each input node it treats as a joystick, SDL3 asks
udev_device_get_driver for the device that udev_device_new_from_devnum
returned. The preload answered new_from_devnum with its own handle for a
virtual pad but did not answer get_driver, so the real libudev read the
handle as its own and streaming_client crashed before the stream opened.
It reaches that call whenever it can stat a pad node: the Xbox 360 pad,
Steam's own uinput gamepads, and since #2033 the pads it reads.

streaming_client now keeps the real libudev like the Steam client, and a
virtual pad answers get_driver with no driver, so other SDL3 programs no
longer crash on it.
2026-11-20 13:19:12 -05:00
Kurt Himebauch d7f43c26cd fix(input): Steam finds a DualShock or DualSense chosen mid-session (#2942)
* fix(input): Steam finds a DualShock or DualSense chosen mid-session

Android lets an app open a uevent netlink socket but not join its multicast
groups, and libudev joins none when no udev daemon runs, so the udev
monitors Steam's SDL opens heard nothing and the pad switch's add and remove
events reached no one. SDL only noticed a new PlayStation pad when the old
one happened to fail a read. A monitor left without a subscription is now
swapped for the session's stand-in under the same descriptor, so it
receives the injected events.

* test(preload): stub the udev monitor bind hook in the CDP guard build
2026-11-20 12:44:52 -05:00
Kurt Himebauch d0022a35f9 fix(session): remove the keep-top guard from other displays (#2937)
* fix(session): remove the keep-top guard from other displays

#2763 put a transparent KeepTopActivity on every other display while a
session was on top, so lmkd killing that display's home could not move focus
off the session. A/B on a 12 GB AYN Thor (Android 13) and a Retroid Pocket
Duo (Android 16) found no case where it kept a session alive: with steady
pressure the bottom home (stock launcher or Cocoon) was killed up to 400
times per run without taking focus, and a burst big enough to matter makes
lmkd kill the session at adj 0 with or without the guard.

Its side effects were real:
- Android's ActivityRecordInputSink made the bottom screen ignore touch
  (worked around in #2910 by stepping aside on touch).
- Cocoon tracks each display's top activity, so it could not suspend or
  resume DroidDeck cleanly.
- The Thor's Game Assistant gives every app with an activity on top of the
  bottom display that display's volume, so DroidDeck's audio followed the
  bottom screen's volume slider.

Removes KeepTopActivity, the focus bounce and light pause, the memory
pressure trigger and their tests. onPause runs its departure cleanup every
time again.

tools/memory_guard_ab.py gains a burst mode, reads oom_score_adj without
su (lmkd kills the root manager app and su can then open its request screen
over the game), handles Android 13 dumps, a hung stop and a session that
does not start. docs/development/memory-guard-ab.md has the Thor results.

* test(session): the guard A/B fill mode starts its counter again, and a pressure run with no completed run fails

* test(session): the burst seed is rebuilt unless it is exactly 256 MiB

* test(session): the guard A/B burst takes its last partial chunk, and only a hog run that finished counts
2026-11-20 11:40:10 -05:00
MaxsTechReview acb2cba970 fix(ci): add-on packs compress the same on every runner (#2938)
The proot pack pin check failed on GitHub-hosted runners for PRs that do
not touch proot. The hosted image puts the latest upstream zstd (1.5.7)
in /usr/local/bin, while the self-hosted runners use zstd 1.5.5, and
zstd -19 output differs between those versions for identical tar input.

tools/packs/build.sh now compresses every pack with the zstd version
pinned in tools/packs/zstd/release.env: the system zstd when it is that
version, otherwise the checksum-verified upstream release built once
into the pack input cache.
2026-11-20 10:27:17 -05:00
Kurt Himebauch 5051fc8b32 fix(session): the bottom screen takes touch again while a game runs (#2910)
* fix(session): the bottom screen takes touch again while a game runs

Since #2763, a transparent KeepTopActivity covers every other display while a
session is on top. Its window is NOT_TOUCHABLE, but Android gives a
translucent activity alone in its task an ActivityRecordInputSink that eats
every touch on that display (ENABLE_TOUCH_OPAQUE_ACTIVITIES, on for this
target SDK). With the dual-screen panel closed, the bottom screen's launcher,
Cocoon or any other app could not be touched until the session ended, and
the guard stayed over it after Home/PiP as well.

- The guard now takes touches itself: a touch removes it from that display.
- It comes back when the session is top-resumed again, or after 5 s if the
  session kept the top spot (the user touched the bottom screen once and
  stayed in the game).
- Stopping or entering PiP removes the guards; PiP keeps the session at adj
  50 with or without them, so they protected nothing there.

A/B on a Retroid Pocket Duo (Android 16, Cocoon as bottom home): the guard
is on top in every state it was on top on main, except the 5 s after a
bottom touch and PiP. Under lmkd pressure (kills down to adj 50, bottom
home killed 14-31 times per run) neither build lost the top spot.

* test(session): A/B tool for the keep-top guard on rooted dual screens, with Duo findings

* test(session): the guard A/B tool stops on a failed session start and cleans up an interrupted pressure run
2026-11-20 00:18:50 -05:00
MaxsTechReview 4e81030fb8 fix: source builds start a session again on storage without hard links (#2908) 2026-11-20 00:00:27 -05:00
Kurt Himebauch 45c31a480a Default WINESTEAMNOEXEC=0 for Black Ops II (#2892) 2026-11-19 21:27:49 -05:00
Kurt Himebauch 1456c0529d feat(agent): launch and quit store games, list the library, and run Xbox and cloud save commands from droiddeckctl (#2860) 2026-11-19 11:04:34 -05:00
FryMcNugget 786166ba1a fix(lab): Fast Lab builds no longer run out of memory compiling the app (#2862) 2026-11-19 11:03:56 -05:00