Skip to content

feat(steam): pause downloads while the buttons are in use - #29

Merged
xXJSONDeruloXx merged 1 commit into
mainfrom
pause-downloads-on-input
Dec 3, 2026
Merged

xXJSONDeruloXx merged 1 commit into
mainfrom
pause-downloads-on-input

Conversation

@xXJSONDeruloXx

Copy link
Copy Markdown
Owner

While Steam downloads, Big Picture moved at 0.3-2 frames/s on the RG40XX-H (quiet idle is 6.8-7.2): the download's decompression, writes and memory leave the UI paged out. Limiting the download didn't fix it: 1 MB/s gave 4.2-5.5 frames/s, 0.5 MB/s 3.4-5.2, and limiting only on input 1.0-2.3. Pausing did.

mdeck ui-fixes now pauses downloads at the first button press during a download, and continues them 30 s after the last press. It uses Steam's own pause (EnableAllDownloads). On the device, with a 6.7 GB download running: 7.7 frames/s in the first 30 s, then 12.0, and the download continued 38 s after the last press.

It leaves these alone:

  • downloads while the Downloads page is open;
  • a download the user resumed;
  • anything that was already paused.

A pause left behind by a Steam restart is undone at the next start. DOWNLOAD_PAUSE_ON_INPUT=0 in /etc/steam-session.conf turns it off.

Three fixes found on the way:

  • The resume is driven by the daemon every 6 s. Steam's shared context is a busy hidden page, and its own timers ran minutes late.
  • Steam can report the pause 10 s or more late under load. The first version took that for the user resuming and left the download paused for good. The user now counts only after the pause has shown and gone again. tests/test_download_pause_js.py runs the script in Node against a fake Steam that reports late.
  • ui-fixes never reached the shared context before. Its new-document scripts need Page.enable to land after a context reload, and one script that threw kept the next from running. Each script is now registered on its own.

Tests on Linux: test_download_pause_js, test_ui_fixes_source, test_login_retry, test_ui_resume (17, all pass).

@xXJSONDeruloXx
xXJSONDeruloXx merged commit 882d286 into main Dec 3, 2026
15 checks passed
@xXJSONDeruloXx
xXJSONDeruloXx deleted the pause-downloads-on-input branch December 3, 2026 18:26
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