-
Notifications
You must be signed in to change notification settings - Fork 0
SteamMachine DIY Control Center
This manual provides a technical breakdown of the Control Center (steamos-diy-control), a PyQt6 dashboard that provides a high-level interface to manage system configurations, hardware diagnostics, and game-specific profiles without ever needing to open a terminal.
The default tab for real-time monitoring and troubleshooting.
-
Component Filter: Instead of targeting a single service, it uses dynamic pattern matching via
journalctl -gto aggregate logs fromCORE,STEAM, andSYSTEMtags. -
Log Sanitization: Utilizes the
LogFilterclass to suppress repetitive messages and clean up timestamps/PIDs, making the logs more readable. - Export: Allows copying logs to the clipboard or exporting a comprehensive support file for troubleshooting.
Handles critical system-level operations through a simplified interface that automates complex commands using pkexec and background processes.
-
🎮 Switch to Steam (Game Mode): Triggers the transition to the Steam Deck UI session via
session_select.py. -
📝 Edit System Config (SSoT): Opens
/etc/default/steamos_diy.confusing an external graphical editor (KateorKwrite) with privilege delegation. -
🧹 Clean System Logs (Vacuum): Executes
journalctl --vacuum-time=1swith root privileges to reclaim disk space instantly. - 🔄 Reboot System: Sends an immediate reboot signal, protected by a confirmation prompt.
-
Create Full System Backup: Generates a
.tar.gzarchive of all configurations. This process runs in a separate thread to keep the UI responsive. - Restore from Archive: Restoration of the entire SteamOS-DIY configuration hierarchy from a selected backup file.
💡 Detailed Documentation: For a deep dive into the surgical backup logic, file mapping, and command-line usage, please refer to the Backup & Recovery System page.
- 🖥️ Open Konsole Terminal: Launches Konsole directly in the project directory.
-
📂 Browse Config Folder: Opens the file manager at
~/.config/steamos_diy/.
An advanced IDE for managing the global system configuration (config.yaml) with real-time safety checks.
- Syntax Highlighting: Custom highlighter for keys, values, and comments.
-
🪄 Smart Beautify: The
beautify_yaml()function performs a "Round-Trip" sanitization, converting tabs to spaces and fixing indentation while preserving comments.
-
Atomic Writing: Uses
_atomic_save()withos.renameto prevent file corruption during power loss. -
Smart Error Highlighting: Provides dual-layer feedback on syntax errors:
- 🔴 Red Highlight: The exact line where the parser failed.
- 🟠 Orange Highlight: The preceding line, helping to identify root causes like unclosed quotes.
Management of per-game profiles (AppID) via dynamic log analysis.
- Log Mining Engine: Parses system journals from the last 24 hours.
-
Performance Safety: Limiting analysis to the last 2000 log entries (
tail -n 2000) to ensure instant UI responsiveness during Regex parsing. -
Intelligent Mapping: Maps
chdirevents to Steam AppIDs to automatically identify recently launched games.
-
Instant Scaffolding: Automatically generates a YAML template with an injected
# SDY_IDheader if no profile exists for the selected game. -
State Caching: Keeps unsaved edits in memory (
view_states) while switching between profiles or templates.
| Tab | Action | Method | Logic |
|---|---|---|---|
| 0 | Load Logs | load_logs() |
journalctl -g (Pattern-based log mining) |
| 1 | Clean Logs | cleanup_logs_privileged() |
pkexec journalctl --vacuum-time=1s |
| 1 | Backup/Restore |
run_backup() / run_restore()
|
Background threading.Thread + pkexec
|
| 2 | Save Config | _atomic_save() |
os.rename (Atomic write) + YAML Validation |
| 2 | Beautify | beautify_yaml() |
ruamel.yaml Round-Trip fix |
| 3 | Scan Games | refresh_detected_games() |
Regex parsing (Limit: last 2000 lines) |
-
Comments: Grey (
#7f8c8d) -
Keys: Blue (
#3498db) -
Strings: Yellow (
#f1c40f) -
Numbers: Orange (
#e67e22) -
Errors: Red Background (
#e74c3c)
-
Red:
ERROR:andCRITICAL:tags. -
Orange:
WARNING:,DEBUG:, andSYSTEM:tags. -
Green:
STEAM:metadata. -
Blue:
CORE:project metadata.
-
SSoT Sync: On startup, variables from
/etc/default/steamos_diy.confare injected into the environment to ensure the UI and system are synchronized.
# The dashboard uses Round-Trip parsing to respect user comments
yaml_parser = YAML()
yaml_parser.preserve_quotes = True
yaml_parser.indent(mapping=2, sequence=4, offset=2)
# Logic: Load -> Modify specific keys -> Dump back to file
data = yaml_parser.load(current_text)
# ... modifications ...
yaml_parser.dump(data, file_stream)| Goal | Recommended Action |
|---|---|
| Debug a Crash | Open the Diagnostics tab and search for ERROR: or CORE: tags to identify where the session failed. |
| Verify Configuration | Use the Global Options tab; the editor will highlight syntax errors in red and orange if the YAML is invalid. |
| Real-time Monitoring | Run journalctl -u steamos_diy.service -f in a terminal to watch the Live Session Manager output. |
| System Recovery | If binary shims or links are broken, use the Restore from Archive tool in the Maintenance tab. |
| Game Specific Profile | Use the Game Overrides tab to create or edit .yaml profiles for specific Steam AppIDs. |
If you love this project, feel free to join and help us make it better!