Make gnome light again

Manjaro gnome edition seems to have accumulated some unnecessart ram usage again. At first I thought it is all the extension (because they increase the shell startup time and slow the animations), but instead I found this:

 Private  +   Shared  =  RAM used	Program

152.0 KiB +  35.0 KiB = 187.0 KiB	xf86-video-intel-backlight-helper (2)
256.0 KiB +  93.0 KiB = 349.0 KiB	agetty (2)
384.0 KiB +  47.5 KiB = 431.5 KiB	lvmetad
396.0 KiB +  42.5 KiB = 438.5 KiB	rtkit-daemon
760.0 KiB +  82.5 KiB = 842.5 KiB	gvfsd-metadata
680.0 KiB + 261.5 KiB = 941.5 KiB	login
796.0 KiB + 169.5 KiB = 965.5 KiB	gvfs-goa-volume-monitor
924.0 KiB +  81.5 KiB =   1.0 MiB	gvfs-mtp-volume-monitor
  1.0 MiB +  97.5 KiB =   1.1 MiB	accounts-daemon
  1.1 MiB + 155.5 KiB =   1.2 MiB	gvfsd-fuse
  1.1 MiB + 211.5 KiB =   1.3 MiB	gvfsd
  1.2 MiB + 197.5 KiB =   1.4 MiB	gsd-disk-utility-notify
  1.2 MiB + 186.0 KiB =   1.4 MiB	gsd-screensaver-proxy (2)
  1.2 MiB + 260.0 KiB =   1.4 MiB	xdg-permission-store (2)
  1.3 MiB + 183.0 KiB =   1.5 MiB	gsd-mouse (2)
  1.3 MiB + 230.0 KiB =   1.5 MiB	gdm-x-session (2)
  1.5 MiB + 102.5 KiB =   1.6 MiB	bluetoothd
  1.2 MiB + 411.5 KiB =   1.6 MiB	gvfs-afc-volume-monitor
  1.4 MiB + 206.0 KiB =   1.6 MiB	gsd-rfkill (2)
  1.4 MiB + 193.0 KiB =   1.6 MiB	gsd-a11y-settings (2)
  1.5 MiB +  90.5 KiB =   1.6 MiB	mount.exfat-fuse
  1.5 MiB + 191.5 KiB =   1.6 MiB	gdm
  1.0 MiB + 720.5 KiB =   1.7 MiB	systemd-timesyncd
  1.5 MiB + 275.0 KiB =   1.8 MiB	gsd-housekeeping (2)
  1.4 MiB + 487.5 KiB =   1.9 MiB	systemd-logind
  1.8 MiB + 225.0 KiB =   2.0 MiB	at-spi-bus-launcher (2)
  1.8 MiB + 245.5 KiB =   2.1 MiB	sudo
  1.8 MiB + 312.5 KiB =   2.1 MiB	goa-identity-service
  1.9 MiB + 330.0 KiB =   2.2 MiB	at-spi2-registryd (2)
  1.8 MiB + 466.5 KiB =   2.3 MiB	upowerd
  1.8 MiB + 639.5 KiB =   2.4 MiB	geoclue
  2.2 MiB + 299.0 KiB =   2.5 MiB	gsettings-helper (2)
  2.0 MiB + 601.5 KiB =   2.6 MiB	gsd-printer
  2.2 MiB + 379.0 KiB =   2.6 MiB	gsd-sound (2)
  2.2 MiB + 380.5 KiB =   2.6 MiB	systemd-udevd
  2.5 MiB + 206.5 KiB =   2.7 MiB	gnome-keyring-daemon
  2.3 MiB + 546.5 KiB =   2.9 MiB	gvfs-udisks2-volume-monitor
  2.6 MiB + 714.0 KiB =   3.3 MiB	gsd-sharing (2)
  3.0 MiB + 618.5 KiB =   3.6 MiB	wpa_supplicant
  2.7 MiB + 929.0 KiB =   3.6 MiB	gsd-print-notifications (2)
  2.7 MiB +   1.0 MiB =   3.7 MiB	gdm-session-worker (2)
  2.7 MiB +   1.1 MiB =   3.8 MiB	(sd-pam) (2)
  3.8 MiB + 114.5 KiB =   3.9 MiB	zsh
  2.2 MiB +   2.2 MiB =   4.4 MiB	gsd-smartcard (2)
  4.3 MiB + 277.5 KiB =   4.5 MiB	ModemManager
  3.9 MiB +   1.2 MiB =   5.0 MiB	gsd-datetime (2)
  4.6 MiB + 604.5 KiB =   5.2 MiB	udisksd
  4.9 MiB + 812.5 KiB =   5.7 MiB	dbus-daemon (5)
  4.8 MiB +   1.1 MiB =   5.9 MiB	gnome-session-binary (2)
  5.7 MiB + 581.5 KiB =   6.3 MiB	colord
  4.3 MiB +   2.9 MiB =   7.3 MiB	systemd (3)
  7.2 MiB +   1.5 MiB =   8.7 MiB	NetworkManager
  7.2 MiB +   3.1 MiB =  10.2 MiB	polkitd
  7.8 MiB +   3.4 MiB =  11.2 MiB	pulseaudio (2)
 11.4 MiB +   1.6 MiB =  12.9 MiB	tracker-miner-fs
 16.5 MiB +   1.5 MiB =  18.0 MiB	goa-daemon
 18.9 MiB +   1.3 MiB =  20.2 MiB	msm_notifier
 15.9 MiB +   7.2 MiB =  23.1 MiB	systemd-journald
 18.2 MiB +   6.2 MiB =  24.4 MiB	Xorg (2)
 26.3 MiB +   1.3 MiB =  27.5 MiB	gsd-clipboard (2)
 26.6 MiB +   1.3 MiB =  27.9 MiB	gsd-keyboard (2)
 26.6 MiB +   1.4 MiB =  28.0 MiB	gsd-wacom (2)
 27.2 MiB +   1.6 MiB =  28.7 MiB	gsd-power (2)
 27.3 MiB +   1.5 MiB =  28.8 MiB	gsd-xsettings (2)
 27.6 MiB +   2.0 MiB =  29.6 MiB	gsd-media-keys (2)
 27.4 MiB +   2.3 MiB =  29.8 MiB	gsd-color (2)
