From fda4e7847bb5dc985404269c81400eead52b0181 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 12 Nov 2026 19:07:18 +0100 Subject: feat(perf): show GPU render and compute load xe exposes no busy percentage, but its DRM fdinfo carries per-engine cycle counters. vram.sh becomes gpu.sh: the same scan also sums drm-cycles-rcs/ccs per client and prints them with the GPU's cycle counter, and Perf.js turns two scans into a percentage per engine. The GPU card's headline is now the busier engine, with render (games) and compute (local LLMs) as bars, then VRAM, temperature and fan. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/perf/PerfPanel.qml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'desktop/modules/perf/PerfPanel.qml') diff --git a/desktop/modules/perf/PerfPanel.qml b/desktop/modules/perf/PerfPanel.qml index 784284a..8ea4af6 100644 --- a/desktop/modules/perf/PerfPanel.qml +++ b/desktop/modules/perf/PerfPanel.qml @@ -320,12 +320,31 @@ Column { // --- GPU ---------------------------------------------------------------- - // No utilisation: xe exposes no busy percentage. + // Busy per engine from fdinfo's cycle counters: render is games, compute + // local LLMs; the headline is the busier of the two. Card { + readonly property var busy: Perf.gpuRender === null && Perf.gpuCompute === null ? null + : Math.max(Perf.gpuRender ?? 0, Perf.gpuCompute ?? 0) title: "GPU ยท " + Perf.gpuName - headline: panel.deg(panel.gpuTemp.value) - headlineColor: panel.tone(panel.gpuTemp.value, panel.gpuTemp.warn, panel.gpuTemp.crit) + headline: busy === null ? "--" : Math.round(busy) + "%" + headlineColor: panel.tone(busy, 25, 75) + Pair { + label: "Render" + value: Perf.gpuRender === null ? "--" : Math.round(Perf.gpuRender) + "%" + } + Bar { + frac: (Perf.gpuRender ?? 0) / 100 + fill: panel.tone(Perf.gpuRender, 25, 75) + } + Pair { + label: "Compute" + value: Perf.gpuCompute === null ? "--" : Math.round(Perf.gpuCompute) + "%" + } + Bar { + frac: (Perf.gpuCompute ?? 0) / 100 + fill: panel.tone(Perf.gpuCompute, 25, 75) + } Pair { label: "VRAM" value: Perf.vram === null ? "--" : P.bytes(Perf.vram) + " / " + P.bytes(Perf.vramTotal) @@ -334,6 +353,11 @@ Column { frac: (Perf.vram ?? 0) / Perf.vramTotal fill: panel.tone(panel.pct(Perf.vram, Perf.vramTotal), 25, 75) } + Pair { + label: "Temperature" + value: panel.deg(panel.gpuTemp.value) + valueColor: panel.tone(panel.gpuTemp.value, panel.gpuTemp.warn, panel.gpuTemp.crit) + } Pair { label: "Fan" value: Perf.fan === null ? "--" : Perf.fan + " rpm" -- cgit v1.2.3