From 416fa4876018e5fbb9c3f537ea9c353d1d8b9982 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 4 Oct 2026 18:52:40 +0200 Subject: feat(gpu): show VRAM in use as a bar with a percentage Sum drm-resident-vram0 from DRM fdinfo, the same per-client counters gputop reads, counting each drm-client-id once since a client repeats its totals on every fd it holds. One grep over /proc/*/fdinfo, about 10ms warm, sampled through new_gate every ~2s. The 12 GiB total is hardcoded: xe exposes no VRAM capacity in sysfs. Co-Authored-By: Claude Opus 5.5 --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3de25f7..b137121 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,8 @@ Seven cards cover the machine itself: - **System**: CPU load as a per-core equaliser, the CPU and motherboard model as two rows under the header, RAM used/total, and every temperature (CPU package, CCD die, NVMe and two board sensors). -- **GPU**: Arc B580 package and VRAM temperatures, and fan speed. +- **GPU**: Arc B580 package and VRAM temperatures, VRAM in use as a bar, and + fan speed. - **Disks**: `/`, `/home`, `/data` and one NFS mount per server, as usage rings, with free space and total size printed under each ring. Two servers are configured, each with the same export mounted twice; the card shows one @@ -488,10 +489,15 @@ card that computed free space as `size - used` would overstate it by exactly that reserve. **The Arc B580 reports no utilisation through any stable interface.** The `xe` -driver exposes no `gpu_busy_percent` (unlike `amdgpu`), `intel_gpu_top` refuses -the device, and `gputop` prints per-process rows with ANSI escapes, which is not -something to build a widget on. The GPU card therefore has no load bar; it shows -what the hardware actually reports rather than inventing a number. +driver exposes no `gpu_busy_percent` (unlike `amdgpu`) and `intel_gpu_top` +refuses the device. The GPU card therefore has no load bar; it shows what the +hardware actually reports rather than inventing a number. + +**VRAM in use comes from DRM fdinfo**, the per-client counters `gputop` reads: +`drm-resident-vram0` in `/proc//fdinfo/`, summed once per +`drm-client-id`. Only processes readable by conky's user are seen, so a GPU +client running as another user is not counted. The card's 12 GiB total is +hardcoded: xe puts no VRAM capacity in sysfs. **`/data` has no temperature.** It sits on a spinning disk with no hwmon chip; reading its SMART temperature would need `smartctl` as root and would spin up a -- cgit v1.2.3