Bug 477687 - GPU memory usage with wrong unit
Summary: GPU memory usage with wrong unit
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.27.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-28 19:40 UTC by thernymous
Modified: 2023-12-23 04:24 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
System monitor showing wrong unit (49.39 KB, image/png)
2023-11-28 19:40 UTC, thernymous
Details

Note You need to log in before you can comment on or make changes to this bug.
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