From d88bf27de7e9102e806a6f4ea4f694ab0637530e Mon Sep 17 00:00:00 2001 From: jurassicplayer Date: Sun, 23 Nov 2025 00:25:25 -0800 Subject: [PATCH 1/5] Add script to make debug info collection easier --- scripts/collect-debug-info.sh | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 scripts/collect-debug-info.sh diff --git a/scripts/collect-debug-info.sh b/scripts/collect-debug-info.sh new file mode 100644 index 000000000..076642a67 --- /dev/null +++ b/scripts/collect-debug-info.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# chmod +x collect-debug-info.sh && collect-debug-info.sh +# Define the directory to scan +directory_to_scan="$HOME/homebrew/plugins" +system_info_file="$HOME/decky-sysinfo.txt" +backend_info_file="$HOME/decky-backend-log.txt" +frontend_info_file="$HOME/cef_log.txt" +frontend_previnfo_file="$HOME/cef_log.previous.txt" +plugin_info_file="$HOME/decky-plugin-info.txt" +archive_file="$HOME/decky-debug-info.zip" + +echo "Please wait while this script collects the following debugging information:" +echo -e "\tCollecting system information..." +echo -e "\tOS Name..." +echo -e "\tRunning command: grep ^NAME= /etc/os-release > \"$system_info_file\"" +grep ^NAME= /etc/os-release > "$system_info_file" +echo -e "\tOS Version (if it's SteamOS)..." +echo -e "\tRunning command: grep ^VERSION_ID= /etc/os-release >> \"$system_info_file\"" +grep ^VERSION_ID= /etc/os-release >> "$system_info_file" +echo -e "\tSteam Client Version (if it's SteamOS)..." +echo -e "\tRunning command: grep \"Client version:\" \"$HOME/.steam/steam/logs/steamui_system.txt\" | tail -n 1 | sed 's/^[^:]*: //' | sed 's/^/CLIENT_VERSION=/' >> \"$system_info_file\"" +grep "Client version:" "$HOME/.steam/steam/logs/steamui_system.txt" | tail -n 1 | sed 's/.*Client version: /CLIENT_VERSION=/' >> "$system_info_file" +echo "" +echo -e "\tCollecting plugin information from \"$directory_to_scan\"..." +# Loop through each subdirectory (one level deep) +for dir in "$directory_to_scan"/*/; do + # Check if package.json exists in the subdirectory + if [ -f "${dir}package.json" ]; then + # Extract name and version from the package.json file using jq + name=$(jq -r '.name' "${dir}package.json") + version=$(jq -r '.version' "${dir}package.json") + + { + # Output the name and version + echo "Directory: ${dir}" + echo "Package Name: $name" + echo "Version: $version" + echo "-----------------------------" + } >> "$plugin_info_file" + fi +done +echo -e "\tPlugin information saved to \"$plugin_info_file\"" +echo "" +echo -e "\tCollecting backend logs..." +echo -e "\tRunning command: journalctl -b0 -u plugin_loader.service > \"$backend_info_file\"" +journalctl -b0 -u plugin_loader.service > "$backend_info_file" +echo "" +echo -e "\tCollecting frontend logs..." +echo -e "\tRunning command: cp \"$HOME/.steam/steam/logs/cef_log.txt\" \"$frontend_info_file\"" +cp "$HOME/.steam/steam/logs/cef_log.txt" "$frontend_info_file" +echo -e "\tRunning command: cp \"$HOME/.steam/steam/logs/cef_log.previous.txt\" \"$frontend_previnfo_file\"" +cp "$HOME/.steam/steam/logs/cef_log.previous.txt" "$frontend_previnfo_file" +echo "" +echo "[DISCLAIMER] The frontend logs MAY contain your steam username." +echo -e "\tThe following prompt will ask for your steam username to scrub that information out of the logs" +echo -e "\tand replace it with \"anonymous\". It is IMPORTANT to ensure that you do not misspell your" +echo -e "\tusername, otherwise this scrubbing will fail to remove your username from the logs." +read -n 1 -r -s -p "Press any key to continue" +echo "" +read -p "Type your steam username and press Enter to continue: " username +echo -e "\tRunning command: sed -i \"s/$username/anonymous/Ig\" \"$frontend_info_file\"" +sed -i "s/$username/anonymous/Ig" "$frontend_info_file" +echo -e "\tRunning command: sed -i \"s/$username/anonymous/Ig\" \"$frontend_previnfo_file\"" +sed -i "s/$username/anonymous/Ig" "$frontend_previnfo_file" +echo "" +echo "Zipping up logs to \"$archive_file\". This may take a moment..." +echo -e "\tRunning command: zip -j \"$archive_file\" \"$system_info_file\" \"$plugin_info_file\" \"$backend_info_file\" \"$frontend_info_file\" \"$frontend_previnfo_file\" +" +zip -j "$archive_file" "$system_info_file" "$plugin_info_file" "$backend_info_file" "$frontend_info_file" "$frontend_previnfo_file" +echo "Finished zipping logs." +echo "" +echo "The following files are no longer needed and can be deleted:" +echo -e "\t$system_info_file" +echo -e "\t$plugin_info_file" +echo -e "\t$backend_info_file" +echo -e "\t$frontend_info_file" +echo -e "\t$frontend_previnfo_file" +read -p "Would you like this script to remove them (y/N)? " cleanup +case $cleanup in + [Yy]* ) + echo -e "\tRemoving unneeded files..." + echo -e "\tRunning command: rm \"$system_info_file\" \"$plugin_info_file\" \"$backend_info_file\" \"$frontend_info_file\" \"$frontend_previnfo_file\"" + rm "$system_info_file" "$plugin_info_file" "$backend_info_file" "$frontend_info_file" "$frontend_previnfo_file" + ;; + * ) + echo -e "\tSkipping cleanup" + ;; +esac +echo "Please upload decky-debug-info.zip when reporting decky-loader issues." \ No newline at end of file From eca85909041149c4630988400464032a4abac9f8 Mon Sep 17 00:00:00 2001 From: jurassicplayer Date: Sun, 23 Nov 2025 01:40:41 -0800 Subject: [PATCH 2/5] Slight simplification, courtesy of canitakemasoulbackpls --- scripts/collect-debug-info.sh | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/scripts/collect-debug-info.sh b/scripts/collect-debug-info.sh index 076642a67..c694e15b8 100644 --- a/scripts/collect-debug-info.sh +++ b/scripts/collect-debug-info.sh @@ -23,21 +23,18 @@ grep "Client version:" "$HOME/.steam/steam/logs/steamui_system.txt" | tail -n 1 echo "" echo -e "\tCollecting plugin information from \"$directory_to_scan\"..." # Loop through each subdirectory (one level deep) -for dir in "$directory_to_scan"/*/; do - # Check if package.json exists in the subdirectory - if [ -f "${dir}package.json" ]; then - # Extract name and version from the package.json file using jq - name=$(jq -r '.name' "${dir}package.json") - version=$(jq -r '.version' "${dir}package.json") +for dir in "$directory_to_scan"/*/package.json; do + # Extract name and version from the package.json file using jq + name=$(jq -r '.name' "$dir") + version=$(jq -r '.version' "$dir") - { - # Output the name and version - echo "Directory: ${dir}" - echo "Package Name: $name" - echo "Version: $version" - echo "-----------------------------" - } >> "$plugin_info_file" - fi + { + # Output the name and version + echo "Directory: ${dir}" + echo "Package Name: $name" + echo "Version: $version" + echo "-----------------------------" + } >> "$plugin_info_file" done echo -e "\tPlugin information saved to \"$plugin_info_file\"" echo "" From a6d8f9f3b46eb71829b19ef679f8888ada043672 Mon Sep 17 00:00:00 2001 From: jurassicplayer Date: Sun, 23 Nov 2025 06:16:19 -0800 Subject: [PATCH 3/5] Automatically get steam username for scrubbing logs from another log, courtesy of FrogTheFrog --- scripts/collect-debug-info.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/collect-debug-info.sh b/scripts/collect-debug-info.sh index c694e15b8..bb5c5e18d 100644 --- a/scripts/collect-debug-info.sh +++ b/scripts/collect-debug-info.sh @@ -48,16 +48,12 @@ cp "$HOME/.steam/steam/logs/cef_log.txt" "$frontend_info_file" echo -e "\tRunning command: cp \"$HOME/.steam/steam/logs/cef_log.previous.txt\" \"$frontend_previnfo_file\"" cp "$HOME/.steam/steam/logs/cef_log.previous.txt" "$frontend_previnfo_file" echo "" -echo "[DISCLAIMER] The frontend logs MAY contain your steam username." -echo -e "\tThe following prompt will ask for your steam username to scrub that information out of the logs" -echo -e "\tand replace it with \"anonymous\". It is IMPORTANT to ensure that you do not misspell your" -echo -e "\tusername, otherwise this scrubbing will fail to remove your username from the logs." -read -n 1 -r -s -p "Press any key to continue" -echo "" -read -p "Type your steam username and press Enter to continue: " username -echo -e "\tRunning command: sed -i \"s/$username/anonymous/Ig\" \"$frontend_info_file\"" +echo -e "\tScrubbing frontend logs to remove personal information..." +echo -e "\tRunning command: username=\$(sed -nE 's/.*OnLoginStateChange ([^ ]*).*/\1/p' $HOME/.steam/steam/logs/webhelper_js.txt | uniq)" +username=$(sed -nE 's/.*OnLoginStateChange ([^ ]*).*/\1/p' $HOME/.steam/steam/logs/webhelper_js.txt | uniq) +echo -e "\tRunning command: sed -i \"s/\$username/anonymous/Ig\" \"$frontend_info_file\"" sed -i "s/$username/anonymous/Ig" "$frontend_info_file" -echo -e "\tRunning command: sed -i \"s/$username/anonymous/Ig\" \"$frontend_previnfo_file\"" +echo -e "\tRunning command: sed -i \"s/\$username/anonymous/Ig\" \"$frontend_previnfo_file\"" sed -i "s/$username/anonymous/Ig" "$frontend_previnfo_file" echo "" echo "Zipping up logs to \"$archive_file\". This may take a moment..." From 48771bfad8a5a72f43e41db019742f002af28cc5 Mon Sep 17 00:00:00 2001 From: jurassicplayer Date: Sun, 23 Nov 2025 16:15:25 -0800 Subject: [PATCH 4/5] Scrub all usernames, if found, from the logs --- scripts/collect-debug-info.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/collect-debug-info.sh b/scripts/collect-debug-info.sh index bb5c5e18d..f5fcb10fe 100644 --- a/scripts/collect-debug-info.sh +++ b/scripts/collect-debug-info.sh @@ -49,12 +49,14 @@ echo -e "\tRunning command: cp \"$HOME/.steam/steam/logs/cef_log.previous.txt\" cp "$HOME/.steam/steam/logs/cef_log.previous.txt" "$frontend_previnfo_file" echo "" echo -e "\tScrubbing frontend logs to remove personal information..." -echo -e "\tRunning command: username=\$(sed -nE 's/.*OnLoginStateChange ([^ ]*).*/\1/p' $HOME/.steam/steam/logs/webhelper_js.txt | uniq)" -username=$(sed -nE 's/.*OnLoginStateChange ([^ ]*).*/\1/p' $HOME/.steam/steam/logs/webhelper_js.txt | uniq) -echo -e "\tRunning command: sed -i \"s/\$username/anonymous/Ig\" \"$frontend_info_file\"" -sed -i "s/$username/anonymous/Ig" "$frontend_info_file" -echo -e "\tRunning command: sed -i \"s/\$username/anonymous/Ig\" \"$frontend_previnfo_file\"" -sed -i "s/$username/anonymous/Ig" "$frontend_previnfo_file" +echo -e "\tRunning command: mapfile -t usernames < <(sed -nE 's/.*OnLoginStateChange ([^ ]*).*/\1/p' $HOME/.steam/steam/logs/webhelper_js.txt | sort | uniq)" +mapfile -t usernames < <(sed -nE 's/.*OnLoginStateChange ([^ ]*).*/\1/p' $HOME/.steam/steam/logs/webhelper_js.txt | sort | uniq) +for username in "${usernames[@]}"; do + echo -e "\tRunning command: sed -i \"s/$username/anonymous/Ig\" \"$frontend_info_file\"" + sed -i "s/$username/anonymous/Ig" "$frontend_info_file" + echo -e "\tRunning command: sed -i \"s/$username/anonymous/Ig\" \"$frontend_previnfo_file\"" + sed -i "s/$username/anonymous/Ig" "$frontend_previnfo_file" +done echo "" echo "Zipping up logs to \"$archive_file\". This may take a moment..." echo -e "\tRunning command: zip -j \"$archive_file\" \"$system_info_file\" \"$plugin_info_file\" \"$backend_info_file\" \"$frontend_info_file\" \"$frontend_previnfo_file\" From 16efba255e13e685326fb12ed8fb88c04678a78e Mon Sep 17 00:00:00 2001 From: jurassicplayer Date: Sat, 6 Jun 2026 12:54:36 -0700 Subject: [PATCH 5/5] Add exec flag and change shebang to env bash --- scripts/collect-debug-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 scripts/collect-debug-info.sh diff --git a/scripts/collect-debug-info.sh b/scripts/collect-debug-info.sh old mode 100644 new mode 100755 index f5fcb10fe..5501f5206 --- a/scripts/collect-debug-info.sh +++ b/scripts/collect-debug-info.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # chmod +x collect-debug-info.sh && collect-debug-info.sh # Define the directory to scan directory_to_scan="$HOME/homebrew/plugins"