KSysGuard and bunch of other app/widgets display incoherent usage

I usually monitor my ram usage whenever i’m coding stuffs that need to be compiled since i don’t have a lot of ram.
I basically use the widget on my desktop if i’m not using full screen or i use the widget in my vs code. Recently i moved to Android Studio and that widget is not available there which means I’ve to hope I’ve enough ram for that but my Android Studio started crashing and whenever i checked my desktop widget, I’ve got enough ram left which made me think something else was wrong as a result i opened up htop to verified and boom, i barely have enough ram left.

inxi -Fxz: 
System:    Kernel: 5.14.7-2-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: KDE Plasma 5.22.5 
           Distro: Manjaro Linux base: Arch Linux 
Machine:   Type: Laptop System: Acer product: Aspire A515-43 v: V1.08 serial: <filter> 
           Mobo: PK model: Grumpy_PK v: V1.08 serial: <filter> UEFI: Insyde v: 1.08 date: 04/07/2020 
Battery:   ID-1: BAT1 charge: 35.4 Wh (88.5%) condition: 40.0/47.8 Wh (83.7%) volts: 12.3 min: 11.2 
           model: LGC AP18C8K status: Charging 
CPU:       Info: Dual Core model: AMD Ryzen 3 3200U with Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen 
           rev: 1 cache: L2: 1024 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 20770 
           Speed: 2012 MHz min/max: 1400/2600 MHz boost: enabled Core speeds (MHz): 1: 2012 2: 2923 3: 2598 
           4: 1269 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Picasso vendor: Acer Incorporated ALI driver: amdgpu 
           v: kernel bus-ID: 05:00.0 
           Device-2: Chicony HD User Facing type: USB driver: uvcvideo bus-ID: 1-1:2 
           Display: x11 server: X.Org 1.20.13 driver: loaded: amdgpu,ati unloaded: modesetting 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: AMD Radeon Vega 3 Graphics (RAVEN2 DRM 3.42.0 5.14.7-2-MANJARO LLVM 12.0.1) 
           v: 4.6 Mesa 21.2.2 direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio 
           vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel bus-ID: 05:00.1 
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor 
           vendor: Acer Incorporated ALI driver: snd_pci_acp3x v: kernel bus-ID: 05:00.5 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Acer Incorporated ALI 
           driver: snd_hda_intel v: kernel bus-ID: 05:00.6 
           Sound Server-1: ALSA v: k5.14.7-2-MANJARO running: yes 
           Sound Server-2: JACK v: 1.9.19 running: no 
           Sound Server-3: PulseAudio v: 15.0 running: yes 
           Sound Server-4: PipeWire v: 0.3.37 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Acer Incorporated ALI 
           driver: r8168 v: 8.049.02-NAPI port: 2000 bus-ID: 03:00.0 
           IF: enp3s0 state: down mac: <filter> 
           Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel port: 2000 bus-ID: 04:00.0 
           IF: wlp4s0 state: up mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-4:4 
           Report: bt-adapter ID: hci0 rfk-id: 8 state: up address: <filter> 
Drives:    Local Storage: total: 1.03 TiB used: 846.25 GiB (80.5%) 
           ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN520 SDAPNUW-128G-1014 size: 119.24 GiB 
           temp: 44.9 C 
           ID-2: /dev/sda vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB 
Partition: ID-1: / size: 35.41 GiB used: 22.79 GiB (64.4%) fs: ext4 dev: /dev/nvme0n1p3 
           ID-2: /boot/efi size: 98.4 MiB used: 138 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 
           ID-3: /home size: 80.84 GiB used: 71.96 GiB (89.0%) fs: ext4 dev: /dev/nvme0n1p2 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 72.9 C mobo: N/A gpu: amdgpu temp: 72.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 255 Uptime: 1d 5h 25m Memory: 5.74 GiB used: 4.65 GiB (81.1%) Init: systemd Compilers: 
           gcc: 11.1.0 clang: 12.0.1 Packages: 1550 Shell: Zsh v: 5.8 inxi: 3.3.06 

From my screenshot you can see the is difference non-negligible and simply unacceptable.

It can depend on what the application showing RAM usage, is calculating to show RAM usage, for example in htop you have the other RAM meter, the text detailed one, which will show other result (try it, reconfigure htop and add another RAM meter, and switch it with spacebar to other type).
Some programs (especially the desktop utilities from KDE) may also have bugs, and in this case, you can open issues upstream as Manjaro can not do anything about it.

www.linuxatemyram.com has some good explanation about RAM usage in Linux.

Will try the htop stuff later. I doubt this is fully KDE issue because top and free is also showing the wrong usage.

Edit: Tried it

And you can see in the same application (htop) you can have two different results for the ram usage. Also another difference between applications could be the measuring unit used. 1Mb =/= 1MB =/= 1MiB

In term of reliability, in my opinion, the tool free would be the most reliable, followed by htop and top, and then for other tools/programs/widgets I don’t know, it would depend on many factors already pointed previously.

I see.
I noticed shared mem is the difference between all of them. Is it possible to include shared mem in all other output like htop bar as i feel that actually represent the situation better.

Another screenshot (free and htop):

You can see my ram is almost filled according to htop bars, i would prefer the used should be combined with the shared in KSysGuard and other KDE stuffs. Is that Possible?

You can create custom tabs in KSysGuard, where you can add and combine the sensors, quantities and visual presentation as however you like it.

That would be a specific fix/hack for KSysGuard along which i barely open.
The widget(first screenshot) is a plasmoid(think that’s what it’s called) which is probably using KDE API that’s why i want a general KDE fix/change, moreover that’s what i actively use to monitor my usage.

Then maybe check with the plasmoid author what his plasmoid is calculating, and if there is an issue with it.

Okay. Well I’ve gotten the info i need so will be closing this

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.