You are not logged in.
Hi everyone,
I encountered some problems during the upgrade to Gnome 3.16 the last few days ("Oh no something has gone wrong", black screens and so on as described in some posts here). The last updates (3.16.1-2 & -3) solved most of the problems -- still cannot use my external monitor though.
Now I'm concerned about the high memory usage of gnome-shell. I know this used to happen to some users in the past, but that's the first time for me. gnome-shell starts with around 4% of my 8GB RAM and constantly grows up to around 50% in around an hour. Then my system starts swapping (my other applications also consume lots of memory) and becomes unusable. If I don't reboot, I guess it can hit the 100% memory usage.
I run Gnome without Wayland support (WaylandEnable=false in gdm) and journalctl doesn't show anything anormal. I don't really know where to start for diagnosing the problem.
Here's the memory usage right now (ps aux --sort -rss | head -4):
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
gdm 9437 1.1 46.9 5856384 3796300 tty1 Sl+ 10:18 1:02 gnome-shell --mode=gdm
dig 9691 8.0 5.8 1723816 475520 tty2 Sl+ 10:18 7:10 /usr/lib/firefox/firefox
dig 9643 5.3 4.4 1967224 358556 tty2 Sl+ 10:18 4:47 /usr/bin/gnome-shell
Thanks for your help,
dig
Last edited by dig (2015-04-16 09:54:35)
Offline
Seems like a known issue, e.g.:
https://bugzilla.redhat.com/show_bug.cgi?id=977387
https://bbs.archlinux.org/viewtopic.php?id=186704
Basically, alt-tabbing and any interaction with the shell increase memory consumtion. It is strange that I've not been affected earlier. ALT+F2+r helps to free some memory, but it's still an issue -- which doesn't appear to be a priority for Gnome developers.
You may close or remove this. Sorry for bad search engine skills.
Last edited by dig (2015-04-16 10:21:17)
Offline
Asked about this on IRC a while ago, suggestions I got
- alt +f2 +r to reload gnome-shell as mentioned
- alt +f2 +lg and press the trash icon (garbage collection)
- check your drivers (proprietary nvidia drivers, or intel in my case)
You could also do as the bug report suggests and valgrind the whole thing. Unfortunately Arch has no debug repos so you'd have to recompile the whole GNOME ecosystem, or install Fedora (I'd go with latter)
Last edited by Alad (2015-04-16 11:47:15)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
I've never seen gnome-shell consume more than 200MB RAM (usually it doesn't go that high). It still leaks some memory but nothing like you're reporting.
I'm thinking issues like this happen only with certain video drivers, and at least my intel system seems to be unaffected.
Offline
I'm using the NVIDIA proprietary drivers, but people are reporting issues with Intel as well.
After a few experiments, I found some workarounds. Alt+F2+R and ALT+F2+LG+trash don't make a big difference for me. However, I found that the problem only occurs when the shell is started by gdm (gnome-shell --mode=gdm).
When running out of memory, I can gnome-shell --replace --mode=user and then kill -9 the old buggy gnome-shell (--mode=gdm) process. The new process doesn't (apparently) leak anything, even after several hours. Hope this helps.
Do you guys know how I could force starting gnome-shell with --mode=user, even through gdm?
Thanks
Offline
Same here, neither Alt+F2+R nor Alt+F2+LG+Trash make any difference. I'm using NVIDIA proprietary drivers.
PID USER PR NI VIRT RES %CPU %MEM TIME+ S COMMAND
594 gdm 20 0 3384,5m 2,090g 0,0 6,7 1:48.88 S gnome-shell --mode=gdm
Last edited by ChuckDaniels (2015-05-05 10:12:25)
“That’s the second biggest linux kernel I’ve ever seen!”
Offline
I had this same problem and couldn't figure it out. I eventually ended up scrapping the whole install and dumping GDM and switching to lightdm. I don't know if it would help, but have you tried another display manager to see if it really is GDM that's causing the issue?
Offline
Problem is, Alt-F2, r affects your GNOME Shell, not GDM's. If you don't intend to login again, you can kill GDM's gnome shell:
sudo pkill -u gdm gnome-shell
Offline
Problem is, Alt-F2, r affects your GNOME Shell, not GDM's. If you don't intend to login again, you can kill GDM's gnome shell:
sudo pkill -u gdm gnome-shell
This! gnome-shell's ram usage has been driving me nuts (system with only 4GB) and I finally realized the process that is eating all the memory was running as gdm, not as my user account! I found that killing it frees up 800MB of ram and has no effect on my desktop whatsoever.
The alt+f2+r trick works but only restarts the process running as my user account. Before restart it was using like 300MB and after uses 200MB.
Another possibility I'd be interested in is setting a ulimit for gnome-shell so that if it hits 400MB it dies and restarts automatically. Anyone have an idea how to make that happen? (I'd experiment but I'm short on time at the moment)
(some day I'm going to do the same thing to Chrome tabs so that websites with stupid implementations die on their own before my system lags up and becomes unusable)
Last edited by gintanto (2015-06-21 03:55:22)
Offline
I'm having this problem too. My desktop system has 8Gb RAM and a GTX460 with the proprietary nvidia driver; gdm's usage is getting up to ~7.5Gb after a while, even when I'm not doing anything and the system is just sitting idle. I usually fix it by switching to a tty and doing a stop/start of gdm using systemctl (for some reason, doing 'systemctl restart gdm' breaks something and I can't switch back to gdm.)
I'm going to try switching display managers tomorrow, failing that I'll try switching to nouveau.
This doesn't happen on my Intel-based laptop.
Last edited by russ0r (2015-06-28 15:21:10)
Offline
Hi all,
I don't know if writing in a thread that is less than a year old should be considered as necro-bumping, but if it is, please excuse me.
The memory leakage of the gnome-shell is a problem, that exists for several years now and it appears that the GNOME development team is unable to fix it.
I did a lot of work in the form of trial-error and my conclusion is that the problem is in GDM display manager or at least in the combination of the GDM and gnome-shell and of course the video drivers.
Although the issue is more evident with NVIDIA cards, there is leakage with any other brand and drivers of graphics cards. The "architecture" of the NVIDIA drivers is producing more "pieces" of memory that are discarded but not deleted, than other drivers and that results in faster full memory.
For me, nothing changes when extensions are enabled or disabled and with newer versions of the NVIDIA drivers I get 8GB of gnome-shell in 3-4 hours of idle computing.
The only solution for now seems to be, the removal of GDM.
I didn't test it with other display managers, but I suppose that there will be no problems. However, adding another display manager will interfere with the visual continuity of GNOME...
For now, I can live without a display manager, which means no screen lock too (or at least I haven't found a way to do it - but it will look ugly, anyway.)
Looking forward to test the new version for a fix...
Offline