KSysGuard shows that I have dozens of xembedsniproxy items, each one taking up about 17MB of memory. I think this is something to do with converting tray icons, but why are there so many. Can I reduce the number or get rid of them all?
Yes, it is a “daemon” that converts old-style (“XEmbed”) system tray icons to the new protocol (“SNI”, implemented by KDE since 2009).
Without it, Plasma 5 is not able to show those icons at all.
but why are there so many. Can I reduce the number or get rid of them all?
Actually you only need one.
There are two problems here:
- xembed-sni-proxy is auto-started at login, but also the ones from the previous session are restarted by the session management
- xembed-sni-proxy doesn’t check whether it is running already and just starts a new instance even if there is an old-style system tray already
Both have been fixed already in the latest version, but as it will be part of Plasma itself in 5.5, I’m not sure it’s worth to release an update for Leap.
You could install the latest package from the KDE:Frameworks5 repo if you want to:
sudo rpm -Uvh http://download.opensuse.org/repositories/KDE:/Frameworks5/openSUSE_Leap_42.1/x86_64/xembed-sni-proxy-0.0.1git~20151029~11e8648-6.1.x86_64.rpm
(you only need that one package)
As another workaround for now, you could add xembed-sni-proxy to the list of things to exclude in the session management settings (Configure Desktop->Startup and Shutdown->Session Management).
Or disable session management completely.
Or, if you don’t want/need to use old-style system tray icons at all, you could also uninstall xembed-sni-proxy, it’s in a separate package.
Plasma5 requires it on a package level, but choosing “Break xxx by ignoring some of its dependencies” is fine in this case and will do no harm (except that Plasma5 won’t show old-style systray icons at all any more).
But no, they don’t take up 17MB of memory each. You probably looked at the wrong column or misinterpreted the numbers.
Thanks Wolfi - the sudo rpm has done the trick. Much obliged.
Same here, and the rpm solved. And I confirm the size of each xembedsniproxy process, 17344 KB.
Thank you and ciao.
And how did you measure that?
It takes about 3 MiB here (with the latest version).
It might depend on how many applications with old-style system tray icons you have running, but as those icons are quite small I doubt that it will rise that high…
It’s KSysGuard on the desktop and here I paste the detailed memory information from it (now, with the patched rpm installed):
"Process 2014 - xembedsniproxy
Summary
The process xembedsniproxy (with pid 2014) is using approximately 21.5 MB of memory.
It is using 18.8 MB privately, and a further 40.0 MB that is, or could be, shared with other programs.
Dividing up the shared memory between all the processes sharing that memory we get a reduced shared memory usage of 2.7 MB. Adding that to the private usage, we get the above mentioned total memory footprint of 21.5 MB.
Library Usage
The memory usage of a process is found by adding up the memory usage of each of its libraries, plus the process’s own heap, stack and any other mappings, plus the stack of its one other thread.
Private
more
10408 KB /usr/lib64/libnvidia-glcore.so.340.93
3824 KB [heap]
2048 KB [stack:2020]
336 KB /usr/X11R6/lib64/libGL.so.340.93
212 KB /usr/lib64/libQt5Widgets.so.5.5.0
Shared
more
13060 KB /usr/lib64/libnvidia-glcore.so.340.93
3332 KB /usr/lib64/libQt5Core.so.5.5.0
2272 KB /usr/lib64/libQt5Gui.so.5.5.0
1632 KB /usr/lib64/libQt5Widgets.so.5.5.0
1320 KB /lib64/libc-2.19.so
Totals
Private 19272 KB (= 96 KB clean + 19176 KB dirty)
Shared 40952 KB (= 40912 KB clean + 40 KB dirty)
Rss 60224 KB (= Private + Shared)
Pss 22018 KB (= Private + Shared/Number of Processes)
Swap 0 KB"
I don’t know how many applications with old-style system tray icons I have running, I don’t even know what they are: all I know it’s a fresh installation and before the patched rpm my system was quite unusable, with the desktop frequently freezing, only the mouse working but no response or blank screens and hard resets and memory eaten up and so on… Now it seems stable and usable, imho. Thank you.
Ah, it’s the nvidia driver that causes this memory usage…
That’s a known “problem”. The proprietary nvidia driver increases the memory of every X (Qt/KDE at least) application.
I remember a blog post about this from a few years ago.
I don’t know how many applications with old-style system tray icons I have running, I don’t even know what they are: all I know it’s a fresh installation and before the patched rpm my system was quite unusable, with the desktop frequently freezing, only the mouse working but no response or blank screens and hard resets and memory eaten up and so on… Now it seems stable and usable, imho. Thank you.
Hm, actually I don’t think this should give problems.
All those processes (except the first one) do not do anything (there can only be one XEmbed/old-style system tray), so their RAM usage should just get swapped out.
No idea how this is with the nvidia driver though, I didn’t have any problem on my radeon and intel systems with 100s of those processes running… (which as mentioned used much less memory though)
Anyway, this has been fixed (by upstream) too late for the Leap 42.1 release unfortunately. The only other option we would have had was to not ship xembed-sni-proxy, but then Plasma5 would not show old-style icons at all.
I/we will submit this as update, but ideally we should first also find a fix for the problem that those old-style icons are completely invisible (but usable) on some systems:
https://bugzilla.opensuse.org/show_bug.cgi?id=953954