hwmonitor@sylfurd v1.4.0: Add optional GPU utilization and GPU memory graphs (NVIDIA + AMD) - #8914
hwmonitor@sylfurd v1.4.0: Add optional GPU utilization and GPU memory graphs (NVIDIA + AMD)#8914wiebelhaus wants to merge 1 commit into
Conversation
… graphs (NVIDIA + AMD) Adds two new optional graphs (disabled by default): - GPU: GPU utilization percentage - GMEM: GPU memory usage Data comes from a shared poller that auto-detects the vendor: AMD GPUs are read instantly from sysfs (amdgpu gpu_busy_percent / mem_info_vram_*); NVIDIA GPUs use nvidia-smi spawned asynchronously so the UI thread never blocks (one subprocess per refresh tick, shared by both graphs). Machines without a supported GPU show n/a and the graphs stay disabled by default. Intel is not supported because i915/xe expose no unprivileged utilization counter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UUKno4V7XVo8nv95eJghdj
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect and will not replace a normal review.Found 2 potential issue(s):
|
|
Regarding the two scanner warnings ( This is also consistent with the applet's existing code: Where blocking is a real risk - the NVIDIA path, which spawns a subprocess - the implementation is fully async ( Happy to convert the sysfs reads to |
What
Adds two new optional graphs to the Graphical hardware monitor: GPU (utilization %) and GMEM (GPU memory usage). Both are disabled by default and are enabled from a new "GPU" tab in the applet settings, with the same options as the existing graphs (size, custom label, detail label).
How
A shared poller auto-detects the GPU vendor once, then feeds both graphs:
gpu_busy_percent,mem_info_vram_used,mem_info_vram_total). Instant reads, no subprocess.nvidia-smi --query-gpu=...spawned asynchronously via Gio.Subprocess, so the Cinnamon UI thread never blocks. One subprocess per refresh tick regardless of how many GPU graphs are enabled;getData()returns the previous sample.Intel GPUs are not supported: the i915/xe drivers do not expose a utilization counter readable without elevated permissions (
intel_gpu_topneeds perf access), and iGPU memory is shared system RAM. This is documented in the README.Changes
3.8/providers.js: sharedGpuPoller+GpuUtilDataProvider/GpuMemDataProvider3.8/applet.js: settings binds, graph creation, theme object entries3.8/graph.js: custom label cases for the two new graph types3.8/settings-schema.json: new GPU page with two sections (all defaults off)README.md: GPU support and requirements sectionmetadata.json: version 1.3.4 -> 1.4.0Testing
Tested on Linux Mint 22.3 (Cinnamon 6.6.5) with an NVIDIA GTX 1650 (nvidia-smi backend): graphs track utilization and VRAM correctly at 1s refresh, detail labels show % and formatted bytes, settings tab works, no errors in ~/.xsession-errors, and disabling the graphs removes them cleanly. The AMD path follows the documented amdgpu sysfs interface (same fields used by tools like radeontop); I do not have an AMD card in this machine, so review from an amdgpu user would be welcome.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UUKno4V7XVo8nv95eJghdj