Skip to content

Memory usage increasing over time #6850

Open

Description

@MegaV0lt
 * Cinnamon 3.4.6
 * Linux Mint 18.2 Sonya
 * Graphics:  Card: Advanced Micro Devices [AMD/ATI] Kaveri [Radeon R7 Graphics] bus-ID: 00:01.0
           Display Server: X.Org 1.18.4 drivers: ati,radeon (unloaded: fbdev,vesa)
           Resolution: 1920x1200@59.95hz
           GLX Renderer: Gallium 0.4 on AMD KAVERI (DRM 2.49.0 / 4.10.0-32-generic, LLVM 4.0.0)
           GLX Version: 3.0 Mesa 17.0.7 Direct Rendering: Yes

 * 64 bit

Memory usage increasing over time

Steps to reproduce
Memory increases slowly the more time is running

Expected behaviour
No memory increasing

Other information
auswahl_20170826_09 42 01

Activity

  1. kyleguarco commented on Aug 29, 2017

    @kyleguarco

    I can confirm this, if no one else wants to. The same thing happens on my system, it's a memory leak that people using Mint have been LONG aware of. There's a workaround currently, but it's only temporary.

    cinnamon --replace does the job for about an hour.

  2. MegaV0lt commented on Aug 30, 2017

    @MegaV0lt
    Author

    I think most people do not see the memorywaste. I also hve seen it only because conky was showing it.

    PS: I also had crashes in cinamon, but do not know if is connected to the memoryusage

  3. LightningStalker commented on Sep 1, 2017

    @LightningStalker

    It's not only cinnamon itself, but also cinnamon-screensaver. When cinnamon gets above 3GB, cinnamon-screensaver is around 1GB, and it starts becoming a real issue. The system becomes noticeably slower as memory starts paging to the hard disk.

  4. SerafDosSantos commented on Sep 1, 2017

    @SerafDosSantos

    Please pay attention to those applets, they're often the culprits. I removed most of them and didn't get any problems afterwards.

  5. LightningStalker commented on Sep 2, 2017

    @LightningStalker

    Don't be so quick to blame those applets. I'm not running any.

  6. magnetx commented on Sep 3, 2017

    @magnetx

    I see memory consumption increasing, too. When I start any program, cinnamon process takes a piece of memory. And when I close that progam, cinnamon process memory value isn't back. Actually, it decreases, but not to the value it was before starting program.

  7. theraser commented on Sep 21, 2017

    @theraser

    This issue seems to be a duplicate of #3796, right? Maybe we could move the discussion the other issue :)

  8. brownsr commented on Oct 11, 2017

    @brownsr
    Member

    I pushed a memory leak fix recently 5cdf5c0

  9. LightningStalker commented on Oct 12, 2017

    @LightningStalker

    That would be great if it fixes this. Even if it just slows down the leak.

  10. cmrdt commented on Nov 5, 2017

    @cmrdt

    as an alternative to cinnamon --replace there's also the GUI option (inside "panel > context-menu > troubleshooting >restart-cinnamon")

    clipboard03

  11. leigh123linux commented on Nov 5, 2017

    @leigh123linux
    Member

    @cmrdt

    There's also a key combo

    Ctrl+Alt+Esc

  12. LightningStalker commented on Nov 5, 2017

    @LightningStalker

    @cmrdt @leigh123linux Or Alt+F2, r
    Unfortunately, restarting a desktop manager has the annoying side effect of moving all the open program tabs around.

  13. abdouskamel commented on Nov 5, 2017

    @abdouskamel
    Contributor

    Just want to notice that i have not this problem in debian. After 2 hours, cinnamon is still below 300mo of memory usage. Maybe it's about my environment, or the problem is specific to mint ?

  14. LightningStalker commented on Nov 5, 2017

    @LightningStalker

    @abdouskamel it grows to around 900Mb by 24h on my system.

  15. abdouskamel commented on Nov 6, 2017

    @abdouskamel
    Contributor

    @LightningStalker Are you in debian ? For myself, memory usage is the same when booting and after hours of working.

  16. 190 remaining items

  17. yatli commented on Apr 2, 2020

    @yatli

    People, could you please help to confirm if resizing a terminal running while [ 1 ]; do date +%H:%M:%S; cat /proc/$(pidof cinnamon)/status | grep -i rss; sleep 1; clear; done gives you a clean repro?

  18. devreal commented on Apr 2, 2020

    @devreal

    Thanks for trying to reproduce this, it's something that seems to haunt me as well. I tried your suggestion for a bit more than a minute, here is a plot of the vmRSS value:

    terminal_cinnamon

    vmRSS seems to drop back to the initial value range at times.

  19. rtaft commented on Apr 2, 2020

    @rtaft

    I have not run into this issue in over a year. I suspect one of my issues was related to running Cinnamon on Fedora 27 and having ksensors running, my other encounters were all on Mint 18. I have not encountered this on Mint 19.

  20. devreal commented on Apr 2, 2020

    @devreal

    To be fair, I just upgraded to Mint 19 this week and struggled with it on Mint 18. I don't have enough data points to say that it has bogged me on Mint 19. Will keep an eye on it though.

  21. yatli commented on Apr 2, 2020

    @yatli

    @devreal yeah your plot looks like a healthy environment where the GC does its job.

    The applets may be leaking native resources. js doesn't have finalizers like .NET or jvm that notifiy the objects about destruction.

    In my first run (valgrind-profiled), resize/move window cause very significant leak probably because the workspace switcher redraws window shapes all the time.

  22. fanfan70 commented on Apr 30, 2020

    @fanfan70

    As yatli proposed, I ran
    while [ 1 ]; do date +%H:%M:%S; cat /proc/$(pidof cinnamon)/status | grep -i rss; sleep 1; clear; done
    after a session restart (lightdm manager), no other app running than the terminal (terminator) and got VmRSS and RssAnon to increase even if terminal is not moved/resized (RssFile/RssShmem seem to be stable).
    Devuan/beowulf, Cinnamon 3.8.8

  23. hamishmb commented on Sep 15, 2020

    @hamishmb

    I also have a memory problem, but "cat /proc/meminfo" shows SUnreclaim slowly going up (eventually to 24 GB!). This happens with both Cinnamon and MATE on different machines (but slower on MATE).

    I am using a Ryzen 3600 and an AMD RX460 GPU with the open source drivers. Has anyone else encountered this?

  24. IzzySoft commented on Jan 7, 2022

    @IzzySoft

    I've also encountered this issue these days, on a new machine freshly installed with Mint 20.2. I have to restart cinnamon about once a week as its memory consumption climbs up to 1G – and finally the desktop freezes, with only the mouse moving (see: #8861). Performing a cinnamon --restart from within the running DE definitely leads to this freeze – and after that, only a kill of X solves the freeze (with the session being lost and all apps killed along), similarly for Alt-F2 "r" (which freezes with the message "Cinnamon restarting") – the only real solution is running pkill -HUP -f "cinnamon --replace" from a separate session (e.g. Ctrl-Alt-F1 or remotely via SSH).

    Now the interesting thing: in the last few weeks, I had to do that daily. Until a few days ago, now I'm probably back at weekly. What was the difference? In the given interval I had a lot of tasks requiring me to frequently switching workspaces (e.g. opening links from Workspace-2 which ended up in a browser on Workspace-1). Grouped-Window-list is set to include apps from all workspaces. These two seem closely related. What also makes me think so is the log put out from cinnamon --replace (which I had to start again from a terminal in my X session as it didn't restart after the HUP). A very frequent message there is:

    (cinnamon:703221): Cjs-CRITICAL **: 22:47:36.861: JS ERROR: TypeError: metaWorkspace.index is not a function
    windowRemoved@/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/appList.js:353:31
    AppList/<@/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/appList.js:57:81
    

    (in fact that is the only message shown there, but pretty often).

    Hope these details give a clue and help solving the issue (or at least mitigating it). I didn't have it that hard on my old machine (there »Alt-F2 "r"« once per month sufficed, and often was not needed as a kernel update required a reboot). So Justin Case:

    System:    Host: XXXXXX Kernel: 5.11.0-43-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 5.0.7 
               Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
    Machine:   Type: Desktop Mobo: ASRock model: B450 Pro4 R2.0 serial: xxxxxxxxxxx UEFI: American Megatrends 
               v: P5.10 date: 08/04/2021 
    CPU:       Topology: 8-Core model: AMD Ryzen 7 5700G with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3 L2 cache: 4096 KiB 
               flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 121597 
               Speed: 3340 MHz min/max: 1400/3800 MHz Core speeds (MHz): 1: 3340 2: 4176 3: 4175 4: 4176 5: 3348 6: 4175 7: 4185 
               8: 4175 9: 4183 10: 4174 11: 3330 12: 4176 13: 4176 14: 4176 15: 3339 16: 4176 
    Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] driver: amdgpu v: kernel bus ID: 0a:00.0 
               Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati unloaded: fbdev,modesetting,vesa resolution: 1920x1200~75Hz 
               OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.11.0-43-generic LLVM 12.0.0) v: 4.6 Mesa 21.0.3 direct render: Yes 
    Audio:     Device-1: Advanced Micro Devices [AMD/ATI] driver: snd_hda_intel v: kernel bus ID: 0a:00.1 
               Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASRock driver: snd_hda_intel v: kernel 
               bus ID: 0a:00.6 
               Device-3: GN Netcom Jabra EVOLVE 65 type: USB driver: jabra,snd-usb-audio,usbhid bus ID: 1-9:94 
               Device-4: USB2.0 Hub type: USB driver: snd-usb-audio,uvcvideo bus ID: 1-1.1:91 
               Sound Server: ALSA v: k5.11.0-43-generic 
    Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASRock driver: r8169 v: kernel port: d000 
               bus ID: 08:00.0 
               IF: enp8s0 state: up speed: 1000 Mbps duplex: full mac: xx:xx:xx:xx:xx:xx
    
  25. NikoKrause commented on Jan 8, 2022

    @NikoKrause
    Member

    There's an option now "Restart Cinnamon if it uses too much RAM"

    It's to be found in:

    cinnamon-settings general
    
  26. IzzySoft commented on Jan 8, 2022

    @IzzySoft

    Thanks, yes – but that should be a last resort (and I'm somehow afraid that in my case, that would just lead to more freezes, see linked issue). Ideally, those memory leaks should be found and closed. If the need to restart can be reduced to about once per month or higher, the problem would be mitigated as kernel updates would require a reboot anyhow 😉

  27. gklanderman commented on Jan 14, 2022

    @gklanderman

    just had to restart cinnamon on my son's session as it was using about 1.5Gb and making minecraft unusable for him. he has made no config changes or applets beyond default config, debian testing system with cinnamon 5.0.6-1, and lightdm is the DM. multi-seat system, I am running old-school fvwm2 on seat0. system has been up 14 days since last reboot, and he was having trouble already 5 days ago. will keep an eye on it and try to gather useful information before restarting next time.

  28. mas1701 commented on Apr 23, 2026

    @mas1701

    I noted the memory leak as well, from 21.3 trough to 22.3. I found that the problem increases massively when using a desktop background slideshow.

  29. IzzySoft commented on Apr 23, 2026

    @IzzySoft

    I meanwhile have an icon on my smartphone's homescreen, which I tap about every week or two (whenever the DE gets sluggish, and I see Cinnamon approaching 1 GB resident memory). Connects to my PC, and runs a little shell script that kills and restarts Cinnamon 🤷‍♂️

  30. robogeek commented on Sep 17, 2026

    @robogeek

    I came to the cinnamon issue queue hoping to find a solution to the memory leak, only to find this issue open since 2017 and people saying that it'd been a known behavior from years before 2017. In fact, this issue is so well known that the workaround (restarting cinnamon) is institutionalied in "Restart Cinnamon when it uses too much memory" in the System Settings / General.

    I wrote up some details in this comment:

    #13015 (comment)

    Basically, opening System Monitor one can see the RSS for cinnamon climbing rather rapidly. This is memory consumption not only in the cinnamon process but in the kernel.

  31. berwynhoyt commented on Oct 21, 2026

    @berwynhoyt

    One major cause found: #13956 (panel menus never release destroyed items); fix in PR #13958.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions