Bug 477687

Summary: GPU memory usage with wrong unit
Product: [Applications] plasma-systemmonitor Reporter: thernymous
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, nate, notmart, plasma-bugs
Priority: NOR    
Version: 5.27.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Attachments: System monitor showing wrong unit

Description thernymous 2023-11-28 19:40:28 UTC
Created attachment 163589 [details]
System monitor showing wrong unit

SUMMARY
***
"Used memory of all GPUs" will show with the correct numerical value but with the wrong unit appended to it: B or G instead of MiB or GiB.
***


STEPS TO REPRODUCE
1. Make system monitor show "Used memory of all GPUs" and "Used memory of GPU 1"

OBSERVED RESULT
Both monitors will show the same value with different units: e.g. 824 B and 824 MiB or 2.2 B and 2.2. GiB

EXPECTED RESULT
Both monitors showing the value with the same unit.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian GNU/Linux 12 (bookworm)
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 Bug Janitor Service 2023-12-21 12:22:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/ksystemstats/-/merge_requests/71
Comment 2 Arjen Hiemstra 2023-12-21 15:58:54 UTC
Git commit 507d692000347255012ca867289e107eddc7dd59 by Arjen Hiemstra.
Committed on 21/12/2023 at 15:00.
Pushed by ahiemstra into branch 'master'.

gpu/nvidia: Store memory values as bytes

The "all gpus" aggregate sensors use bytes as unit. However, the NVidia
sensors are set to use megabytes. This results in the aggregate sensor
using an incorrect and too low value for the "all gpu" sensors. So
instead, make sure to store the value for NVidia sensors as bytes so
aggregation is correct.

M  +7    -5    plugins/gpu/LinuxNvidiaGpu.cpp

https://invent.kde.org/plasma/ksystemstats/-/commit/507d692000347255012ca867289e107eddc7dd59