195.4 MiB +  40.0 MiB = 235.5 MiB	gnome-shell (2)
---------------------------------
                        690.5 MiB
=================================

It is non other than our old nemesis, the gdm dual shell bug! Gnome shell and many of it's components are run twice, significantly wasting resources.

The mysterious part is that when I made a vanilla gnome installation, the problem was not present. It used about 340Mb ram and gdm did not have it's own gnome shell running wild.

@Ste74, do you have any idea what might cause this difference between vanilla gnome and manjaro gnome? Can I help fixing this?

5 Likes

I can verify its about 680mb with non free drivers I get in the 300s with the distro i can not mention as it upsets some usera and moderators. lol.
680mb is not bad compared to some other distros running 900-1300mb and Manjaro is fully featured.

Yeah, I was impressed that the 18.04 Gnome ran <800 Mb with non-free drivers when it (and other distros) used to ran 1200 Mb out of the box.

1 Like

I am not seeing this... Gnome (Wayland), sddm:

<snip>
 19.3 MiB +   4.6 MiB =  23.9 MiB       sakura
 31.3 MiB +   4.7 MiB =  36.0 MiB       albert
 35.9 MiB +   3.0 MiB =  38.9 MiB       python3.7 (3)
 38.1 MiB +   1.9 MiB =  39.9 MiB       tracker-miner-fs
 39.7 MiB +   3.1 MiB =  42.8 MiB       chrome-gnome-sh (2)
 49.5 MiB + 205.5 KiB =  49.7 MiB       dnsmasq
 52.9 MiB +   5.3 MiB =  58.2 MiB       Plex Media Server
 53.1 MiB +   6.6 MiB =  59.7 MiB       sddm-greeter
 73.2 MiB +   5.6 MiB =  78.8 MiB       Plex Script Host (2)
 73.6 MiB +   5.7 MiB =  79.3 MiB       variety
 69.7 MiB +  17.3 MiB =  87.0 MiB       Xwayland
