SCARY memory leak with xfce4-powermanager plugin

Hi,

the xfce4-powermanager plugin uses 2.8GB of ram memory after the last stable update

Steps to reproduce:

  1. install ps_mem ( sudo pacman -S ps_mem )
  2. backup & delete your .config folder yn your home
  3. restart your machine
  4. run sudo ps_mem on your terminal

This is the result:

[salome@salome ~]$ sudo ps_mem
[sudo] password di salome: 
 Private  +   Shared  =  RAM used	Program

  4.0 KiB +  25.0 KiB =  29.0 KiB	ssh-agent
 12.0 KiB +  45.5 KiB =  57.5 KiB	Xsession
 44.0 KiB +  30.0 KiB =  74.0 KiB	crond
  4.0 KiB +  76.5 KiB =  80.5 KiB	dconf-service
  4.0 KiB +  93.5 KiB =  97.5 KiB	gvfsd-fuse
  4.0 KiB +  94.0 KiB =  98.0 KiB	gvfs-mtp-volume-monitor
  4.0 KiB +  95.0 KiB =  99.0 KiB	gvfsd-metadata
  4.0 KiB +  96.0 KiB = 100.0 KiB	gnome-keyring-daemon
  4.0 KiB + 115.5 KiB = 119.5 KiB	at-spi-bus-launcher
  4.0 KiB + 120.0 KiB = 124.0 KiB	gvfs-gphoto2-volume-monitor
 12.0 KiB + 126.0 KiB = 138.0 KiB	at-spi2-registryd
 20.0 KiB + 131.0 KiB = 151.0 KiB	gvfs-afc-volume-monitor
124.0 KiB +  31.5 KiB = 155.5 KiB	lvmetad
 28.0 KiB + 128.0 KiB = 156.0 KiB	systemd-resolved
 76.0 KiB +  93.0 KiB = 169.0 KiB	systemd-hostnamed
  4.0 KiB + 191.5 KiB = 195.5 KiB	gvfs-udisks2-volume-monitor
152.0 KiB +  54.5 KiB = 206.5 KiB	rtkit-daemon
  4.0 KiB + 306.0 KiB = 310.0 KiB	polkit-gnome-authentication-agent-1
  4.0 KiB + 336.0 KiB = 340.0 KiB	light-locker
336.0 KiB +  16.0 KiB = 352.0 KiB	anacron
  4.0 KiB + 348.0 KiB = 352.0 KiB	xfsettingsd
  4.0 KiB + 356.5 KiB = 360.5 KiB	xfce4-session
220.0 KiB + 141.5 KiB = 361.5 KiB	gvfsd
  4.0 KiB + 360.0 KiB = 364.0 KiB	panel-14-action
  4.0 KiB + 361.0 KiB = 365.0 KiB	panel-6-systray
  4.0 KiB + 370.5 KiB = 374.5 KiB	xfce4-notifyd
 24.0 KiB + 402.5 KiB = 426.5 KiB	applet.py
296.0 KiB + 136.5 KiB = 432.5 KiB	gvfsd-trash
 16.0 KiB + 424.0 KiB = 440.0 KiB	panel-10-notifi
344.0 KiB + 171.0 KiB = 515.0 KiB	gvfsd-network
428.0 KiB + 114.5 KiB = 542.5 KiB	xfconfd
364.0 KiB + 205.0 KiB = 569.0 KiB	gvfsd-dnssd
136.0 KiB + 484.0 KiB = 620.0 KiB	tumblerd
332.0 KiB + 296.5 KiB = 628.5 KiB	lightdm (2)
392.0 KiB + 372.5 KiB = 764.5 KiB	xfce4-clipman
748.0 KiB +  53.5 KiB = 801.5 KiB	ntpd
604.0 KiB + 213.5 KiB = 817.5 KiB	gpg-agent
356.0 KiB + 541.5 KiB = 897.5 KiB	gvfsd-smb-browse
784.0 KiB + 383.0 KiB =   1.1 MiB	systemd-logind
  1.0 MiB + 146.0 KiB =   1.2 MiB	cupsd
