SUMMARY Incorrect free memory reported by system memory widget STEPS TO REPRODUCE 1. Add a memory usage widget 2. Enable free memory display with line graph 3. Watch the free memory OBSERVED RESULT Comparing the free memory reported by the widget with the output of `free -k` or its equivalent `/proc/meminfo` is intriguing. Free memory shown by the system widget is not matching with what the kernel reports in the proc file system or free -k. The widget shows much higher value being free and does not negate the cached memory from free memory. EXPECTED RESULT The system widget shall report the memory metrics from /proc/meminfo accurately. SOFTWARE/OS VERSIONS $ kinfo Operating System: Kubuntu 25.10 KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.17.0 Qt Version: 6.9.2 Kernel Version: 6.17.0-7-generic (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ Ultra 7 258V Memory: 32 GiB of RAM (30.8 GiB usable) Graphics Processor: Intel® Graphics ADDITIONAL INFORMATION
Created attachment 187258 [details] Comparison of free memory reported by plasma widget vs what's reported by the kernel proc filesystem. Comparison of free memory reported by plasma widget vs what's reported by the kernel proc filesystem.
I'm afraid these numbers will never match up because they're using different methods of calculating memory. It turns out that there is no objectively correct way of measuring memory usage; it depends quite a bit on the assumptions you make about what "free" and "used" mean. Different tools make different assumptions based on what makes sense for their own uses, and hence will return slightly different numbers.