Bug 487228 - KDE shows different filesizes for drive or partition (depending on the software used)
Summary: KDE shows different filesizes for drive or partition (depending on the softwa...
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-19 10:05 UTC by Julius R.
Modified: 2025-05-19 19:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of different used space reports on drive (297.61 KB, image/png)
2024-05-19 10:05 UTC, Julius R.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julius R. 2024-05-19 10:05:48 UTC
Created attachment 169613 [details]
Screenshot of different used space reports on drive

CASE:
I have a LUKS ext4 encrypted partition with the size of 1.58TiB. It is mounted to /run/media/$USER/Data.
When trying to determine the used space / size of data in partition, KDE shows different sizes, depending on the software.

BUG (see screenshots attached):
1. Filelight and manual selection of all files and folders (including hidden items) in Dolphin both results to 593,6 GiB used space.
2. KDE partition manager declares 620,00 GiB used space.
3. System Monitor reports 674,3 GiB used space.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro Linux
Kernel: 6.8.8.2
KDE Plasma Version: 5.27.11
Qt Version: 5.15.12
Comment 1 TraceyC 2025-04-17 22:18:25 UTC
I'm sorry we weren't able to get to this yet. If this is still a problem, we need more information in order to take action on this.

Since Filelight/Dolphin, KDE Partition Manager, and System Monitor report different values for spaced used, which is correct?
Comment 2 Julius R. 2025-04-18 15:04:42 UTC
Hi Tracey,
no worries and thank you very much for looking into it!

So, in my case for my data drive (secondary drive used only for storage) terminal ($ df) reports
/dev/mapper/data 1664368716 (1K-blocks) 834427868 (Used) 745321792 (Available) 53% (Used) /run/media/xxxxxx/Data

System Monitor reports 710,7 GiB free, 55.2% used

Dolphin status bar reports 710,8 GiB free

KDE Partition Manager reports 791,39 GiB free (51% used)

To be honest, it's quite a mess and I am not sure, why :)
Comment 3 TraceyC 2025-04-18 16:51:53 UTC
Thanks for the details of your disk usage. I'll let those who are more familiar with the code used by those applications to look further into this
Comment 4 Nate Graham 2025-05-19 01:58:22 UTC
Dolphin and System Monitor are basically in sync; any difference is likely due to rounding. Seems like Partition Manager is the one that's significantly different.

Does `df -hl` give numbers closer to Dolphin and System Monitor?
Comment 5 Julius R. 2025-05-19 08:11:12 UTC
Hi Nate,
I have no idea why, but now it works. Maybe someone already commited a fix?

df -hl now reports 
/dev/mapper/data  1,9T  919G  945G  50% /run/media/knecker/E00AA1260AA0FB24

So, 945 GiB available, which is (rounded up) in line with the Dolphin status bar. Dolphin says:
944,5 GiB available.

System Monitor reports similar:
944,5 GiB available.

Bug can be closed, thank you!
Comment 6 Andrius Štikonas 2025-05-19 18:41:03 UTC
For mounted file systems, KDE Partition Manager uses QStorageInfo:
p.fileSystem().setSectorsUsed( (storage.bytesTotal() - storage.bytesFree()) / d.logicalSize());
Comment 7 TraceyC 2025-05-19 19:23:33 UTC
(In reply to Julius R. from comment #5)

> Bug can be closed, thank you!

I'm glad to hear this has been resolved! I'm closing it as requested.