https://bugs.kde.org/show_bug.cgi?id=525481

            Bug ID: 525481
           Summary: GPU Memory usage is inflated
    Classification: Frameworks and Libraries
           Product: ksystemstats
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 195943
  --> https://bugs.kde.org/attachment.cgi?id=195943&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to