mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
Merge remote-tracking branch 'droiddeck/main' into HEAD
# Conflicts: # docs/development/mali-venus.md # tools/venus/layer/layer.c # tools/venus/layer/mali_compat.h # tools/venus/layer/pipeline.c
This commit is contained in:
commit
65bdb7339f
363 files changed
+33727
-3305
No files matched your search
@@ -254,6 +254,14 @@ The former feature-level rules for Caravan SandWitch, RoboCop: Rogue City,
|
||||
ReSkate and Cyberpunk 2077 compensated for the global `12_2` override and are
|
||||
removed. Stellar Blade also uses automatic detection. The separate Deep Rock
|
||||
Galactic GDK ray-tracing opt-out and Mali bridge capability cap remain.
|
||||
|
||||
"Skip GL error checks" (under "Client interface") sets `MESA_NO_ERROR=1` for the client
|
||||
interface and Chromium apps only. Games keep Mesa's GL error checks: with
|
||||
`MESA_NO_ERROR`, an invalid call such as `glBufferData` with no buffer bound reads
|
||||
a NULL buffer object instead of returning `GL_INVALID_OPERATION`, and the game's
|
||||
render thread stops. A game profile entry, or `MESA_NO_ERROR` in the session's own
|
||||
environment, still applies to games.
|
||||
|
||||
Other picker suggestions are editable starting values and are enabled only when
|
||||
added and saved. Older or
|
||||
custom components can support a different set of options. Android Wine wrapper,
|
||||
@@ -275,7 +283,12 @@ DroidDeck instead publishes an atomic JSON snapshot at
|
||||
`/root/.config/droiddeck/game-environment.json`. Both its Valve ARM64 Proton
|
||||
wrapper and adopted third-party Proton wrappers execute `droiddeck-game-env`,
|
||||
which reads that snapshot for each real game launch and uses `execvpe` to start
|
||||
Proton. Probe prefix `compatdata/0` and non-launch verbs are unchanged. Malformed
|
||||
Proton. Probe prefix `compatdata/0` and non-launch verbs are unchanged. A game launch
|
||||
adds `tabtip.exe=d` to `WINEDLLOVERRIDES` unless the launch has `SteamDeck=1`
|
||||
or the overrides already set `tabtip.exe` (also as `*tabtip.exe` or
|
||||
`tabtip.exe.dll`): Proton's tabtip only opens Steam's
|
||||
keyboard with `SteamDeck=1`, but it always runs UI Automation queries inside the
|
||||
focused game, which crash games that answer them (Godot 4.5 AccessKit). Malformed
|
||||
configuration falls back to the inherited environment without evaluating its
|
||||
contents. Both component and environment selection normalize signed non-Steam
|
||||
prefix IDs to unsigned IDs.
|
||||
|
||||
@@ -52,6 +52,9 @@ percentage: Android's `lmkd` killed a session on a 7.5 GiB device with
|
||||
kill. A world load added 1 GiB of GPU memory in about ten seconds, and compressing 1.4 GiB took
|
||||
2.6 seconds, so the request has to leave room for both.
|
||||
|
||||
Performance > Compress idle game memory turns this off (`BL_ZRAM_IDLE=0`); launcher compression
|
||||
and the RAM cap are unaffected.
|
||||
|
||||
The session request runs when real headroom falls below a quarter of RAM (bounded to
|
||||
768–2560 MiB), or below one and a half times that with at least 1% `some` or `full avg10`
|
||||
memory stall. Real headroom subtracts positive growth in KGSL allocation, `Unevictable`, and
|
||||
|
||||
@@ -122,6 +122,11 @@ What it does, per feature:
|
||||
- The source must be memory the application has mapped; DXVK's staging memory is.
|
||||
- Decoded texels go through the layer's own staging buffers, recycled when the command buffer is reset.
|
||||
- Copies from a BC image into a buffer, and between BC and uncompressed images, are skipped with a warning.
|
||||
- `dualSrcBlend`: reports maxFragmentDualSrcAttachments 1. DXVK 2.x and 3.x require it for D3D11.
|
||||
- Fragment outputs with `Index 1` become Private, in shader modules and in inline stage code.
|
||||
- SRC1 blend factors become source alpha: `SRC1_COLOR` and `SRC1_ALPHA` → `SRC_ALPHA`, their `ONE_MINUS_` forms → `ONE_MINUS_SRC_ALPHA`.
|
||||
- Pipelines and `vkCmdSetColorBlendEquationEXT` both.
|
||||
- Why alpha: output 0's color is the paint, its alpha is the usual coverage. Per-channel coverage collapses to one value; blending stays plain alpha blending, not tinted by the paint.
|
||||
|
||||
The SPIR-V version the driver gets:
|
||||
- The phone's own driver compiles the guest's SPIR-V, and its compiler is old: on the MT6897
|
||||
@@ -148,7 +153,7 @@ The SPIR-V version the driver gets:
|
||||
Files:
|
||||
- `layer.c`: loader plumbing, feature and limit reporting, device creation, the hook table.
|
||||
- `pipeline.c`: pipelines, shader modules, viewports.
|
||||
- `spirv.c`: the SPIR-V rewriter for clip and cull distances, and the version cap.
|
||||
- `spirv.c`: the SPIR-V rewriter for clip and cull distances and the second blend source, and the version cap.
|
||||
- `bc.c`: BC formats, images and uploads.
|
||||
- `VkLayer_droiddeck_mali_compat.json`: implicit layer manifest.
|
||||
|
||||
@@ -164,9 +169,9 @@ How it ships:
|
||||
- Guest paths: `usr/local/lib/droiddeck-mali/` and `usr/local/share/vulkan/implicit_layer.d/`.
|
||||
|
||||
Not done yet:
|
||||
- Unit tests for the clip and cull distance rewrite. The version cap has one
|
||||
(`tools/tests/test_mali_compat_spirv.py`); the distance rewrite is untested beyond DXVK's shaders,
|
||||
and unknown whether Silksong's shaders used clip distances at all.
|
||||
- Unit tests for the clip and cull distance rewriter. It is untested beyond DXVK's shaders, and unknown whether Silksong's shaders used clip distances at all.
|
||||
- The dual-source rewrite has them: `tools/tests/test_mali_compat_layer.py`.
|
||||
- The version cap has them: `tools/tests/test_mali_compat_spirv.py`.
|
||||
- Performance: BC decoding on the CPU makes loads slow. A compute-shader decoder would be the next step.
|
||||
|
||||
## Changes on the branch
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# Pen input
|
||||
|
||||
A pen on the phone's screen, or an external drawing tablet, drives the session's pointer like a mouse: hover moves
|
||||
the pointer, the tip holds the left button and the side button right-clicks. Fingers keep their touch mode.
|
||||
|
||||
The settings are a "Pen" group after the touch settings, in the Steam and Desktop sheets' **Controls** tab and on
|
||||
the session drawer's **Controller** page. The group is shown once the phone has a stylus device or a pen event was
|
||||
seen; the first of either sets `penSeen`, which a settings reset keeps. Before Android 14 every touchscreen whose
|
||||
driver reports a tool type has the stylus source, pen or not, so there a touchscreen counts only with its first pen
|
||||
event.
|
||||
|
||||
## Modes
|
||||
|
||||
`pen`: Mouse (default) or Touch.
|
||||
|
||||
| | Mouse | Touch |
|
||||
|---|---|---|
|
||||
| Hover | moves the pointer and the cursor | ignored |
|
||||
| Tip | holds the left button | a finger in the current touch mode |
|
||||
| Side button | as the Side button setting says | ignored; a Bluetooth pen key is an ordinary key |
|
||||
|
||||
- With the picture on the glasses, or while a program in gamescope holds a pointer lock, Mouse drives the touchpad
|
||||
as a finger does: a tap clicks and a drag moves the pointer relatively.
|
||||
- App UI on top (the drawer, achievements, input settings, picture in picture) takes the pen as Android input, as
|
||||
it takes a mouse.
|
||||
- The Touch column is for a pen on the phone's screen. In Touch an external tablet stays on the mouse path, so its
|
||||
hover moves the pointer. The stylus rules under Android capture apply in both modes.
|
||||
- A touch mode change ends the pen whatever its route, so it cannot leave a pen click held
|
||||
([#318](https://github.com/Droid-Deck/DroidDeck/issues/318)).
|
||||
|
||||
## Side button
|
||||
|
||||
`penButton`: Right click (default), Middle click or Off. It applies to the pen's first barrel button. A second
|
||||
barrel button, where a pen has one, sends the other click: middle when the setting is Right click, right otherwise.
|
||||
Off sends nothing. The row is hidden in Touch.
|
||||
|
||||
Some pens send their button as a key from a separate Bluetooth keyboard; the OPPO AI Pen sends `KEYCODE_F21`. Such a
|
||||
key is the side button when its device is external, keyboard-only and not alphabetic, and has a word starting with
|
||||
"pen" or "stylus" in its name. In Mouse the pen always takes it, so neither the program nor the key bindings see
|
||||
it, and it acts only while the pen is near: a key held when the pen comes back presses the button. Pause, focus
|
||||
loss, pointer-capture loss and removing its device forget it. In Touch it is an ordinary key.
|
||||
|
||||
## Android capture
|
||||
|
||||
- Pens are found by tool type (stylus or eraser), or by `SOURCE_STYLUS` when the tool type is unknown. External
|
||||
tablets report `SOURCE_MOUSE | SOURCE_STYLUS`, so the source alone is not enough. Events that mix a finger and a
|
||||
pen are split, and the finger keeps its route.
|
||||
- Contact is taken at the top of `SessionActivity.onTouchEvent`, after the Compose UI and the on-screen controls
|
||||
declined it, so the pen presses on-screen buttons like a finger. Hover is taken in `dispatchGenericMotionEvent`
|
||||
before the mouse branch. The lower-screen game takes both.
|
||||
- With Low latency mode on (the default) the window asks for unbuffered pointer dispatch, so pen samples are not
|
||||
batched per frame. Every historical sample is forwarded in order, and `pointerSubset` keeps the history when it
|
||||
splits an event.
|
||||
- `PenStream` keeps proximity, tip and buttons. A `HOVER_EXIT` followed within 50 ms by a hover or a `DOWN` does not
|
||||
leave proximity: Android splits a landing into an exit and a down with the same time, and a digitizer can flicker
|
||||
out and in at the top of its hover range. A hover that sends no sample for 2 s leaves proximity.
|
||||
- Stylus devices are not hardware mice, so a drawing tablet does not turn on pointer capture.
|
||||
- On the desktop a hardware mouse makes KWin grab the pointer. A pen that comes near releases the grab, so it
|
||||
moves KWin's pointer, and the mouse takes the grab back when it moves after the pen has left.
|
||||
- Where the session hides the mouse pointer it also hides Android's stylus hover icon.
|
||||
|
||||
## What ends the pen
|
||||
|
||||
Everything that cancels touches: touch mode, touch route and pen setting changes, app UI opening, configuration
|
||||
changes, surface resize, the game moving between screens, picture in picture, pause, focus loss, pointer-capture
|
||||
loss and the activity's end. So do a change of the pen's own route and the removal of its device. `UP` with
|
||||
`FLAG_CANCELED` and `ACTION_CANCEL` end it at once instead of lifting into hover. Ending the pen releases every
|
||||
button and leaves proximity; `wl_pointer` has no cancel, so on the pointer a cancelled tap still clicks.
|
||||
|
||||
## Compositor
|
||||
|
||||
Each sample is one input record, type 13: the flags (in proximity, tip, right, middle) and the position in input
|
||||
space as 24.8 fixed point. A record is the pen's whole state, so the next record makes good any lost one.
|
||||
|
||||
`deliver_pen` emulates the pointer, as the touch `pointer_fallback` does: hover is motion, the tip is `BTN_LEFT`,
|
||||
the side button `BTN_RIGHT` or `BTN_MIDDLE`, and a record without the in-proximity bit releases every button. A
|
||||
button pressed or released mid-stroke keeps the implicit grab on the window the stroke started in. The
|
||||
relative-motion origin is reset when the pen comes and goes, so its jump never reaches a program as relative
|
||||
motion. Under a program's pointer lock only the buttons pass, which also covers the time before the app sees the
|
||||
lock.
|
||||
|
||||
The app logs `pen route <old> -> <new> (mode=<mode>)` and the compositor `[pen] <client> gets the pen as the
|
||||
pointer`.
|
||||
|
||||
## Limits
|
||||
|
||||
- A hardware eraser end clicks like the tip.
|
||||
- The pen and a mouse share the pointer's buttons, so a release from one ends a press of the other, as with the
|
||||
touch fallback.
|
||||
- Some systems keep the pen's button for themselves, such as Samsung's Air actions. ColorOS opens its stylus
|
||||
palette for the OPPO AI Pen's key unless that action is turned off in the system's stylus settings.
|
||||
@@ -0,0 +1,193 @@
|
||||
# Android's child-process limit and the guest session
|
||||
|
||||
Since Android 12 the platform counts the processes an app forks as "phantom processes" and
|
||||
kills them under pressure. A Wine, FEX or Steam session forks dozens of them, so this limit
|
||||
decides whether a session survives. This note records how the platform counts, what it kills,
|
||||
why the guest cannot leave the count, and what DroidDeck changes on the device.
|
||||
|
||||
## What the platform counts
|
||||
|
||||
Discovery is a cgroup scan, not a parent-child relation. For every app process the platform
|
||||
knows, it reads the cgroup member list of that process and takes every pid that is not a known
|
||||
app process as a phantom of it:
|
||||
|
||||
- `frameworks/base/services/core/java/com/android/server/am/PhantomProcessList.java:117-122`
|
||||
holds the two cgroup roots (`/acct/uid_` for cgroup v1, `/sys/fs/cgroup/uid_` for v2) and
|
||||
the `cgroup.procs` file name.
|
||||
- `PhantomProcessList.java:136-208` scans every app process; `:220-222` builds the path
|
||||
`/…/uid_<uid>/pid_<appPid>/cgroup.procs`; `:238-275` turns a pid that is not a known app
|
||||
process into a phantom of that app process.
|
||||
- The mechanism is the same in Android 12.0, 12.1, 13, 14, 15, 16 and in `main`. Only the
|
||||
path lookup moved to a native helper in 16 and `main`
|
||||
(`PhantomProcessList.java:205`).
|
||||
|
||||
DroidDeck's guest is forked by the main app process: `SessionService` starts it with
|
||||
`HostProcess.start` (`app/src/main/java/com/droiddeck/launcher/session/SessionService.kt:779`),
|
||||
and both `SessionService` and `SessionActivity` run in the main process
|
||||
(`app/src/main/AndroidManifest.xml:284-293`, `:326-329`). Every guest process is therefore a
|
||||
phantom of the main app process.
|
||||
|
||||
## What the platform kills
|
||||
|
||||
1. Count trim. When the number of phantom processes in the system passes
|
||||
`MAX_PHANTOM_PROCESSES` (32 by default, `ActivityManagerConstants.java:192`), the surplus
|
||||
is killed, starting with the phantoms whose parent app has the least importance
|
||||
(`PhantomProcessList.java:423-466`).
|
||||
2. Excessive CPU group kill. Every five minutes the platform measures each app's CPU use. For
|
||||
an app whose process state is HOME or less important (backgrounded), a phantom process that
|
||||
used more than its threshold (25, 25, 10 or 2 percent) is killed together with its phantom
|
||||
siblings **and the app process itself**
|
||||
(`ActivityManagerService.java:16114-16152`, `PhantomProcessList.java:496-515`). A
|
||||
foreground DroidDeck is exempt; a backgrounded one is not.
|
||||
|
||||
The second path is the one that ends a session without an error message in the guest log: the
|
||||
app process dies with it.
|
||||
|
||||
## The gate, and how the versions differ
|
||||
|
||||
Both paths are behind the feature flag `settings_enable_monitor_phantom_procs`, whose default
|
||||
is on. The flag is read from `Settings.Global` first
|
||||
(`frameworks/base/core/java/android/util/FeatureFlagUtils.java:68-70`, `:272-283`). When it is
|
||||
off, the trim returns early (`PhantomProcessList.java:423-427`) and the phantom CPU check is
|
||||
skipped (`ActivityManagerService.java:16117-16118`, `:16144-16148`). From 12L on it also stops
|
||||
the periodic cgroup scan that discovers phantom processes (`AppProfiler.java:1788-1829` at
|
||||
`android-12.1.0_r1`).
|
||||
|
||||
| Android | flag `settings_enable_monitor_phantom_procs` | count limit | CPU group kill |
|
||||
| --- | --- | --- | --- |
|
||||
| 12.0 (SDK 31) | does not exist | DeviceConfig `activity_manager/max_phantom_processes`, default 32 | not gated |
|
||||
| 12L (SDK 32) | exists | flag | flag |
|
||||
| 13 and later (SDK 33+) | exists | flag | flag |
|
||||
|
||||
The flag was added in 12.1. On 12.0 the count limit comes from DeviceConfig
|
||||
(`ActivityManagerConstants.java:1202-1206` in 12.0) and the CPU group kill has no gate at all
|
||||
(`ActivityManagerService.java:14237-14271` in 12.0).
|
||||
|
||||
## Why the guest cannot leave the count
|
||||
|
||||
- **Reparenting does not help.** A double fork, `setsid()` or an orphaning parent changes the
|
||||
parent and the session, not the cgroup. Cgroup membership is inherited at fork and only a
|
||||
write into another cgroup's `cgroup.procs` changes it, so the platform still finds the pid
|
||||
in the app process's cgroup and still counts it. On cgroup v2 the uid group cannot take
|
||||
processes while it has the per-process groups as children, so there is no unscanned group to
|
||||
move into.
|
||||
- **A separate `:process` service only moves the count.** The scan covers every app process the
|
||||
platform knows, so the guest tree started from another service of the same app is counted
|
||||
against that service. The manifest already has such services
|
||||
(`app/src/main/AndroidManifest.xml:78`, `:244`, `:255`), and the guest tree is one coupled
|
||||
userspace whose graphics, input and session state would not survive the split.
|
||||
- **The platform's own blind spot is out of reach.** Processes forked from an app zygote are
|
||||
skipped by the scan (`PhantomProcessList.java:153-155`), but `android.os.AppZygote` is
|
||||
`@hide` (`frameworks/base/core/java/android/os/AppZygote.java:36-38`) and hidden API
|
||||
enforcement keeps it away from apps.
|
||||
- **Detaching would break the session.** The guest tree is deliberately kept under a reaper: the
|
||||
processes that load the session library mark themselves as child subreapers, so that a
|
||||
double-forked Xwayland is reparented inside the session instead of to init, where a vendor
|
||||
kernel's orphan reaper would kill it (`tools/linuxfs/preload/subreaper.c:1-16`). A guest
|
||||
tree that leaves the app's process tree leaves that arrangement with nothing to reap it.
|
||||
|
||||
## What DroidDeck changes on the device
|
||||
|
||||
`PhantomProcessLimit` (`app/src/main/java/com/droiddeck/launcher/core/PhantomProcessLimit.kt`)
|
||||
holds the platform lever per version: the DeviceConfig count limit on SDK 31 and the flag from
|
||||
SDK 32 up (`:23-37`). `WirelessAdbFix`
|
||||
(`app/src/main/java/com/droiddeck/launcher/core/WirelessAdbFix.kt:219-228`) runs those shell
|
||||
commands over wireless debugging when the user has no computer at hand, and the gate screen
|
||||
shows the result. The names on that screen come from `strings.xml` (`phantom_title_on`
|
||||
"Child-process limit is on", `phantom_instructions_fix`, `phantom_fix_toggle`).
|
||||
|
||||
## The remaining gap on Android 12.0
|
||||
|
||||
On SDK 31 the count trim is covered by the DeviceConfig write, but the backgrounded CPU group
|
||||
kill is not: the flag does not exist there, and the CPU thresholds live in the global string
|
||||
`activity_manager_constants` (`power_check_max_cpu_1` … `power_check_max_cpu_4`), not in
|
||||
DeviceConfig. In 12.0 the DeviceConfig listener reacts to `max_phantom_processes` only
|
||||
(`ActivityManagerConstants.java:654-757`), while the thresholds are parsed from
|
||||
`Settings.Global activity_manager_constants` (`:852-892`). Raising them means rewriting that
|
||||
global string, which changes the CPU kill thresholds for every app on the device. That is a
|
||||
trade the developers have to accept; DroidDeck does not do it on its own.
|
||||
|
||||
## Probe to run on hardware
|
||||
|
||||
The mechanism above is source-verified. The probe below settles the two points a source read
|
||||
cannot: what a device actually does with detached children, and whether the app uid may write
|
||||
another cgroup's `cgroup.procs`. It needs a device with the guest running.
|
||||
|
||||
Precondition: keep `settings_enable_monitor_phantom_procs` enabled on Android 12L (SDK 32) and
|
||||
later, because disabling it also stops the cgroup scan, so no snapshot would discover either batch
|
||||
(`AppProfiler.java:1788-1829` at `android-12.1.0_r1`). Android 12.0 (SDK 31) has no such flag and
|
||||
scans unconditionally (`AppProfiler.java:1833-1834` at `android-12.0.0_r1`). An enabled flag, and
|
||||
every 12.0 device, also keeps the backgrounded CPU group kill active, which can end the guest
|
||||
together with the app process (see "What the platform kills", item 2). Keep DroidDeck in the
|
||||
foreground and stop CPU-intensive guest programs before the probe.
|
||||
|
||||
The limit counts phantom processes of every app on the device, not only the probe's, so raise it
|
||||
before anything can trim. Record the current flag and limit values first. Then raise
|
||||
`max_phantom_processes` well above any plausible device-wide count, and only after that enable the
|
||||
flag if it was disabled, because a flag enabled under the default limit of 32 can trim existing
|
||||
phantoms of every app at once. Wait for the platform to discover the existing phantoms, read the
|
||||
device-wide phantom count, and check that the limit is above that count, plus both batches (80),
|
||||
plus headroom for processes the guest and other apps start meanwhile; raise it again if not. With
|
||||
the limit at its default, starting 80 long-lived processes can trigger the platform trim and
|
||||
disrupt the guest session and processes of other apps. Restore the recorded values once the probe
|
||||
processes have exited, in reverse order: the flag first, then the limit, because lowering the limit
|
||||
schedules a trim that is skipped only while the flag is disabled.
|
||||
|
||||
Run the `sleep` loops from the app's own shell so the children run under the app uid. Run each
|
||||
`dumpsys activity processes` snapshot from an authorized ADB shell, because the app uid normally
|
||||
cannot read that dump. After each batch, record the child PIDs and wait long enough for the
|
||||
platform to discover them before taking the snapshot.
|
||||
|
||||
```sh
|
||||
# record the current values
|
||||
adb shell settings get global settings_enable_monitor_phantom_procs
|
||||
adb shell device_config get activity_manager max_phantom_processes
|
||||
|
||||
# raise the limit first, then enable the flag on SDK 32 and later
|
||||
adb shell device_config put activity_manager max_phantom_processes 1000
|
||||
adb shell settings put global settings_enable_monitor_phantom_procs true
|
||||
# after platform discovery: device-wide phantom count
|
||||
adb shell 'dumpsys activity processes | grep -i -n -A 5 phantom'
|
||||
|
||||
# from the app's own shell: attached children
|
||||
for i in $(seq 1 40); do sleep 600 & echo $!; done
|
||||
# from an authorized ADB shell, after platform discovery
|
||||
adb shell 'dumpsys activity processes | grep -i -n -A 5 phantom'
|
||||
|
||||
# from the app's own shell: detached children
|
||||
# (the middle process exits, so the child is reparented to init)
|
||||
for i in $(seq 1 40); do ( setsid sleep 600 & echo $! ) ; done
|
||||
# from an authorized ADB shell, after platform discovery
|
||||
adb shell 'dumpsys activity processes | grep -i -n -A 5 phantom'
|
||||
|
||||
# from the app's own shell
|
||||
cat /proc/<appPid>/cgroup
|
||||
|
||||
# whether the uid may move a child out of the scanned cgroup
|
||||
echo <childPid> > /sys/fs/cgroup/uid_<uid>/cgroup.procs
|
||||
|
||||
# from the app's own shell: end the probe processes
|
||||
kill <childPids>
|
||||
# restore the flag first: put the recorded value, or delete the key if it was "null"
|
||||
adb shell settings put global settings_enable_monitor_phantom_procs <recordedFlag>
|
||||
adb shell settings delete global settings_enable_monitor_phantom_procs
|
||||
# then the limit: put the recorded value, or delete the key if it was "null"
|
||||
adb shell device_config put activity_manager max_phantom_processes <recordedLimit>
|
||||
adb shell device_config delete activity_manager max_phantom_processes
|
||||
```
|
||||
|
||||
Compare the PIDs recorded for each batch with the phantom list in the snapshot taken after that
|
||||
batch. Expected from the source: both batches are counted, the detached ones included, and the
|
||||
cgroup write fails (no unscanned group, or no permission).
|
||||
|
||||
## References
|
||||
|
||||
- AOSP `frameworks/base`: `services/core/java/com/android/server/am/PhantomProcessList.java`,
|
||||
`services/core/java/com/android/server/am/ActivityManagerService.java`,
|
||||
`services/core/java/com/android/server/am/ActivityManagerConstants.java`,
|
||||
`core/java/android/util/FeatureFlagUtils.java`, checked at tags android-12.0.0_r1,
|
||||
android-12.1.0_r1, android-13.0.0_r1, android-14.0.0_r2, android-15.0.0_r1,
|
||||
android-16.0.0_r1 and `main`.
|
||||
- Pull request 1394, the OEM check of the same settings, and the issues it links, 713 and 1083.
|
||||
- Termux meets the same limit on Android 12 and solves it the same way, with detection plus
|
||||
the adb path (termux-app issues 4388 and 4857).
|
||||
@@ -296,7 +296,10 @@ it, the cloud copies before an upload replaces them, under
|
||||
A game launched before Proton has made its prefix (a first launch) gets its download deferred: the
|
||||
request is answered at once (`result=deferred reason=no-prefix`) and the download runs as soon as
|
||||
the prefix's user folder appears, within a minute. Every path logs
|
||||
`cloud <store> <id> down|up result=ok|skipped|deferred|failed files= bytes= reason=`.
|
||||
`cloud <store> <id> down|up result=ok|skipped|deferred|failed files= bytes= reason=`. A failure adds
|
||||
`detail="..."`: the exception chain with the step (`list`, `get`, `put`), HTTP status, file and the
|
||||
start of the server's error body, with URLs cut to their host and tokens, secrets and codes redacted.
|
||||
GOG uploads stage their gzip body in the app's cache folder, which is created if it is missing.
|
||||
|
||||
- **The folder:** GOG's public remote-config gives a location template per game (by its Galaxy client
|
||||
id), e.g. `<?APPLICATION_DATA_LOCAL_LOW?>/Hyperstrange/ELDERBORN`; Epic's catalog gives
|
||||
@@ -328,7 +331,10 @@ the prefix's user folder appears, within a minute. Every path logs
|
||||
migration runs once per game (`cloud_layout_<id>`), so a game that legitimately keeps a folder
|
||||
named like the location is not relocated again; a non-prefixed listing is left unchanged.
|
||||
- **The services:** GOG `cloudstorage.gog.com/v1/<user>/<client>` with a token issued to the game's
|
||||
own client (the client secret is kept at install; the Galaxy token is the fallback); Epic's
|
||||
own client (the client secret is kept at install; the Galaxy token is the fallback). Every
|
||||
cloudstorage request sends Galaxy's communication-service `User-Agent` (`GOG_CLOUD_UA`, the
|
||||
same string Heroic's gogdl and Lutris send), and PUT repeats it as `X-Object-Meta-User-Agent`;
|
||||
the bare `GOG Galaxy` value is now refused with HTTP 400 `invalid_version`. Epic's
|
||||
savesync data storage with signed read and write links (`EpicCloud` → `EpicSaveSync` → the Rust
|
||||
`epic/savesync.rs`; the template's root token and `{EpicId}` / `{AppName}` are read by
|
||||
`EpicSaveTemplate`).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Reported video memory budget
|
||||
|
||||
The Performance VRAM setting enables `VK_LAYER_DROIDDECK_vram_cap` for games and reports smaller device-local `VK_EXT_memory_budget` budgets. DXVK exposes these through DXGI's `QueryVideoMemoryInfo`, including to D3D12 games using DXVK's DXGI alongside vkd3d-proton. Games that consult this budget can choose smaller working sets. The driver still supplies real heap sizes, usage figures, memory types, and actual allocation results. DXVK also receives its existing `dxgi.maxDeviceMemory` setting, which separately reduces the adapter's advertised dedicated video memory, and, for caps below DXVK's 4096 MiB D3D9 default, `d3d9.maxAvailableMemory`, which caps the texture memory DXVK's D3D9 frontend reports, since D3D9 games do not read the DXGI setting. Higher caps leave the D3D9 setting alone so DXVK's lower per-game limits still apply. OpenGL games are not covered. A lower driver budget remains lower; the layer never increases it.
|
||||
The Performance VRAM setting enables `VK_LAYER_DROIDDECK_vram_cap` for games and reports smaller device-local `VK_EXT_memory_budget` budgets. DXVK exposes these through DXGI's `QueryVideoMemoryInfo`, including to D3D12 games using DXVK's DXGI alongside vkd3d-proton. Games that consult this budget can choose smaller working sets. The driver still supplies real heap sizes, usage figures, memory types, and actual allocation results. DXVK also receives `dxgi.maxDeviceMemory` and `dxgi.maxSharedMemory`, which separately reduce the adapter's advertised dedicated and shared video memory (on a single-heap GPU DXVK reports the heap as both, so a game adding the two would otherwise still see the whole heap as shared), and, for caps below DXVK's 4096 MiB D3D9 default, `d3d9.maxAvailableMemory`, which caps the texture memory DXVK's D3D9 frontend reports, since D3D9 games do not read the DXGI setting. Higher caps leave the D3D9 setting alone so DXVK's lower per-game limits still apply. OpenGL games are not covered. A lower driver budget remains lower; the layer never increases it.
|
||||
|
||||
This does not make vkd3d-proton automatically enforce the selected budget. In the [upstream allocator inspected during this investigation](https://github.com/HansKristian-Work/vkd3d-proton/blob/865b12ba0cc20796b3709397ce5d6d3b8a205b04/libs/vkd3d/memory.c), `heapBudget` is used for diagnostic reporting, while the [DXVK adapter](https://github.com/doitsujin/dxvk/blob/cf0a0d90f8965147741ad17dcd0b263817572ab3/src/dxgi/dxgi_adapter.cpp) returns the Vulkan budget to applications. Seeing a smaller budget in a VKD3D log verifies reporting, not reduced allocation or eviction.
|
||||
|
||||
|
||||
Reference in new issue
Block a user