832.0 KiB + 507.5 KiB =   1.3 MiB	xfdesktop
  1.2 MiB +  92.0 KiB =   1.3 MiB	bash
  1.2 MiB + 265.5 KiB =   1.4 MiB	ModemManager
 12.0 KiB +   1.4 MiB =   1.4 MiB	nm-applet
  1.0 MiB + 439.5 KiB =   1.5 MiB	xfwm4
  1.2 MiB + 524.0 KiB =   1.7 MiB	pamac-tray
  1.2 MiB + 880.0 KiB =   2.0 MiB	xfce4-panel
  2.0 MiB + 232.5 KiB =   2.2 MiB	udisksd
  2.1 MiB +  96.5 KiB =   2.2 MiB	systemd-udevd
  1.8 MiB + 488.5 KiB =   2.3 MiB	dbus-daemon (4)
  2.5 MiB + 146.0 KiB =   2.6 MiB	colord
  2.4 MiB + 244.0 KiB =   2.7 MiB	polkitd
  2.8 MiB + 273.0 KiB =   3.0 MiB	NetworkManager
  2.9 MiB + 467.5 KiB =   3.3 MiB	panel-8-pulseau
  3.5 MiB + 494.5 KiB =   3.9 MiB	systemd-journald
  4.1 MiB + 275.5 KiB =   4.4 MiB	pulseaudio
  4.8 MiB + 724.5 KiB =   5.5 MiB	sudo
  4.9 MiB + 634.5 KiB =   5.5 MiB	xfce4-terminal
  3.2 MiB +   2.3 MiB =   5.5 MiB	systemd (3)
 12.3 MiB +   1.8 MiB =  14.2 MiB	Xorg
  2.8 GiB + 483.0 KiB =   2.8 GiB	panel-9-power-m
---------------------------------
                          2.9 GiB
1 Like

And what happens if you use Status Tray Plugin? (which it also implements the powermanager) anyway good reports :+1:
Would be also good if we reports these issues on Xfce Gitlab as well; in particular, this one, should go here: Issues · Xfce / xfce4-power-manager · GitLab to have the attention of the Xfce’s developers.

