Skip to content

nvidia: merge processes reported as both graphics and compute - #538

Open
wuzhonglijz wants to merge 2 commits into
Syllo:masterfrom
wuzhonglijz:fix-duplicate-gc-processes
Open

wuzhonglijz wants to merge 2 commits into
Syllo:masterfrom
wuzhonglijz:fix-duplicate-gc-processes

Conversation

@wuzhonglijz

Copy link
Copy Markdown

A process using the GPU for both graphics and compute is returned by nvmlDeviceGetGraphicsRunningProcesses and nvmlDeviceGetComputeRunningProcesses, so it was listed twice with the same PID and memory. Utilization samples only matched the first entry, so the second always showed 0%.

The first commit merges entries with the same PID and ORs their type, the same way the fdinfo/xe/msm backends already do.

The second commit renames the combined type label from "Both G+C" to "Gfx+Comp", which is more in line with "Graphic" and "Compute" and still fits the 8-character TYPE column. It's separate so it can be dropped if you prefer the current label. The JSON output (graphic & compute) is unchanged.

Tested on an RTX 4090 with KDE Plasma (Wayland): kwin_wayland and 3 other processes were listed as both graphic and compute. With this PR the list goes from 15 rows to 11, each of those shown once as Gfx+Comp with unchanged memory.

Fixes #530

A process that uses the GPU for graphics and compute is returned by both
nvmlDeviceGetGraphicsRunningProcesses and
nvmlDeviceGetComputeRunningProcesses, so it was listed twice with the
same PID and memory. Utilization samples only matched the first entry,
leaving the second one at 0%.

Merge entries with the same PID and combine their type, which the
interface already displays as "Both G+C".

Fixes Syllo#530
"Both G+C" is the only process type label that uses single-letter
abbreviations, while the others spell out "Graphic" and "Compute".
"Gfx+Comp" names both types in the same 8-character column.
Copilot AI balanced review requested due to automatic review settings October 21, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Same process listed twice when it is in both NVML graphics and compute lists (C+G)

2 participants