diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-12 19:07:18 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-12 19:07:18 +0100 |
| commit | fda4e7847bb5dc985404269c81400eead52b0181 (patch) | |
| tree | 724fb032a3809c9cdde521775b4d4f28ce684c95 /desktop/modules/perf/Perf.qml | |
| parent | 13f04c0d3188f9f974986225486c01f91cd18701 (diff) | |
| download | quickshell-fda4e7847bb5dc985404269c81400eead52b0181.tar.gz quickshell-fda4e7847bb5dc985404269c81400eead52b0181.zip | |
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/Perf.qml')
| -rw-r--r-- | desktop/modules/perf/Perf.qml | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/desktop/modules/perf/Perf.qml b/desktop/modules/perf/Perf.qml index 5fcf0ab..33b5cbc 100644 --- a/desktop/modules/perf/Perf.qml +++ b/desktop/modules/perf/Perf.qml @@ -56,6 +56,9 @@ Singleton { property var temps: [] // [{label, value, warn, crit}], value null if unread property var disks: [] // Perf.js df rows property var vram: null // bytes + property var gpu: null // gpuSample, the last scan + property var gpuRender: null // percent, rcs + property var gpuCompute: null // percent, ccs property var fan: null // rpm property var rx: [] // bytes/s, newest last property var tx: [] @@ -181,18 +184,27 @@ Singleton { root.temps = t; if (fanView.path) { fanView.reload(); root.fan = root.num(fanView); } - if (!vramProc.running) vramProc.running = true; + if (!gpuProc.running) gpuProc.running = true; } } // ponytail: a shell glob over every fd on the system, ~14ms every 2s, // always; gate it on the panel again if that shows up. Only the user's own processes are readable, so a // system service's GPU use is not counted, as in conky. - // Summed in vram.sh, so JS gets one number, never the scan itself. + // Summed in gpu.sh, so JS gets five numbers, never the scan itself. Process { - id: vramProc - command: ["sh", `${Quickshell.shellDir}/modules/perf/vram.sh`] - stdout: StdioCollector { onStreamFinished: root.vram = text.trim() === "" ? null : Number(text) } + id: gpuProc + command: ["sh", `${Quickshell.shellDir}/modules/perf/gpu.sh`] + stdout: StdioCollector { + onStreamFinished: { + const cur = P.gpuSample(text); + const l = P.gpuLoad(root.gpu, cur); + root.vram = cur ? cur[0] : null; + root.gpuRender = l.render; + root.gpuCompute = l.compute; + root.gpu = cur; + } + } } // --- network ------------------------------------------------------------ |