And if you also encountered a big battery icon, please enjoy here: The battery icon in the panel, provided by Xfce Power Manager, is big, impossible to properly resize (#110) · Issues · Xfce / xfce4-power-manager · GitLab :slight_smile:

1 Like

Hi,
during the years, XFCE seems to become heavier and heavier, even if I use the same configuration.
On a default XFCE session (except for the leak with the power manger, previously reported) , XFCE uses around 200 mb of RAM.

My current configuration uses around 500 mb, a lot more

[salome@salome Scrivania]$ sudo ps_mem
[sudo] password di salome: 
 Private  +   Shared  =  RAM used	Program

312.0 KiB + 152.5 KiB = 464.5 KiB	lvmetad
364.0 KiB + 108.5 KiB = 472.5 KiB	rtkit-daemon
400.0 KiB +  79.0 KiB = 479.0 KiB	crond
680.0 KiB +  31.0 KiB = 711.0 KiB	ssh-agent
804.0 KiB + 206.0 KiB =   1.0 MiB	gvfsd-metadata
880.0 KiB + 150.5 KiB =   1.0 MiB	dconf-service
  1.0 MiB + 155.5 KiB =   1.2 MiB	xfconfd
  1.0 MiB + 254.5 KiB =   1.2 MiB	at-spi-bus-launcher
648.0 KiB + 616.5 KiB =   1.2 MiB	Xsession
  1.0 MiB + 251.0 KiB =   1.3 MiB	at-spi2-registryd
  1.3 MiB +  97.5 KiB =   1.4 MiB	gpg-agent
  1.1 MiB + 448.5 KiB =   1.5 MiB	gvfsd
  1.3 MiB + 311.0 KiB =   1.6 MiB	gvfs-gphoto2-volume-monitor
  1.1 MiB + 628.0 KiB =   1.7 MiB	bash
  1.6 MiB + 207.5 KiB =   1.8 MiB	ntpd
  1.4 MiB + 504.5 KiB =   1.9 MiB	gvfsd-trash
  1.2 MiB + 706.5 KiB =   1.9 MiB	systemd-logind
  1.5 MiB + 580.0 KiB =   2.1 MiB	gvfs-afc-volume-monitor
  2.1 MiB + 660.5 KiB =   2.8 MiB	sudo
  2.9 MiB + 200.0 KiB =   3.1 MiB	gvfs-mtp-volume-monitor
  2.4 MiB + 906.0 KiB =   3.3 MiB	cupsd
  2.6 MiB + 831.5 KiB =   3.4 MiB	gvfs-udisks2-volume-monitor
  2.6 MiB + 886.0 KiB =   3.5 MiB	polkit-gnome-authentication-agent-1
  2.7 MiB + 870.0 KiB =   3.5 MiB	xfce4-mime-helper
  2.8 MiB + 912.0 KiB =   3.7 MiB	xfce4-notifyd
  3.2 MiB + 857.5 KiB =   4.0 MiB	dbus-daemon (4)
  2.9 MiB +   1.2 MiB =   4.0 MiB	lightdm (2)
  3.9 MiB + 547.5 KiB =   4.5 MiB	systemd-udevd
  4.5 MiB + 532.5 KiB =   5.1 MiB	ModemManager
  5.2 MiB + 186.0 KiB =   5.4 MiB	gvfsd-fuse
  4.4 MiB +   1.1 MiB =   5.5 MiB	udisksd
  5.2 MiB + 605.5 KiB =   5.8 MiB	systemd-journald
  6.8 MiB + 427.0 KiB =   7.2 MiB	colord
  6.7 MiB +   1.0 MiB =   7.7 MiB	light-locker
  6.9 MiB +   1.2 MiB =   8.1 MiB	panel-6-systray
  7.3 MiB +   1.1 MiB =   8.3 MiB	xfce4-session
  4.4 MiB +   4.4 MiB =   8.7 MiB	systemd (3)
  7.4 MiB +   1.6 MiB =   9.0 MiB	NetworkManager
  8.7 MiB + 960.5 KiB =   9.7 MiB	pulseaudio
  8.5 MiB +   1.8 MiB =  10.2 MiB	panel-5-datetim
  9.2 MiB +   1.0 MiB =  10.3 MiB	xfsettingsd
 11.5 MiB +   2.3 MiB =  13.7 MiB	panel-2-actions
 11.7 MiB +   2.2 MiB =  13.8 MiB	xfce4-clipman
 11.6 MiB +   2.2 MiB =  13.9 MiB	panel-16-places
 14.4 MiB + 446.5 KiB =  14.8 MiB	polkitd
 14.2 MiB +   2.9 MiB =  17.1 MiB	xfce4-terminal
 14.4 MiB +   2.8 MiB =  17.2 MiB	panel-9-pulseau
 14.5 MiB +   2.9 MiB =  17.4 MiB	xfce4-panel
 15.5 MiB +   3.0 MiB =  18.6 MiB	pamac-tray
 15.9 MiB +   3.4 MiB =  19.4 MiB	panel-1-whisker
 17.8 MiB +   3.2 MiB =  21.0 MiB	nm-applet
 20.3 MiB +   2.8 MiB =  23.1 MiB	applet.py
 23.1 MiB +   1.2 MiB =  24.3 MiB	systemd-resolved
 24.9 MiB +   2.9 MiB =  27.7 MiB	xfdesktop
 32.7 MiB +  14.6 MiB =  47.3 MiB	xfwm4
 35.4 MiB +  12.9 MiB =  48.2 MiB	Xorg
---------------------------------
                        497.0 MiB

Is the same thing happening to you? This configuration once used to consume 380 mb of RAM…

Currently I have an uptime of four days.
Output of ps_mem without graphical applications launched (eg browser, file manager and so on - well, there is only Xfce Terminal) :

Private  +   Shared  =  RAM used	Program

188.0 KiB +  36.5 KiB = 224.5 KiB	agetty
376.0 KiB + 100.5 KiB = 476.5 KiB	rtkit-daemon
392.0 KiB +  93.5 KiB = 485.5 KiB	incrond
  1.1 MiB + 255.5 KiB =   1.4 MiB	gvfsd
  1.3 MiB + 138.5 KiB =   1.4 MiB	gvfsd-fuse
  1.4 MiB + 122.5 KiB =   1.5 MiB	xfconfd
  1.3 MiB + 291.5 KiB =   1.5 MiB	gvfsd-dnssd
  1.4 MiB + 321.5 KiB =   1.7 MiB	gvfsd-computer
  1.1 MiB + 656.5 KiB =   1.8 MiB	rngd
  1.6 MiB + 313.5 KiB =   1.9 MiB	gvfsd-trash
  1.6 MiB + 377.5 KiB =   2.0 MiB	gvfsd-network
  1.4 MiB + 710.5 KiB =   2.1 MiB	systemd-logind
  1.8 MiB + 459.5 KiB =   2.2 MiB	thermald
  2.2 MiB + 240.5 KiB =   2.4 MiB	gvfsd-metadata
  2.0 MiB + 454.5 KiB =   2.4 MiB	sudo
  2.4 MiB + 235.5 KiB =   2.7 MiB	picom
  2.2 MiB + 454.5 KiB =   2.7 MiB	gvfsd-http
  2.9 MiB +  46.5 KiB =   2.9 MiB	xbindkeys
  2.3 MiB + 826.5 KiB =   3.1 MiB	gvfs-udisks2-volume-monitor
  2.5 MiB + 733.5 KiB =   3.2 MiB	upowerd
  3.5 MiB + 119.5 KiB =   3.6 MiB	dconf-service
  3.5 MiB + 183.5 KiB =   3.7 MiB	accounts-daemon
  3.2 MiB + 559.0 KiB =   3.8 MiB	dbus-daemon (2)
  3.2 MiB + 614.5 KiB =   3.8 MiB	systemd-udevd
  3.4 MiB + 831.0 KiB =   4.2 MiB	lightdm (2)
  3.8 MiB + 699.5 KiB =   4.5 MiB	wpa_supplicant
  4.6 MiB + 633.5 KiB =   5.2 MiB	systemd-journald
  4.9 MiB + 885.5 KiB =   5.8 MiB	udisksd
  5.7 MiB + 378.5 KiB =   6.0 MiB	gnome-keyring-daemon
  6.9 MiB + 951.5 KiB =   7.8 MiB	xfce4-volumed-pulse
  7.1 MiB +   1.1 MiB =   8.2 MiB	panel-19-systra
  7.0 MiB +   1.3 MiB =   8.3 MiB	NetworkManager
  7.6 MiB +   1.0 MiB =   8.6 MiB	xfce4-session
  8.2 MiB + 554.5 KiB =   8.7 MiB	pulseaudio
  7.8 MiB +   1.2 MiB =   8.9 MiB	xfsettingsd
  7.6 MiB +   2.0 MiB =   9.7 MiB	xfce4-notifyd
  8.4 MiB +   2.1 MiB =  10.5 MiB	xfce4-power-manager
  8.7 MiB +   2.6 MiB =  11.3 MiB	polkit-gnome-authentication-agent-1
 10.2 MiB +   1.6 MiB =  11.7 MiB	play-with-mpv
 10.6 MiB +   2.7 MiB =  13.3 MiB	nm-applet
 11.7 MiB +   2.4 MiB =  14.1 MiB	conky (3)
 14.0 MiB +  82.5 KiB =  14.1 MiB	bash
 12.1 MiB +   3.3 MiB =  15.3 MiB	xfce4-terminal
 12.0 MiB +   3.8 MiB =  15.8 MiB	systemd (3)
 14.0 MiB +   3.8 MiB =  17.7 MiB	panel-4-whisker
 18.5 MiB + 386.5 KiB =  18.9 MiB	polkitd
 15.0 MiB +   4.3 MiB =  19.2 MiB	Thunar
 18.4 MiB +   2.4 MiB =  20.9 MiB	xfce4-panel
 20.3 MiB +   2.6 MiB =  22.9 MiB	xfwm4
 21.5 MiB +   2.6 MiB =  24.1 MiB	panel-9-docklik
 24.2 MiB +   1.4 MiB =  25.6 MiB	xfdesktop
 31.3 MiB +   2.5 MiB =  33.8 MiB	autokey-gtk
 44.3 MiB +   3.2 MiB =  47.5 MiB	kdeconnectd
 47.2 MiB +   4.1 MiB =  51.3 MiB	Xorg
 83.1 MiB +  20.5 KiB =  83.1 MiB	dnscrypt-proxy
---------------------------------
                        610.2 MiB

Having 16 GB of RAM, I’m ok to rely on RAM caching as more as I can:
An interesting lecture about is here:

(below you’ll read something about my settings).

But after a fresh boot I have a lower amount of used RAM, similar to you.
I also noticed that after the last update of Stable branch, Xorg no longer exceed in the ram usage (sometimes it also used to eat 200+ MB od RAM, so to add to the total amount)

heavier and heavier

Do you feel such heaviness in general on your system?

I installed Manjaro on February 2019, and sometimes I blatantly noticed some slugginesh and hiccups here and there, especially after long uptime.
So I wanted to understand and study better the system and memory management of the Kernel (I’m not new to Linux and Unix-like OSes):

Index of /doc/Documentation/

https://www.kernel.org/doc/Documentation/sysctl/vm.txt

In this regard, after hours, days and weeks of observations, I fined tuned some parameters:

Summary
vm.swappiness=0
vm.vfs_cache_pressure=10
vm.dirty_background_bytes=33554432
vm.dirty_bytes=134217728
vm.dirty_expire_centisecs=1000
vm.dirty_writeback_centisecs=500
vm.dirtytime_expire_seconds=1800
vm.overcommit_memory=2
vm.overcommit_ratio=90
vm.max_map_count=262144
vm.watermark_scale_factor=1
net.core.bpf_jit_enable=1
vm.stat_interval=10
kernel.sched_latency_ns = 10000000
kernel.sched_migration_cost_ns = 200000
kernel.sched_min_granularity_ns = 1500000
kernel.sched_wakeup_granularity_ns = 2000000
vm.page-cluster=0

And I can say for sure that I no longer see, also during heavy I/O operations and with a lot of opened applications, any kind of slugginesh and hiccups: as I launch applications and doing file operations, the “buff/cache” value reported by free -h can increase a lot, also to 10 until 14 GB of used cache, while the value reported by ps_mem doesn’t exceed a lot (as I said, I’m ok to rely on RAM caching as more as I can)

One simple test that I used to do is to “stress” my system while doing normal operations like browsing, listen music and so on
(more info about here: Stress testing - ArchWiki - despite the fact that I didn’t overclocked anything, since my laptop doesn’t allow overclock and I am not interested in overclock)

Obviously, my settings, aren’t “universal”; are based on my hardware, my observations, my needs and testing; I’m against the online guides which we can find online, because such paramates, I repeat, cannot be universal and applycable to any system and environment.

But which I said can be applycable if the default system settings are not giving a satysfing result of how the system behave :-).

1 Like

Are you using logical volumes, if not, stop/disable/mask.