Bug 443230

Summary: Sensors that report used/free percentage/space are not consistently updated when a file system is mounted/unmounted
Product: [Frameworks and Libraries] ksystemstats Reporter: Patrick Silva <bugseforuns>
Component: GeneralAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: ahiemstra, nate, notmart
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: 1st video - unmounting file systems
2nd video - re-mounting file systems after re-login

Description Patrick Silva 2021-10-02 19:24:07 UTC
Created attachment 142085 [details]
1st video - unmounting file systems

SUMMARY
I use 3 internal hard disks with 5 partitions in total, all of them are mounted on boot.
Please watch the attached screen recordings.

In the first attached video I unmount 4 secondary partitions after boot, then all sensors of all file systems are still displaying the same values. I think this result is not expected.

In the second video recorded after re-login, we can notice that all
sensors of the widget titled "All Partitions" report updated values that do not take the file systems
unmounted in the first video into account. All sensors of "All Partitions" widget are
immediately updated after mounting each file system - expected behavior in my point of view.
But all sensors from the other widgets (WD, SEAGATE, WIN7, 2TB) are still missing.
They reappear after restarting plasma with 'plasmashell --replace".

STEPS TO REPRODUCE
1. use a machine with secondary partition(s) that you can unmount while the system is used
2. add 'System monitor Sensor' widget to desktop
3. open widget settings and go to 'Sensors details' section
4. click on 'Sensors' or "Text-only sensors' rows
5. click on 'Disks' category and add sensors that report used/free percentage/space of your file systems
6. click on 'Ok' button
7. unmount and re-mount your file systems

OBSERVED RESULT
Sensors that report used/free percentage/space are not consistently updated when a file system is mounted/unmounted

EXPECTED RESULT
All sensors that report used/free percentage/space should be immediately updated when a file system is mounted/unmounted

Operating System: Arch Linux
KDE Plasma Version: 5.22.90
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Patrick Silva 2021-10-02 19:41:09 UTC
Created attachment 142086 [details]
2nd video - re-mounting file systems after re-login