mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
Logs: one folder per session, a device report, and credentials scrubbed
A session used to leave a loose session-<stamp>.log in Download/SteamDeck and a compositor log in a different folder entirely, with Steam's own logs copied beside the first one only if the session exited cleanly - which the sessions worth reading never do. Reports arrived needing three questions answered before anything could be read: what device, which drivers, which settings. Now each session claims Download/SteamDeck/session-<stamp>/ and everything lands in it: device.txt, session.log, wayland.log, steam.log plus steam/ in Steam mode, desktop.log in desktop mode. The folder is claimed by whoever starts first, since the activity starts the compositor before the service starts the session, and the compositor is told where to write through its environment - it opens that file once, so the service also copies it in at teardown, which covers the second and later sessions of one process. device.txt is written before the session starts, so a session that dies in its first second still says what it ran on: model, SoC, Android, kernel, cores and ceilings, RAM, the GPU as KGSL names it, the panel, the driver each half of the session chose, the runtime version, every switch in effect, and whether Android is set to kill the session's child processes. Nothing identifying is collected - no serial, no device or advertising id, no account name, no network names - and Steam's logs are scrubbed line by line on the way in, with Bannerlator's patterns: session tokens (including the bare numeric "Using JWT" form), machine-auth GUIDs, WebAPI keys, Guard codes, emails, and SteamIDs masked to their last four digits so lines still correlate. loginusers.vdf, config.vdf and the ssfn files are never copied. Also from Max: a switch to run proot without its seccomp acceleration (PROOT_NO_SECCOMP=1), for kernels that handle that filter badly - ENOSYS from calls that plainly exist is the signature, which is what the Fold's storm looks like; and the phantom-process warning above, which is his "your OS killed it".
This commit is contained in:
1 parent
13c512de0b
commit
aa047ce942
13 files changed
+516
-15
No files matched your search
@@ -17,6 +17,13 @@ export MOZ_DISABLE_SOCKET_PROCESS_SANDBOX=1 MOZ_DISABLE_UTILITY_SANDBOX=1
|
||||
# wlroots allocates through gbm on a real DRM node, which the KGSL stand-in is not: pixman
|
||||
# (software, shm) is what boots here. BL_WLR_RENDERER=vulkan/gles2 tries acceleration.
|
||||
export WLR_RENDERER=${BL_WLR_RENDERER:-pixman}
|
||||
# The desktop's own log, beside the session's, so labwc and the programs on it can be read apart
|
||||
# from the session that started them. The session log keeps the milestones either way.
|
||||
if [ -n "${BL_DEBUG_DIR:-}" ]; then
|
||||
mkdir -p "$BL_DEBUG_DIR" 2>/dev/null || true
|
||||
exec >>"$BL_DEBUG_DIR/desktop.log" 2>&1
|
||||
echo "== steamdeck-desktop $(date -u '+%Y-%m-%d %H:%M:%S UTC') renderer=$WLR_RENDERER"
|
||||
fi
|
||||
export WLR_BACKENDS=wayland
|
||||
mkdir -p "$HOME/.config/labwc" "$HOME/.config/lxqt"
|
||||
# Our defaults for labwc and the panel, refreshed every session. What a user changes in the
|
||||
|
||||
@@ -31,12 +31,18 @@ fi
|
||||
collect_steam_logs() {
|
||||
[ -n "${BL_DEBUG_DIR:-}" ] || return 0
|
||||
local steam_root=${XDG_DATA_HOME:-$HOME/.local/share}/Steam
|
||||
mkdir -p "$BL_DEBUG_DIR" 2>/dev/null || return 0
|
||||
[ -d "$steam_root/logs" ] && cp -r "$steam_root/logs" "$BL_DEBUG_DIR/steam-logs" 2>/dev/null
|
||||
[ -f "$HOME/.steam/steam/logs/steamwebhelper.log" ] && cp "$HOME/.steam/steam/logs/steamwebhelper.log" "$BL_DEBUG_DIR/" 2>/dev/null
|
||||
[ -f "$steam_root/steam.pid" ] && cp "$steam_root/steam.pid" "$BL_DEBUG_DIR/" 2>/dev/null
|
||||
echo "== steam logs copied to $BL_DEBUG_DIR"
|
||||
mkdir -p "$BL_DEBUG_DIR/steam" 2>/dev/null || return 0
|
||||
# Into steam/ beside this session's own logs. The app scrubs these line by line after the
|
||||
# session ends - they carry the account's session token and id - so nothing here is the last
|
||||
# word on what the user ends up sharing; this is just the copy that survives the runtime.
|
||||
[ -d "$steam_root/logs" ] && cp -r "$steam_root/logs/." "$BL_DEBUG_DIR/steam/" 2>/dev/null
|
||||
[ -f "$HOME/.steam/steam/logs/steamwebhelper.log" ] && cp "$HOME/.steam/steam/logs/steamwebhelper.log" "$BL_DEBUG_DIR/steam/" 2>/dev/null
|
||||
# NOT copied, ever: loginusers.vdf, config.vdf and the ssfn* files, which hold the credentials
|
||||
# themselves rather than a mention of them.
|
||||
echo "== steam logs copied to $BL_DEBUG_DIR/steam"
|
||||
}
|
||||
# A session that is killed never reaches the copy below, and those are the sessions worth reading.
|
||||
trap 'collect_steam_logs 2>/dev/null || true' TERM INT HUP
|
||||
# The driver everything in this session draws with: gamescope's compositing, the client's UI
|
||||
# (OpenGL through Zink), every game Proton launches, and in desktop mode every program on it.
|
||||
# BL_VK_DRIVER names an imported driver's ICD manifest on the Android side, which is bound into the
|
||||
|
||||
Reference in new issue
Block a user