128.0 MiB +  14.3 MiB = 142.3 MiB       gnome-shell
228.1 MiB +  27.8 MiB = 255.9 MiB       WebExtensions
216.1 MiB +  39.9 MiB = 256.1 MiB       firefox
269.7 MiB +  59.3 MiB = 329.0 MiB       Web Content (3)
---------------------------------
                          2.0 GiB
=================================

142.3mb and only 1.

I'm also not getting it on wayland. The problem seems to happen only with xorg. However, on wayland ram consumption is still about 500Mb, so there is also something else eating the ram.

@Ste74, should we consider to already default to wayland session?

msm-notifier seems to be running also. I think we should disable it because

  • our update extension already takes care of it's job
  • Default setup does not have system tray, so msm-notifier cannot do it's job
    -> therefore it is a waste of 21Mb ram to have it running

@Chrysostomus: if you find a way on how to optimize it, go nuts with it. Most likely I'll start with a vanilla branch and add our branding step by step to it again. @Ste74 most likely adopted the work which was done so far. Sometimes we have to redo it by scratch.

Disabling msm-notifier and switching to wayland gives quite acceptable results:

 Private  +   Shared  =  RAM used	Program

320.0 KiB +  62.5 KiB = 382.5 KiB	lvmetad
356.0 KiB +  74.5 KiB = 430.5 KiB	rtkit-daemon
624.0 KiB + 107.5 KiB = 731.5 KiB	gdm-wayland-session
660.0 KiB + 119.5 KiB = 779.5 KiB	gsd-screensaver-proxy
696.0 KiB + 122.5 KiB = 818.5 KiB	xdg-permission-store
708.0 KiB + 121.5 KiB = 829.5 KiB	gvfsd-metadata
724.0 KiB + 135.5 KiB = 859.5 KiB	gsd-a11y-settings
744.0 KiB + 143.5 KiB = 887.5 KiB	gsd-mouse
836.0 KiB + 135.5 KiB = 971.5 KiB	gsd-rfkill
796.0 KiB + 206.5 KiB =   1.0 MiB	gvfs-goa-volume-monitor
740.0 KiB + 286.5 KiB =   1.0 MiB	libinput-debug-events
920.0 KiB + 120.5 KiB =   1.0 MiB	gvfs-mtp-volume-monitor
684.0 KiB + 366.5 KiB =   1.0 MiB	login
944.0 KiB + 165.5 KiB =   1.1 MiB	at-spi-bus-launcher
956.0 KiB + 230.5 KiB =   1.2 MiB	gsd-housekeeping
  1.0 MiB + 149.5 KiB =   1.2 MiB	accounts-daemon
  1.1 MiB + 178.5 KiB =   1.2 MiB	gvfsd-fuse
  1.0 MiB + 212.5 KiB =   1.3 MiB	at-spi2-registryd
  1.1 MiB + 246.5 KiB =   1.3 MiB	gsettings-helper
  1.1 MiB + 290.5 KiB =   1.4 MiB	gvfsd
  1.1 MiB + 303.5 KiB =   1.4 MiB	gsd-sound
  1.2 MiB + 238.5 KiB =   1.4 MiB	gsd-disk-utility-notify
