Commit Graph
604 Commits
Author SHA1 Message Date
Kurt Himebauch bb6523cd9c fix(display): keep the 16:9 stretch size on the game screen after Steam resizes it (#2738) 2026-11-24 17:49:49 -05:00
Albert Carreras 925e9743a8 fix(game-env): draw Dragon Quest Monsters 4 slime bodies (#2847)
At the game's default monster mesh detail, slimes show only their tips.
Set the two skeletal mesh detail values in Engine.ini before each launch,
in the prefix the game profile selects, and keep the file's permissions.
The game ignores -ini: overrides and deletes a writable Engine.ini after
reading it, so a launch argument or a one-time write does not work.
2026-11-24 17:49:44 -05:00
JM LamboandJacob Lambert 049c4be6e5 fix(desktop): Plasma draws on the system PowerVR driver (#2836)
* fix(desktop): Plasma draws on the system PowerVR driver

KWin lacks the Android-buffer Wayland protocol the system PowerVR driver's
swapchain needs, so every Plasma client failed with "zink: could not create
swapchain" and the desktop stayed black under the cursor. Plasma's clients now
present through DRI on that path, as the Steam session already does.

* test(desktop): the kopper override reaches Plasma's child processes

* test(desktop): check the kopper override where Plasma launches

---------

Co-authored-by: Jacob Lambert <183008808+JMLambo@users.noreply.github.com>
2026-11-24 17:49:39 -05:00
e36cf24ba9 fix(guest): use /usr/bin/python3 in the payload shebangs, not /usr/bin/env (#2930)
PRoot's link2symlink resolves /usr/bin/env to a `.l2s.env….` stub and the
guest's uutils coreutils multicall refuses that name:

  Security violation: Requested utility 'env' does not match executable
  name: /usr/lib/cargo/bin/coreutils/.l2s.env0001.0116

Every exec of these five scripts therefore dies with GUEST_EXIT 1 before
Python starts, 20-60 ms into the session. They are droiddeck-diagnostic-
inventory (the session's first child), droiddeck-desktop-bookmarks (the
desktop's bookmarks refresh), droiddeck-ime, droiddeck-steam-games and
droiddeck-steam-shortcuts.

The absolute interpreter is what the other payload scripts already use,
and the guest runtime installs the python3 package (tools/ubuntu/
packages-runtime.txt), so /usr/bin/python3 exists in the rootfs.

Only the tracked overlay copies change: app/src/main/assets/linuxfs is
generated by the stageSessionScripts Gradle task, so the asset copies
follow from the overlay.

Co-authored-by: Pablo González <pgm1207@users.noreply.github.com>
Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-24 17:49:33 -05:00
MaxsTechReviewandKurt Himebauch 7630173b24 fix(ddsession): keep path and status buffers off the wrapper fast path (#3071)
dd_descriptor_unlink, dd_descriptor_rmdir and dd_descriptor_rename put
one or two PATH_MAX buffers on their own frame (12 KB, 24 KB), and
dd_status_without_tracer put its 16 KB status buffer there, even on the
common path that only calls through to libc. Threads with small stacks,
such as .NET or Wine threads near their guard page, could overflow in
an otherwise plain unlink, rename or open.

The wrappers now do only the cheap checks and call the real function;
the buffers live in noinline helpers that run only when the descriptor
store or the status rewrite is actually needed. A test compiles both
sources with -fstack-usage and keeps each wrapper frame under 1 KB.

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-24 17:19:24 -05:00
Kurt Himebauch 9e405ec92c fix(game-env): run Hades II at D3D12 feature level 12_2 (#2855) 2026-11-24 16:18:20 -05:00
Moroni Granja 2a51b044c5 fix: a Steam target whose file is gone goes back to the app's exe (#2411)
* fix: a Steam target whose file is gone goes back to the app's exe

A shortcut Target edited in Steam is kept across the client's restart on
purpose, but it was kept even after the file it names disappeared. When the
app's own exe already equalled the recorded proposal, nothing replaced the dead
target: Steam started `System/launcher.exe`, Wine answered
`err:steam:run_process Failed to create process ...: 2`, and the game never ran
(#694, after #1644 and #2022 removed the two real causes).

The merge now treats a target that is not a file as no edit at all and writes
the listing's exe and StartIn. The check runs in the guest, where the shortcut's
paths live.

Fixes #694

* fix: keep a Steam target whose card is not mounted

- The app recreates /mnt/droiddeck-sd and /mnt/bannerlator-sd before binding the card, so the
  mountpoint outlives a removed card. A target directly under one had an existing parent, so
  the missing-file repair overwrote the edited Exe and Start In and kept them overwritten.
- The repair now needs the target's storage to be there: a card mountpoint that lists nothing
  is a card that is not in the device, and the edit is kept for when it returns. Extra Steam
  libraries under /mnt/droiddeck-lib/<id> get the same check.
- test_a_steam_target_under_a_bare_card_mountpoint_is_kept fails without the check and asserts
  both fields; test_a_steam_target_under_a_mounted_card_goes_back_to_the_apps keeps the repair.

* fix: repair a Steam target removed with its folder

- A missing target is gone when its storage is mounted and either its folder is still
  there or it lives in a tree the app always has (internal store installs, the internal
  Steam library). An update that removes the whole game folder now repairs the shortcut.
- Store volumes and added game folders are removable mounts too: /mnt/droiddeck-stores/<id>
  and /root/Games/<name> are checked for content before a target under them is treated as
  gone, so an unplugged volume keeps the edited Exe and Start In.
- Tests: internal folder removed repairs both fields; a bare store mountpoint and a card
  mountpoint keep both; a mounted card still repairs. 84 tests pass.

* fix: classify a Steam target by its resolved path

- A target such as /root/Games/Stores/../../../mnt/droiddeck-sd/Other.exe matched the
  internal prefix and was repaired while the card was out. internal_target and
  removable_mount now normalize the path before choosing the storage class, so the
  decision follows the file the target resolves to; the kept text is unchanged.
- test_a_steam_target_is_classified_by_its_resolved_path fails before the normalization
  (the edit is replaced) and keeps both fields after it. 85 tests pass.
2026-11-24 16:17:04 -05:00
JM LamboandJacob Lambert 0a27c8bb98 fix(desktop): Firefox renders in software on the system PowerVR driver (#2839)
* fix(desktop): Firefox draws on the system PowerVR driver

Under the nested KWin on the system PowerVR driver, Firefox's Wayland window
stops updating partway through drawing and repaints only where the pointer
moves. Through Xwayland it draws normally, so Desktop runs Firefox on X11 on
that path.

* fix(desktop): Firefox renders in software on the system PowerVR driver

The Xwayland workaround only worked because Firefox fell back to software
WebRender there. The breakage follows hardware WebRender on zink, not the
Wayland window: with MOZ_ACCELERATED=0 Firefox draws correctly on Wayland,
so it keeps native Wayland features such as fractional scaling.

---------

Co-authored-by: Jacob Lambert <183008808+JMLambo@users.noreply.github.com>
2026-11-24 16:16:55 -05:00
Kurt Himebauch 2e3b69e9ff perf(steam): setup applies Steam's client update so the first launch has nothing to unpack (#3152)
* perf(steam): setup applies Steam's client update itself so the first launch has nothing to unpack

The setup already downloads every package of Steam's client update. droiddeck-steam-preapply now extracts them and writes the .installed and .manifest records the way Steam's updater does, so the first launch verifies and starts instead of unpacking for about half a minute and restarting. When it cannot, the packages stay and Steam updates itself as before.

* perf(setup): the Steam stage skips the plain packages it just applied, and Proton's install trusts the prefetch's checksum

With the whole client update applied from the cached packages, the separate 362 MB plain-package install is redundant: the cache pass applies the update and finishes the install, and the plain install stays as the fallback. DroidDeck Proton's archive was hashed twice more at install time after the prefetch had already verified it; the install now reuses that result while the file is unchanged.

* fix(steam): a failed or cancelled apply leaves nothing stale, extraction stays inside the Steam root, and a cache failure still installs

A failed apply removes its record and the cache marker so the next run retries; cancelling stops the helper; entries that leave the Steam root, directly or through a symlink, are refused; the plain install still runs when the cache pass fails; Proton's install reuses the prefetch's verification only for the same digest.

* fix(steam): a cancelled apply clears the cache marker too
2026-11-24 15:18:41 -05:00
Kurt Himebauch caf16c8aa5 fix(steam): a failed package claim fails the install (#3149)
run_parallel is called in an || list, which switches set -e off inside it and inside its workers, so a failed claim left the worker's index empty and the worker exited successfully with packages unclaimed. The worker now checks the claim itself and marks the run failed, and claim_next uses the same flock command as the unpack lock.
2026-11-24 10:15:38 -05:00
Kurt Himebauch c1dd542f97 fix(steam): the parallel installer claims packages under a flock (#3145)
The parallel workers claimed packages with mkdir, which is not atomic in the app's guest shell: two workers sometimes took the same package and about 3 installs in 8 failed on a device. Claims now come from a counter under a flock, and a counter that cannot be read or written fails the worker.
2026-11-24 09:51:16 -05:00
The412Bannerandmaxjivi05 cf44aaed14 fix(appimage): catalog AppImages start without proot (#3077)
* fix(appimage): catalog AppImages start without proot

* fix(appimage): cache cleanup does not follow symlinked entries

* fix(appimage): keep unpacked copies in use and track subsecond changes

* fix(appimage): extract native images through an open descriptor

---------

Co-authored-by: maxjivi05 <maxjividen@gmail.com>
2026-11-24 09:37:09 -05:00
Kurt Himebauch 39debda0b0 fix(onboarding): a smoother first run, from the child-process setting to the Steam sign-in (#3114)
The child-process fix always uses the guided pairing flow, Finish setup opens the setting directly and queues the Steam launch, the Play button carries the first-run progress, the setup bar weighs each download by its real size, and the Steam client packages download over four connections and unpack one at a time under a flock.
2026-11-24 08:56:08 -05:00
MaxsTechReview a03ec8eb57 Session preload: leave programs a Chromium app starts from its own folder alone (#3121)
The browser flags were added to every program beside chrome-sandbox
that had no --type switch. Chrome's crash handler is such a program, so
it was started with --no-sandbox, rejected it and exited. A Chromium app
that starts a program from its own folder already passes that program
the arguments it needs, so those programs are left unchanged. Another
Chromium app started from it still gets the flags.
2026-11-24 00:12:02 -05:00
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 8ee80aa20f fix(appimage): arm64 programs use the session's GL libraries over bundled copies (#3103) 2026-11-23 20:02:13 -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
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
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
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 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 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 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 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
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 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
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 45c31a480a Default WINESTEAMNOEXEC=0 for Black Ops II (#2892) 2026-11-19 21:27:49 -05:00
kingokksa c4f4e18f87 fix: the virtual pads reach non-Steam programs, where udev is resolved through dlsym (#1593) 2026-11-19 08:37:43 -05:00
MaxsTechReview f2d8e9e837 perf(storage): answer repeated SD library checks from the directory cache (#2881) 2026-11-19 07:33:17 -05:00
FryMcNuggetandmaxjivi05 44ade5eeee feat(proton): install experimental Proton builds from a .zip (#2864)
Components > Proton gains an Experimental builds card that installs a Proton build from a .zip, lists it as Experimental-<name> and removes it with its stored and unpacked originals and selections. Replacing a build keeps its user settings and is safe to interrupt.

Co-authored-by: maxjivi05 <maxjividen@gmail.com>
2026-11-19 02:32:30 -05:00
MaxsTechReview adf13d0bdd feat(session): manage memory automatically and remove the manual memory controls (#2853)
Memory in the Steam session is kept above a floor by a monitor instead of the zRAM, RAM cap and VRAM cap settings, which are removed.
2026-11-18 21:58:57 -05:00
Kurt Himebauch 123c431b8e feat(ea, ubisoft): cloud saves and a kept Ubisoft Denuvo token (#2824)
* feat(ubisoft): keep Denuvo game tokens per account and product until the game invalidates them

* feat(ubisoft): sync cloud saves through Ubisoft's cloud save service

* fix(xbox): turning cloud saves off passes the offline mode the game save runtime reads

* fix(ubisoft): Ubisoft games list their shared prefix, so they get a saves and cloud tab

* feat(ea): sync cloud saves through EA's cloud sync service

* fix(ea): sync at EA launch and exit, keep one rule snapshot, and check the cloud copy under the write lock

* fix(ubisoft): exact slot versions, scoped save export, and a Denuvo cache bound to its account

* fix(ea): fresh rules per sync, checksums required, backup before restore, and sign-in shown on the saves tab

* fix(ubisoft): launch-time sync on the shared prefix, saves scoped to the game, and Denuvo bound to each launch's account

* fix(ea): back up only the saves a restore replaces, refuse truncated manifests, and need a master title id

* fix(ubisoft): treat a slot whose bytes changed since the last sync as a conflict before uploading over it

* fix(ea): one resolved save folder per sync, refuse case collisions, and walk each folder once

* fix(ubisoft): sync only identified slots, keep live saves and backups safe, and tie a pending eviction to its account

* fix(cloud): a forced download fetches every saved conflict and keeps the ones it could not write

* test(ea): keep the cloud save cases in EaTest

* fix(ubisoft): report only written slots, keep drift conflicts, read whole headers, and never rename a named eviction

* fix(ea): keep real save folders in the inventory, back up any restored file, refuse duplicate or malformed cloud listings

* fix(cloud): commit Ubisoft slots one at a time and stop on a newer cloud write, name skipped and blocked slots, keep unsent conflicts

* fix(ubisoft): acknowledge an invalidation only once its marker is published and never serve a kept token after it

* fix(cloud): a cloud request the launcher cannot write still starts the game and keeps the exit upload

* fix(cloud): scope Ubisoft sync state to the account and product, compare alike slots, keep committed progress, and name partial slots

* fix(ea): ask for sign-in after a rejected refresh, upload saves reached through folder aliases

* fix(cloud): a launch that stops waiting for the cloud download claims it back, so no save is written once the game starts

* fix(ubisoft): name the account in an invalidation marker and never hold the token lock across a pipe write

* fix(ea): only invalid_grant asks for sign-in again, and case collisions count only among synced saves

* test(epic): let the launcher's ask doubles take the claim flag

* fix(ea): apply save rules in their order, match bare patterns inside the save folder, and resolve LocalLow and install folders

* fix(ubisoft): stamp a fresh identifier into a new save that has none, so it can sync

* fix(ubisoft): answer a burn ticket request as unavailable instead of leaving the game waiting

* fix(cloud): read EA manifests with the XML parser, clear conflicts whose sides match, and bound the claim and stall tests
2026-11-18 18:32:06 -05:00
Kurt Himebauch 6ed281f78d feat(xbox): install MSIXVC2 back-compat titles from their content boxes (#2851)
* feat(xbox): install MSIXVC2 packages from their encrypted content boxes

* feat(xbox): run a package's custom install actions once per prefix

* fix(xbox): launch the program a launcher menu names instead of the menu

* fix(xbox): check free space before an MSIXVC2 install starts

* fix(xbox): keep a forwarded launch path relative when the install folder is reached through a link

* fix(xbox): rebuild the MSIXVC2 patch on the final legacy install

* fix(xbox): keep a backup whose release fails, and test an interrupted restore

* fix(xbox): verify resumed msixvc2 files, contain writes, decode install action arguments

* fix(xbox): keep one completion record per msixvc2 file, never follow a linked install state

* fix(xbox): drop a torn msixvc2 completion record before appending to it

* fix(xbox): repair a torn msixvc2 record from its tail instead of rereading it
2026-11-18 16:59:45 -05:00
Kurt Himebauch 5b7409d1d5 fix(game-env): restore D3D12 12_2 and shader model 6_9 for Kingdom Come: Deliverance II (#2787)
* fix(game-env): run Kingdom Come: Deliverance II at D3D12 feature level 12_0

* fix(game-env): restore feature level 12_2 and shader model 6_9 for Kingdom Come: Deliverance II
2026-11-18 15:49:44 -05:00
801da99c11 fix(game-env): per-game DROIDDECK_GAME_TU_DEBUG reaches the game (#2781)
* fix(game-env): per-game DROIDDECK_GAME_TU_DEBUG reaches the game

game_gpu() ran on the inherited environment before apply_config() added
the entries from game-environment.json, so a DROIDDECK_GAME_TU_DEBUG
(or DROIDDECK_GAME_MESA_NO_ERROR) set for one game was passed through
unchanged and TU_DEBUG was never set. apply_config() now returns its
result through game_gpu(), so a per-game value is applied the same way
as one from the session.

* fix(game-env): a game's own TU_DEBUG still wins over a shared prefixed one

Resolve the prefixed GPU keys inside the shared entries and inside the
game's entries separately, before the game's entries are laid over the
shared ones. A game's plain TU_DEBUG (or its removal with null) now
beats a shared DROIDDECK_GAME_TU_DEBUG, and a prefixed value set for one
game still applies.

* fix(game-env): keep a plain TU_DEBUG over the prefixed key in the same profile

---------

Co-authored-by: zdennisz <15849186+zdennisz@users.noreply.github.com>
Co-authored-by: maxjivi05 <maxjividen@gmail.com>
2026-11-18 12:55:22 -05:00
Kurt Himebauch 8953eea9e0 fix(battlenet): keep the launch behavior a player chose in Battle.net (#2750) 2026-11-18 00:26:07 -05:00