Skip to content

[codex] Add optional sleep prevention to Download Mode#19

Draft
Brobert-in-aus wants to merge 1 commit into
PixelAddictUnlocked:mainfrom
Brobert-in-aus:codex/download-mode-sleep-toggle
Draft

[codex] Add optional sleep prevention to Download Mode#19
Brobert-in-aus wants to merge 1 commit into
PixelAddictUnlocked:mainfrom
Brobert-in-aus:codex/download-mode-sleep-toggle

Conversation

@Brobert-in-aus

Copy link
Copy Markdown

Summary

  • add a persisted Prevent Sleep & Hibernation option below Download Mode
  • disable the control while Download Mode is off while preserving its visible state
  • use a systemd idle:sleep inhibitor while the option and Download Mode are active
  • release the inhibitor on toggle-off, Download Mode exit, plugin unload, failure, or backend termination
  • document the new option in the README and changelog

Why

Download Mode currently blanks the display, selects the 5 W profile, and disables RGB, but SteamOS can still suspend after its idle timeout. That interrupts the download the mode is intended to leave running.

Sleep prevention remains optional and defaults to enabled. The preference is stored with the plugin settings and can be changed while Download Mode is active.

The inhibitor command watches the plugin backend PID so an unexpected Decky/plugin termination does not leave sleep blocked indefinitely.

Validation

  • python -m py_compile main.py
  • npm run build
  • npx tsc --noEmit
  • tested on a ROG Ally X running SteamOS 3.9 with Decky Loader
  • confirmed the systemd inhibitor appears while active and is removed after release
  • confirmed Ally Center reloads without backend errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant