Bug 477983 - "Total" sensor of Disk Usage widget reports incorrect value
Summary: "Total" sensor of Disk Usage widget reports incorrect value
Status: RESOLVED FIXED
Alias: None
Product: ksystemstats
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6, regression
: 480515 482602 482794 483546 483755 486051 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-03 12:14 UTC by Patrick Silva
Modified: 2024-04-24 13:06 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-12-03 12:14:50 UTC
SUMMARY
My laptop has a 240 GB SSD. However, the "Total" sensor of Disk Usage widget added to desktop reports 443,8 GiB.

STEPS TO REPRODUCE
1. add Disk Usage widget to desktop
2. 
3. 

OBSERVED RESULT
"Total" sensor reports incorrect value.

EXPECTED RESULT
"Total" sensor reports correct value.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.81.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Graphics Platform: Wayland
Comment 1 Paolo Zamponi 2023-12-03 13:23:24 UTC
Can confirm: I got 1 TB + 500 GB and it reports 2.7 GB.
Comment 2 Pesho 2024-01-03 18:51:24 UTC
The same issue occurs on openSUSE Tumbleweed. My disk is 1 TB SSD, but the "System Monitor" is showing almost 2TB (1.9 TB).

Operating System: openSUSE Tumbleweed 20231228
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1
Kernel Version: 6.6.7-1-default (64-bit)
Graphics Platform: offscreen
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

https://i.imgur.com/0x0y8Lh.jpg
Comment 3 Patrick Silva 2024-01-30 05:39:30 UTC
*** Bug 480515 has been marked as a duplicate of this bug. ***
Comment 4 Gurenko Alex 2024-01-30 12:44:23 UTC
Same here, double value for me too (512 Gb actual - 1 Tb reported)
Comment 5 Patrick Silva 2024-03-06 23:06:54 UTC
*** Bug 482602 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Silva 2024-03-08 03:19:15 UTC
*** Bug 482794 has been marked as a duplicate of this bug. ***
Comment 7 Möhsün Babayev 2024-03-10 07:50:31 UTC
Same thing started happening to me after Plasma 6 on Arch Linux (fresh install, not upgrade). It shows double total disk space (1.9TB instead of 952GB). All other sources I tried show the disk space correctly (e.g.: fastfetch, lsblk, fdisk, Dolphin, GParted, KDE Partition Manager, KDiskMark).

My root partition is the only partition on the disk (1TB SSD), apart from the 1GB ESP. It is a LUKS2 encrypted btrfs volume with a bunch of subvolumes created for Snapper.

Dolphin always shows two versions of the same partition, one encrypted and one decrypted (regular, as it should), and I have always manually hidden the encrypted one to decrease clutter.

Also, on the same configuration, GNOME always shows Disk Capacity as "Unknown", maybe that it also related.
Comment 8 Petr Velička 2024-03-14 12:34:13 UTC
The same happens for me on Arch Linux with a 1TB ssd with 2 partitions -- 256MB ESP and the rest is one big btrfs partition with two subvolumes, one for root and the other one for /home.

System monitor shows 1.9 TiB as the value for "Total Space" which is, I suppose the total is computed as the sum of all mounted disk drives, but since on my machine the same partition is mounted twice (albeit with different parameters), the total space available is thus doubled. Maybe there should be a check that only counts each physical partition/device once.

Or maybe alternatively we should only rely on the sum of the sizes of physical drives connected to the system (I think udev allows us to determine whether a drive is an internal or an external one) which would be more accurate since we don't account for partitioning of those drives.
Comment 9 Patrick Silva 2024-03-14 21:29:11 UTC
*** Bug 483546 has been marked as a duplicate of this bug. ***
Comment 10 Bug Janitor Service 2024-03-15 12:58:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/ksystemstats/-/merge_requests/79
Comment 11 Patrick Silva 2024-03-16 16:33:20 UTC
*** Bug 483755 has been marked as a duplicate of this bug. ***
Comment 12 Arjen Hiemstra 2024-03-18 11:54:32 UTC
Git commit 57822c909426880da939b1cef1754c4de11e4e13 by Arjen Hiemstra.
Committed on 18/03/2024 at 09:56.
Pushed by ahiemstra into branch 'master'.

Add support for specifying a filter function for aggregate sensors

It can be used to filter sensors that shouldn't be included in the
aggregate.

M  +15   -0    systemstats/AggregateSensor.cpp
M  +3    -0    systemstats/AggregateSensor.h

https://invent.kde.org/plasma/libksysguard/-/commit/57822c909426880da939b1cef1754c4de11e4e13
Comment 13 Arjen Hiemstra 2024-03-20 10:53:21 UTC
Git commit 36f5131aa3e18a134e0fedd15802fcc25af7cdfa by Arjen Hiemstra.
Committed on 18/03/2024 at 12:16.
Pushed by ahiemstra into branch 'master'.

disks: Filter out root devices from "all" sensors

The values for these devices are already included in the aggregated
values, so including them will lead to too high a value.

M  +45   -19   plugins/disks/disks.cpp

https://invent.kde.org/plasma/ksystemstats/-/commit/36f5131aa3e18a134e0fedd15802fcc25af7cdfa
Comment 14 Nate Graham 2024-04-10 17:44:38 UTC
*** Bug 483684 has been marked as a duplicate of this bug. ***
Comment 15 Patrick Silva 2024-04-24 13:06:32 UTC
*** Bug 486051 has been marked as a duplicate of this bug. ***