pstop icon indicating copy to clipboard operation
pstop copied to clipboard

GPU and VMem not updating.

Open raphaelmsx opened this issue 4 months ago • 1 comments

Hi! I think I found a small issue in pstop 0.5.4 on Windows 11.

The GPU monitoring itself works correctly—I can see GPU processes and utilization on the GPU tab.

However, when I stay on the main dashboard (Main tab), the GPU widget always remains at 0% (and VMem at 0B). It only resumes updating if I switch back to the GPU tab.

Network, CPU, RAM all update from the main dashboard without visiting their respective tabs, so I suspect the GPU polling may only be happening when the GPU tab is visible.

Windows 11 25H2 AMD Radeon RX 550 Single GPU (iGPU disabled on BIOS)

Thanks in advance!

raphaelmsx avatar Jul 22 '26 18:07 raphaelmsx

Hi @raphaelmsx, thanks for the precise report, and for the hunch about polling. You were exactly right.

What was wrong

The GPU counters (PDH \GPU Engine(*) and \GPU Process Memory(*)) were only sampled inside the collector when active_tab == Gpu. The header meters read from app.gpu_overall_usage / app.gpu_dedicated_mem, which nothing refreshed on the Main, I/O or Net tabs, so a GPU/VMem meter added via F2 just sat on whatever values it last saw (0% / 0B until you visited the GPU tab once, then frozen at the last GPU-tab values after you left).

The fix: 8e02ccf

The collector now asks App::needs_gpu_data() each tick, which is true on the GPU tab or on any tab where a GPU or VMem meter is part of the configured header. So with those meters in your header, the bars update every refresh on the main dashboard, same as CPU/Mem/Net. If you don't have those meters configured, nothing changes and the GPU query is never touched, so there is no cost for people who never look at GPU data.

While I was in there I also removed a leftover wmic shell-out that ran on the first GPU sample to look up the adapter name. It was never displayed anywhere, and wmic no longer ships on 25H2 (which you're on), so it was pure dead weight.

Verification

I added a regression test (gpu_meters_update_outside_gpu_tab) that builds a collector, sets active_tab = Main with GPU + VMem meters in the header, refreshes a few times, and asserts the dedicated-memory total and per-process GPU list are populated. It passes against real PDH counters on my machine, and the same test asserts that a header without those meters does not trigger GPU sampling.

This is on master now and will be in the next release. Thanks again!

psmux avatar Sep 23 '26 08:09 psmux