996.0 KiB + 680.5 KiB =   1.6 MiB	systemd-timesyncd
  1.6 MiB +  81.5 KiB =   1.7 MiB	mount.exfat-fuse
  1.5 MiB + 164.5 KiB =   1.7 MiB	bluetoothd
  1.2 MiB + 554.5 KiB =   1.7 MiB	gvfs-afc-volume-monitor
  1.5 MiB + 274.5 KiB =   1.7 MiB	gdm
  1.4 MiB + 577.5 KiB =   2.0 MiB	systemd-logind
  1.7 MiB + 383.5 KiB =   2.1 MiB	goa-identity-service
  1.4 MiB + 801.5 KiB =   2.1 MiB	(sd-pam)
  1.8 MiB + 321.5 KiB =   2.1 MiB	sudo
  1.6 MiB + 641.5 KiB =   2.2 MiB	gsd-print-notifications
  1.8 MiB + 566.5 KiB =   2.3 MiB	gdm-session-worker
  1.8 MiB + 604.5 KiB =   2.4 MiB	upowerd
  1.8 MiB + 664.5 KiB =   2.5 MiB	gsd-sharing
  2.5 MiB + 286.5 KiB =   2.7 MiB	gnome-keyring-daemon
  2.0 MiB + 904.5 KiB =   2.9 MiB	gsd-printer
  2.0 MiB + 902.5 KiB =   2.9 MiB	gsd-datetime
  2.3 MiB + 685.5 KiB =   3.0 MiB	gvfs-udisks2-volume-monitor
  2.5 MiB + 488.5 KiB =   3.0 MiB	systemd-udevd
  2.8 MiB + 390.5 KiB =   3.2 MiB	gsd-smartcard
  2.8 MiB + 702.5 KiB =   3.5 MiB	gnome-session-binary
  3.1 MiB + 589.5 KiB =   3.6 MiB	wpa_supplicant
  3.6 MiB + 125.5 KiB =   3.8 MiB	zsh
  3.4 MiB + 744.5 KiB =   4.2 MiB	dbus-daemon (3)
  4.2 MiB + 392.5 KiB =   4.6 MiB	ModemManager
  4.6 MiB + 699.5 KiB =   5.3 MiB	udisksd
  2.8 MiB +   2.9 MiB =   5.6 MiB	systemd (2)
  4.5 MiB +   1.3 MiB =   5.7 MiB	gsd-clipboard
  5.7 MiB + 746.5 KiB =   6.4 MiB	colord
  5.1 MiB +   1.5 MiB =   6.6 MiB	gsd-wacom
  4.9 MiB +   1.8 MiB =   6.7 MiB	gsd-xsettings
  5.4 MiB +   1.6 MiB =   7.1 MiB	gsd-media-keys
  6.4 MiB + 725.5 KiB =   7.1 MiB	pulseaudio
  5.7 MiB +   1.6 MiB =   7.3 MiB	gsd-color
  6.2 MiB +   1.3 MiB =   7.5 MiB	python3.7
  6.9 MiB +   1.7 MiB =   8.6 MiB	NetworkManager
  7.1 MiB +   2.5 MiB =   9.6 MiB	gsd-keyboard
  7.5 MiB +   2.7 MiB =  10.1 MiB	gsd-power
  7.3 MiB +   4.4 MiB =  11.7 MiB	polkitd
 11.5 MiB + 451.5 KiB =  11.9 MiB	systemd-journald
 11.7 MiB +   1.9 MiB =  13.6 MiB	tracker-miner-fs
 16.4 MiB +   2.1 MiB =  18.5 MiB	goa-daemon
 26.8 MiB +   2.1 MiB =  28.9 MiB	pamac
 39.5 MiB +   3.7 MiB =  43.2 MiB	Xwayland
127.0 MiB +  13.2 MiB = 140.2 MiB	gnome-shell
---------------------------------
                        447.3 MiB
=================================

We could maybe also disable pamac, because the update-notifier runs it as needed, but it is probably unnecessary. And pamac can also download updates on the background, so it is not waste of resources.

Yep, let me know what process eat ram in our edition, then we can take a look if we can remove in the default session.. Also for me don t see this number i e. I m around 600 mb of ram in my daily runner gnome.. Only more service we disable in the custom release and more newbie can ask "what? Why my printer is not recognized?", "why i don t see update" ecc...
In the modern pc 600 mb of ram i think is not a really problem but we can see..

