I use Gnome/Wayland (Fedora distro) almost exclusively and enjoy its features. However, gnome-shell consistently consumes more and more memory as a result of it not releasing unused memory. Eventually, I even need to close everything and log out/in so that I can recover some RAM to do my work.

Georges Stavracas, in The Infamous GNOME Shell Memory Leak, describes the problem and a work-around that will appear in future Gnome releases. Early reports indicate that the work-around is successful.

Until all the distros catch up to the latest Gnome release, is there a way to recover the gnome-shell lost memory manually? lookingglass imports.system.gc() doesn't seem to do it on it's own. I'd much prefer to occasionally run a program than to save/close everything, log out/in, reopen/reload everything, and continue working.

Is there something that does this? Is it possible?

  • Oh yeah! Got the "Tumbleweed Badge" for this question! ... Asked a question with zero score, no answers, no comments (until this one), and low views for a week! – rickhg12hs Jun 3 '18 at 9:58

I use gnome-shell -r to release memory.  You can use it in cron to do it frequently.

  • 3
    According for genome-shell man, the flag -r, or --replace means replace the running window manager, not releasing the memory!! – user88036 Sep 15 '18 at 14:21
  • 1
    @Goro If the program leaks memory, restarting it still helps. – RalfFriedl Sep 15 '18 at 15:15
  • @RalfFriedl. Completely agree! ;-) – user88036 Sep 15 '18 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.