Created attachment 195943 [details] Plasmashell VRAM usage: System Monitor on the left and drm-total-vram from plasmashell's FD. DESCRIPTION Ksystemstats reports inflated VRAM usage. This is caused by libksysguard summing multiple DRM entries even though they are explicitly aliases (drm-memory-* and drm-resident-*). plasma-systemmonitor is especially impacted by this. STEPS TO REPRODUCE 1. Open any program that uses GPU memory (plasmashell also reproduces this). 2. Note the GPU Memory column in plasma-systemmonitor for that process (Applications or Processes tab). 3. Compare against `cat /proc/<pid>/fdinfo/* | grep -E 'drm-total-vram|drm-total-gtt'` for the same process (may not produce anything as this information is optional). OBSERVED RESULT Processes appear to be using double the amount of VRAM they should be. EXPECTED RESULT libksysguard should only count either drm-total-vram and drm-total-gtt or drm-memory-vram and drm-memory-gtt (drm-memory-* is deprecated and only used by amdgpu). SOFTWARE/OS VERSIONS Operating System: Fedora Linux 44 KDE Plasma Version: 6.7.4 KDE Frameworks Version: 6.29.0 Qt Version: 6.11.2 GPU: Radeon RX 6600 Kernel: 7.1.13-200.fc44.x86_64 ADDITIONAL INFORMATION Doc for DRM: https://www.kernel.org/doc/html/latest/gpu/drm-usage-stats.html#memory I have a fix in progress and will link a merge request here shortly.
>I have a fix in progress and will link a merge request here shortly. Nice.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libksysguard/-/merge_requests/485
Git commit f40f6ad77a46585948de4c0cf1c81bf6309dcb7d by Nate Graham, on behalf of Roan Bukaci. Committed on 02/10/2026 at 18:42. Pushed by ngraham into branch 'master'. processcore/gpu: don't double count GPU memory total/resident/memory drm keys The fdinfo interface can produce multiple drm keys that reference the same memory region, namely: drm-total-<region>, drm-resident-<region>, and the deprecated drm-memory-<region> (which is an alias to drm-resident-<region>, exposed by amdgpu). The code previously summed any drm entry based on certain prefixes, we now ignore drm-resident-<region>, and only consider drm-memory-<region> if no drm-total-<region> was found. M +36 -13 processcore/plugins/gpu/gpu.cpp https://invent.kde.org/plasma/libksysguard/-/commit/f40f6ad77a46585948de4c0cf1c81bf6309dcb7d
Git commit 689c7b6112fca1558611013d8d90530c40b73009 by Nate Graham, on behalf of Roan Bukaci. Committed on 02/10/2026 at 19:12. Pushed by ngraham into branch 'Plasma/6.8'. processcore/gpu: don't double count GPU memory total/resident/memory drm keys The fdinfo interface can produce multiple drm keys that reference the same memory region, namely: drm-total-<region>, drm-resident-<region>, and the deprecated drm-memory-<region> (which is an alias to drm-resident-<region>, exposed by amdgpu). The code previously summed any drm entry based on certain prefixes, we now ignore drm-resident-<region>, and only consider drm-memory-<region> if no drm-total-<region> was found. (cherry picked from commit f40f6ad77a46585948de4c0cf1c81bf6309dcb7d) M +36 -13 processcore/plugins/gpu/gpu.cpp https://invent.kde.org/plasma/libksysguard/-/commit/689c7b6112fca1558611013d8d90530c40b73009