You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Closing StemDeck on Windows during GPU setup leaves pip or Python running #960
On Windows only the backend ran inside a job object that ends with the app. The pip run that installs CUDA torch and the model warmup (the first model download) did not. Closing the window in the middle left them running, still writing into python\ or the model cache. A relaunch could then start a second install, or restore the torch backup underneath the first one.
Who is affected: Windows desktop users who close StemDeck during GPU setup or the first model download.
Related: #140 (the earlier issue about an orphaned pip on window close; Windows still had this gap). PR #897 also carries a separate portable folder fix for #399.
Where
desktop/src-tauri/src/main.rs:2070run_setup_child (starts the child in a job at :2092)
Fixed in PR #897 (merged into big-release, ships with 0.21.0).
Still to check by hand on Windows: close the window during a CUDA install or the first model download, then confirm in Task Manager that no python.exe or pip process is left.
Proposed fix
What the merged fix does: pip and the model warmup start through run_setup_child, which starts the child in a kill-on-close job (backendjob::spawn_in_job) and holds the job while it runs. Windows closes the job when StemDeck exits in any way, which ends the child and anything it started. One setup child runs at a time, and none starts once the window is closing.
Verification
cargo test --manifest-path desktop/src-tauri/Cargo.toml what_a_setup_child_starts_does_not_outlive_it
cargo test --manifest-path desktop/src-tauri/Cargo.toml closing_the_window_mid_setup_ends_the_setup_child
cargo test --manifest-path desktop/src-tauri/Cargo.toml no_setup_child_starts_once_the_window_is_closing
Activity
thcp commentedon Nov 3, 2026
This is fixed in PR #897, merged into big-release. It ships with 0.21.0, so I am closing this issue now.
This comment was written with the help of AI.