2 Likes

Stupid question, which command are you using for getting this RAM usage?

On bladebook level devices it makes a visible difference in performance. I agree that 600Mb is not a big problem for most machines, but waste is still waste.

I propose the following changes:

  1. disable msm-notifier with a desktopfile in ~/.config/autostart
  2. either enable wayland by default or re-enable the gdm workaround that we had previously
  3. add the package gestures and enable it by default. (add user to input-group, add autostart file)

This should cut down ram usage by at least 200Mb without losing any functionality and adding gesture support and gui.

@d7rk sudo ps_mem

1 Like

Only one session on my Gnome under X, and I did remove msm-notifier a long time ago.
But then I did this install a while back.

Old installs include a workaround to fix this issue, it seems to have been dropped for some reason

I don't have a bladebook or any other Manjaro hardware at the moment, so the config and others tweaks are based on the my daily notebook pc. My tweaks and configs are for not specific hardware because i don't know where Gnome edition will install. @philm we can do a specific configuration for bladebook but if i remember correctly bladebook was born for run with Plasma. As i know @oberon and @philm optimize our hardware only with xfce or plasma ( i can wrong this assumption since no has talk with me for this ).

I think better optimize consuption of ram of msm because if we not use it at the first installation the process to install all locale pkgs and etc is not complete and in the daily use no notification for other thing..

Gnome is wayland centric so any optimization by gnome dev is for wayland session. I can't enable by default because not sure if hardware where user install gnome is totally wayland compatible ( nvidia closed driver etc ) this is the reason because i leave Xorg when gnome is installed we can design a welcome screen for gnome edition where we explain what or where changes this config.. is an idea.. reanble the workaround i think take problem in wayland this time...

Is already packaged? is the extension or the app?

Quick fix would be gdm workaround. How can we add it as extra package? @Ste74

I can do a config package with the hook to do and revert it and test the workaround..

1 Like

I use xorg and mine is in the upper 300mb so but saying that i mask somethings like modem manager and data mining no pamac etc, modem manager uses more ram than that chart by the way more like 30mb. Their is 40+ to be saved with masking tracker-miner and pamac + modemmanager but you will find it more than that.
you cant use wayland as default it still does not play with a lot of nvidia cards but does play with some on free drivers and is still buggy even on my Intel desktop so i'm still using xorg.

Manjaro at 600mb is very light to what other distros can achieve you are correct.

The problem is KDE is under 500mb and that is the lever that can be used to put gnome on a bad footing.

Getting gnome lower also defuses XFCE as being light as it is now getting heavy.

As you already know i have installed Manjaro Gnome i'm impressed but as it stands its uses 75% more ram than my daily driver, but I also think that the ram is partly justifiable as my daily driver is custom built for my personal needs where Manjaro is built for Joe public and their needs.

I don't use a package manager i don't need to check updates, no hardware manages etc on my daily driver.

But that is not Manjaro and I personally feel yes Manjaro gnome needs to shed some ram but with optimization not by removing usability for Joe public.

1 Like

Good news I removed both update notifiers and ram is now down to 480mb that is over 100mb less. as i said its always more that that chart indicates. that is on my main desktop with xorg and nvidia non free drivers.

1 Like

I don't think we should focus on being lighter than the "competition". Even if we already do better than some others, we should still strive to improve where possible.

I agree. Extra ram usage is good and justified when it improves the user experience. That's why we should not disable gsd daemons for fringe hardware like wacom tablets. If nvidia does not run wayland properly, we can't enable it yet.

However, waste is waste. Msm-notifier does not function without system tray (which we don't have in gnome), and we already built kernel alarm into the update-notifier, so using ram on msm-notifier is both unnecessary and just plain does nothing.

Similarly, running extra gnome shell and gsd for gdm is pointless, so we should re-enable the workaround to kill them.

This is what I do with my own installations, but modemmanager and tracker can still be useful for other users.