Skip to content

tray: run nvidia-smi only once the GPU stays awake - #16

Merged
sqmagellan merged 1 commit into
mainfrom
fix/smi-after-awake
Oct 23, 2026
Merged

sqmagellan merged 1 commit into
mainfrom
fix/smi-after-awake

Conversation

@sqmagellan

Copy link
Copy Markdown
Owner

For 0.9.7. In Optimus mode other programs wake the GPU for a fraction of a second at a time. The tray's 5 s poll could catch one of those wakes and start nvidia-smi just as the GPU went back to D3, which woke it again.

  • nvidia-smi now waits until the GPU has been awake for two polls in a row (SMI_AWAKE_POLLS), and checks the power state once more just before it starts.
  • An unreadable power state still allows the sample, as before. In dGPU-only mode the only change is that the first watts reading comes one poll later.
  • CHANGELOG: one sentence in the existing GPU temperature entry.

Seen on 0x029F (2026-10-23) with the graphics kernel's power events: in a 60 s window with nothing else waking the GPU, one of its three wakes was the tray's nvidia-smi.

🤖 Generated with Claude Code

In Optimus mode other programs wake the GPU for a fraction of a second.
The tray's 5 s poll could catch one of those wakes and start nvidia-smi
just as the GPU went back to D3, waking it again. Wait for two awake
polls in a row and check once more before starting the process. An
unreadable power state still allows the sample, as before.
@sqmagellan
sqmagellan merged commit 0747455 into main Oct 23, 2026
4 checks passed
@sqmagellan
sqmagellan deleted the fix/smi-after-awake branch October 23, 2026 20:06
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