Skip to content

fix(frontend): stop UI freeze from blocking GPU-temp poll (NEEDS hardware test) - #21

Merged
Batuhan4 merged 1 commit into
combined-prs-15-17-18from
fix-ui-thread-gpu-poll
Jul 15, 2026
Merged

Batuhan4 merged 1 commit into
combined-prs-15-17-18from
fix-ui-thread-gpu-poll

Conversation

@Batuhan4

Copy link
Copy Markdown
Owner

Stacked on top of #20. Fixes the one known caveat from #20: the 2 s fan/temp refresh does its blocking socket .get()s on the GTK main thread, and GET_GPU_TEMP makes the backend run timeout 3 nvidia-smi when the dGPU is awake — freezing the UI up to ~3 s per tick.

Fix: run the round-trips on a worker thread and marshal the label writes back with g_idle_add; a refresh_in_flight atomic prevents overlapping workers on slow ticks.

⚠️ Needs on-hardware validation before merge. It compiles clean and warning-free, but I have no display or NVIDIA GPU to test it on. Ideally the #18 author (who added the GPU feature) smoke-tests it: labels still update every 2 s, UI stays responsive with the dGPU active, no crash on window close.

Base is the combined branch (#20) so the diff shows only this change; retarget to main once #20 merges.

🤖 Generated with Claude Code

The socket client serialises all calls on one connection, and GET_GPU_TEMP makes
the backend run 'timeout 3 nvidia-smi' when the dGPU is awake, so the four
blocking .get()s in update_fan_speeds (called from a 2s g_timeout) froze the UI
for up to ~3s per tick. Move the round-trips to a worker thread and marshal the
label writes back via g_idle_add; a refresh_in_flight guard prevents overlapping
workers when a tick runs long.

NOTE: compiles clean and warning-free, but NOT validated on hardware (no display
or NVIDIA GPU available). Needs an on-device smoke test before merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🤖 Hi @Batuhan4, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@Batuhan4
Batuhan4 marked this pull request as draft July 15, 2026 10:25
@github-actions

Copy link
Copy Markdown

🤖 I'm sorry @Batuhan4, but I was unable to process your request. Please see the logs for more details.

@Batuhan4
Batuhan4 merged commit 08cb5da into combined-prs-15-17-18 Jul 15, 2026
5 of 6 checks passed
@SwiftyPop

Copy link
Copy Markdown

Unrelated to this, I'm confused why your repo have issues tabs closed but I wanted to report the constant spam on my notification list with "CPU critical temperature" while heavy load, I'm pretty sure this is expected behavior when doing CPU heavy workloads like compiling shaders ingame & compressing files and ingame I usually get constant 84C CPU ingame, is there a way to disable this notification permanently.
image

@Batuhan4

Copy link
Copy Markdown
Owner Author

Thanks i will look into that soon and i will open the issues tab :)

@SwiftyPop

Copy link
Copy Markdown

Thanks i will look into that soon and i will open the issues tab :)

@Batuhan4 Does disabling it by systemctl --user disable --now victus-monitor.service should remove the notification entirely and doesn't interfere with the main tool?

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.

2 participants