aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/perf/PerfPanel.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-12 19:07:18 +0100
committerDanilo M. <danix@danix.xyz>2026-11-12 19:07:18 +0100
commitfda4e7847bb5dc985404269c81400eead52b0181 (patch)
tree724fb032a3809c9cdde521775b4d4f28ce684c95 /desktop/modules/perf/PerfPanel.qml
parent13f04c0d3188f9f974986225486c01f91cd18701 (diff)
downloadquickshell-fda4e7847bb5dc985404269c81400eead52b0181.tar.gz
quickshell-fda4e7847bb5dc985404269c81400eead52b0181.zip
feat(perf): show GPU render and compute loadHEADmaster
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/perf/PerfPanel.qml')
-rw-r--r--desktop/modules/perf/PerfPanel.qml30
1 files changed, 27 insertions, 3 deletions
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,13 +320,32 @@ 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)
}
@@ -335,6 +354,11 @@ Column {
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"
}