Announcement

Collapse
No announcement yet.

Memory leak in kwin_x11?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Memory leak in kwin_x11?

    Hi all,

    I've been struggling with this for quite a while now. It seems that my memory consumption is constantly increasing up to the point when all the physical ram is consumed then the swap is filled and the system becomes unresponsive.
    What is strange that if I have a console window and minimize then reopen it, the memory consumption suddenly goes down. Sometimes it means freeing up of 5 gigs of RAM.
    If I leave the PC unattended, sometimes 5 mins is enough and it almost freezes up. From what I see in System Monitor, it looks like the culprit could be kwin_x11, as the shared mem is constantly rising, then goes down when I open and close the console window.
    I have updated everything, but it did not solve the issue. I read some articles about a similar issue where the Nvidia driver and the 5.4 kernel caused the issue, but it seems that I cannot update to 5.5 kernel.

    What else can I try? This issue is not only frustrating, it hinders my ability to work.

    Thanks,
    Moha

    #2
    You should be using the 5.11 kernel by now, LTS releases are now automatically on the HWE track.
    If you want to see about getting on the updated kernel/driver stack :
    https://wiki.ubuntu.com/Kernel/LTSEn...ntStack#Server

    As to memory leaks,, you might want to look closer at Ksysguard (or your stats tool of choice),maybe setting the view from "All Processes" to "All Processes --Tree", as it could be something running 'under" kwin, or some other parent process. Rouge plasma widgets, or other things are places to look.

    But the first thing to check for is if you are simply hitting swap far too early. Well before you have actually run out of ram. Some system seem to do this. If this is the case, then we can adjust the swappiness settings.

    Last edited by claydoh; Oct 24, 2021, 11:28 AM.

    Comment


      #3
      An obvious measure is to create a new user, and log in as that user to see if the problem occurs for that user. If it doesn't, there's something in your home directory that is provoking the problem, most likely in .config, but not necessarily. You could then try renaming stuff (for example, rename .config to .config-bak, test, then rename it back) to track down the cause; tedious, because you'd have to log out and back in to test it.

      If you are not using Wayland, looking at the end of .xsession-errors might give a clue. I don't know if there's a Wayland equivalent, searching was inconclusive.

      How old is your hardware? My previous system, that died (finally) in 2016, had "on-board" nVidia graphics and kwin would fail in this way sometimes, in the early days of KDE plasma. I had a shortcut for something like "kwin --replace &" to rescue it.
      Regards, John Little

      Comment


        #4
        Thank you for your answers. It looks like I found the culprit. Apparently it was the KDE theme that I've been using. I switched to a different theme (from Glassy to Breeze Dark) and it looks like the problem solved. No memory shortages since then, so the memory leak must be in the theme somehow.

        Comment

        Working...
        X