Skip to content

Introduce per process GPU usage metrics - #535

Open
stsdc wants to merge 16 commits into
mainfrom
stsdc/process-gpu
Open

stsdc wants to merge 16 commits into
mainfrom
stsdc/process-gpu

Conversation

@stsdc

@stsdc stsdc commented May 30, 2026

Copy link
Copy Markdown
Member

This is the modified #490 to adopt recent ColumnView changes.

  • Prevent showing GPU column on unsupported hardware

Needs testing on hardware.

  • Intel (i915 driver)
  • Intel (Xe driver)
  • AMD Radeon
  • AMD Radeon (integrated)
  • nVidia
  • ARM (optional)

@stsdc stsdc mentioned this pull request May 30, 2026
6 tasks
@stsdc
stsdc force-pushed the stsdc/process-gpu branch from 05a3607 to af1e370 Compare June 10, 2026 13:35
@stsdc
stsdc marked this pull request as ready for review September 14, 2026 18:40
@stsdc

stsdc commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

Somehow the new test is not working on CI, but locally it does

# Start of Monitor tests
# Start of Managers tests
# GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
# DEBUG: ProcessDRM.vala:88: Found DRM file: /home/stsdc/projects/elementary/monitor/build/tests/assets/fdinfo/21
ok 1 /Monitor/Managers/ProcessDRM
# End of Managers tests
# End of Monitor tests

This PR is basically the same as closed #490, but I got it working for both Xe and i915 Intel GPU drivers, and, of course, amdgpu.
Since there is no support for nVidia GPU right now, I have decided to hide GPU column for unsuppported hardware.
I have used GLib.Once<Resources> to get the gpu_list from to check if we detected any GPU.

@stsdc
stsdc requested a review from a team September 14, 2026 18:57
@vjr

vjr commented Sep 15, 2026

Copy link
Copy Markdown
Member

@stsdc works on my PC with AMD dGPU. i have another PC with both iGPU and dGPU have not yet tested on that but would it be easy to add a tooltip for each process GPU percentage item label to simply say Running on integrated GPU or Running on discrete GPU something like that? Or maybe in a future PR - which I can take a stab at? :-)

Sorry, I'm unfamiliar/unable to look at why that CI test is failing.

@stsdc

stsdc commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

I have disabled the test for ProcessDRM.vala since it is failing CI. Will try to fix it in another PR.

@flodavid

Copy link
Copy Markdown

"The nVidia TU106 [GeForce RTX 2060 Rev. A] GPU was detected, but is not yet supported".
Also, there are many processes with "-1%" GPU usage. Others are at 0%.

@stsdc

stsdc commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

"The nVidia TU106 [GeForce RTX 2060 Rev. A] GPU was detected, but is not yet supported". Also, there are many processes with "-1%" GPU usage. Others are at 0%.

That's weird, it shouldn't show the GPU column if the GPU is not detected. Do you have another GPU running?

@vjr

vjr commented Sep 17, 2026

Copy link
Copy Markdown
Member

@stsdc i just now tried on my ryzen PC with iGPU and a AMD 7800XT dGPU, both charts show in the system view but only the dGPU shows utilisation, the iGPU is always 0% even if I open apps to run on it. Also, the process view GPU column is always 0% for processes that use either GPU.

@stsdc

stsdc commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

@stsdc i just now tried on my ryzen PC with iGPU and a AMD 7800XT dGPU, both charts show in the system view but only the dGPU shows utilisation, the iGPU is always 0% even if I open apps to run on it. Also, the process view GPU column is always 0% for processes that use either GPU.

could you run Monitor in debug mode and show the logs?

Also may i ask you to screenshot both views?

@flodavid

Copy link
Copy Markdown

That's weird, it shouldn't show the GPU column if the GPU is not detected. Do you have another GPU running?

Just one GPU and my CPU does not have integrated GPU

@stsdc

stsdc commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

That's weird, it shouldn't show the GPU column if the GPU is not detected. Do you have another GPU running?

Just one GPU and my CPU does not have integrated GPU

  • May I ask you to start Monitor with G_MESSAGES_DEBUG=all ./src/io.elementary.monitor and attach the output here?
  • I expect, in in the output, you will find lines like ** (io.elementary.monitor:299221): DEBUG: 23:54:14.614: ProcessDRM.vala:88: Found DRM file: /proc/117802/fdinfo/19. Could you paste the content of that file here?

@vjr
vjr added this pull request to stack #575 September 18, 2026 14:49
@vjr

vjr commented Sep 18, 2026

Copy link
Copy Markdown
Member

@stsdc i just now tried on my ryzen PC with iGPU and a AMD 7800XT dGPU, both charts show in the system view but only the dGPU shows utilisation, the iGPU is always 0% even if I open apps to run on it. Also, the process view GPU column is always 0% for processes that use either GPU.

could you run Monitor in debug mode and show the logs?

Also may i ask you to screenshot both views?

@stsdc i've opened a branch targeting this PR here: #574 with some observed hopefully improvements for you to consider, thanks!

i was mistaken that iGPU was always zero percent, upon closer observation, it looked like ALL per-process CPU and GPU percents were zero but that was just because there are so many processes and many consume under 1% such as 0.05% so i made that change if you think it's useful.

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.

3 participants