This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-13 21:27:42 -04:00
1 parent 4163b31b02
commit 83ec5708ed
852 files changed
+4844 -46144

No files matched your search

-14
View File
@@ -1,15 +1,3 @@
// libtracefs.so.1 for mangoapp: the GPU memory Valve's overlay reads, without the kernel's tracing.
//
// Valve's mangoapp (msm.cpp, ftrace_gpumem.c) takes the GPU's memory in use - the VRAM and PVRAM
// lines - from the gpu_mem_total tracepoint (pid 0, the device's total) through libtracefs. An
// Android app may not use tracefs at all: the instance could not be made, and both lines read 0.
// This stands in for the libtracefs calls mangoapp makes, and hands its record walker one
// gpu_mem_total record carrying what the app writes to /run/droiddeck-hud/gpu-mem (bytes; the
// session's GpuMemComponent, from KGSL's own accounting). Only mangoapp loads this copy.
//
// The walker reads libtraceevent's structures directly, so the ones below are libtraceevent
// 1.8.2's (event-parse.h), the version tools/mangoapp/packages.txt pins; tep_find_event_by_record
// and tep_read_number are answered here too, ahead of the real libtraceevent in mangoapp's lookup.
#include <sched.h>
#include <stddef.h>
@@ -76,7 +64,6 @@ struct tep_record {
void *priv;
};
// gpu_mem_total's record: gpu_id, pid, size - as the kernel lays it out after the common fields.
struct gpu_mem_total {
unsigned int gpu_id;
unsigned int pid;
@@ -90,7 +77,6 @@ static struct tep_format_field pid_field = {
static struct tep_event gpu_mem_event = {
.name = "gpu_mem_total", .system = "gpu_mem", .format = {.nr_fields = 2, .fields = &pid_field}};
// Never dereferenced by mangoapp: they only have to be non-null.
static char handle;
static char instance;
-10
View File
@@ -1,15 +1,5 @@
#!/bin/sh
# gamescope --mangoapp runs `mangoapp` from PATH; this puts Valve's build beside the libraries the
# runtime lacks (fmt 10, spdlog 1.13, glfw, libtracefs, libtraceevent), staged by the app.
# mangoapp reads its window through GLFW's X11 API. GLFW 3.4 takes XDG_SESSION_TYPE=wayland with a
# WAYLAND_DISPLAY as Wayland-only, and unset, libwayland falls back to wayland-0 - DroidDeck's own
# compositor, which shares XDG_RUNTIME_DIR - so both fail; x11 makes GLFW use gamescope's X server.
export XDG_SESSION_TYPE=x11
# gamescope's reaper restarts mangoapp the moment it exits, with no backoff. One that dies at start
# (a stale session preload without the System V queue, a driver it crashes on) was started about
# once a second for the whole session, each start a full exec under proot - the Steam menu itself
# lagged. More than 5 starts in 60 s leaves the overlay off: this waits instead of exiting, so the
# reaper has nothing to restart until the session ends.
starts=/tmp/droiddeck-mangoapp-starts
now=$(date +%s)
recent=$(awk -v now="$now" '$1 > now - 60' "$starts" 2>/dev/null)
-7
View File
@@ -1,12 +1,5 @@
# Valve's aarch64 mangoapp (the Deck performance overlay) and the libraries it needs that the
# runtime does not have, at the versions it was built against (its .BUILDINFO: fmt 10.2.0,
# spdlog 1.13.0). CI fetches each, checks the sha256 and stages the files named below into the apk
# under usr/local/lib/mangoapp; SessionFiles copies them into the runtime at every launch.
# sha256 url
5b203a711e4e48f01fdffaa4f5a330f8fef22f1eab865f067a3e60bd99a28a5c https://holo-packages.steamos.cloud/archlinux-deckard-hotfixes/release/0.4.x/mangohud-20260902.1-1-aarch64.pkg.tar.zst
ef7411229ea4e9b3ab4e36ac356a85b5072f362ee1de68b28d09c43f0b0ecc44 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/fmt-10.2.0-1-aarch64.pkg.tar.zst
c9bfd2c3f15071329d381b9c2061d07503c4787ceb7001b9dfbf72a23c85cb04 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/spdlog-1.13.0-1-aarch64.pkg.tar.zst
f9fae6c84a0382188f1cb20761424051593fd09b1456191cc250bd16e0a1d7a5 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/glfw-3.4-2-aarch64.pkg.tar.zst
# libtracefs is ours (libtracefs-shim.c), and reads libtraceevent's structures as 1.8.2 lays them
# out: moving libtraceevent off 1.8.2 means checking event-parse.h against the shim.
0cccdc9c92cb3cae1e37ebeb0ed20b93bb3b5000c8f955b63d0e07bd878c7018 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/libtraceevent-1%3A1.8.2-2-aarch64.pkg.tar.zst