xfdesktop consumes 3GB of RAM

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
aelfwine
Level 1
Level 1
Posts: 4
Joined: Tue May 04, 2021 3:16 am

xfdesktop consumes 3GB of RAM

Post by aelfwine »

Hello,

I have a 64bit Linux Mint 20.1 Ulyssa with kernel 5.4.0-72. My desktop manager is Xfce which came with the Mint installer.
98% of the time the attached monitor is turned off and when I rarely have to connect to the system I do so remotely with TeamViewer.

My problem is that within 5-6 days (maybe faster..?) of uptime xfdesktop consumes most of my RAM and possible my swap as well.

This is my free -h:

Code: Select all

              total        used        free      shared  buff/cache   available
Mem:          6,8Gi       5,6Gi       416Mi        31Mi       783Mi       888Mi
Swap:         2,0Gi       2,0Gi       8,0Mi
The tail of ps_mem.py is:

Code: Select all

  3.0 GiB +   4.4 MiB =   3.0 GiB	xfdesktop
Task Manager applet is also report 3GB of RAM usage by xfdesktop.

What can I do to identify the problem and stop xfdesktop to consume that much of RAM?

Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
secureIT
Level 4
Level 4
Posts: 471
Joined: Wed Dec 05, 2018 1:26 pm

Re: xfdesktop consumes 3GB of RAM

Post by secureIT »

Hi aelfwine,

For troubleshooting, After freshly booting your system run the following command (this will list all processes sorted by memory usage) and dump it into a file called process.log :

Code: Select all

top -b -o+%MEM -n1 >process.log
Then launch your normal workflow/apps and run the command again

Code: Select all

top -b -o+%MEM -n1 >process2.log
When you notice the problem with consuming a very high amount of memory then run the command for the 3rd time (note that you can feel free to take a snapshot of your current processes more often if you’d like. then if you post those files or paste the contents here into separate pre-formatted text blocks we can probably figure out what is eating up your memory.

Code: Select all

top -b -o+%MEM -n1 >process3.log
.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: xfdesktop consumes 3GB of RAM

Post by Flemur »

aelfwine wrote: Tue May 04, 2021 4:20 am My problem is that within 5-6 days (maybe faster..?) of uptime xfdesktop consumes most of my RAM and possible my swap as well.
Try an internet search on xfdesktop memory and you'll see that you're not alone, like

"[SOLVED] xfdesktop memory leak"
https://www.linuxquestions.org/question ... 175467462/

I think he fixed it by using MATE - but I've often used Xfce and not had a problem.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
aelfwine
Level 1
Level 1
Posts: 4
Joined: Tue May 04, 2021 3:16 am

Re: xfdesktop consumes 3GB of RAM

Post by aelfwine »

@secureIT:
Will get the logs if you think it shed some light on the situation, however I am not exactly see how would they helpful, since it is obvious that the process eating up my memory is the xfdesktop process. Since I wrote here it is at 3.5GB now so still growing.

@Flemur:
I did searched first and I also saw a couple of 3+ years old threads on the internet about xfdesktop memory leaks but there were never an exact solution also I thought that memory leaks that old should be already fixed. Maybe I'm just too naive. :D

I'm actually coming from Mate since one day it just randomly started glitching out till the point it never loaded again. Did not managed to fix it. Again I did not used that Mint version as an active desktop as well, just running a few services on it like torrenting, samba, nfs. Everything else was "factory default" like in the current case. After ~2 years Mate just gave up. I was pretty pissed that a window manager just dying like that when I did not even use the machine regularly (I log in, if I have to reconfigure something like adding new shares or changing the raid config, that's all).

So I thought that xfce is a bit more stable window manager being a more mature software. Maybe I was just too naive again. :lol:
Also since I installed this system a few years back there was no problem with xfdesktop. It just started behaving like this a couple of months ago.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: xfdesktop consumes 3GB of RAM

Post by Flemur »

aelfwine wrote: Thu May 06, 2021 9:49 am I did searched first and I also saw a couple of 3+ years old threads on the internet about xfdesktop memory leaks but there were never an exact solution also I thought that memory leaks that old should be already fixed. Maybe I'm just too naive. :D
When looking things up, I often find the same problem mentioned in threads which are many years old.

Anyway, the xfdesktop memory issue *seems* to be associated with monitors...have you tried leaving your monitor turned on, or physically disconnecting it?
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
aelfwine
Level 1
Level 1
Posts: 4
Joined: Tue May 04, 2021 3:16 am

Re: xfdesktop consumes 3GB of RAM

Post by aelfwine »

Flemur wrote: Thu May 06, 2021 10:28 amAnyway, the xfdesktop memory issue *seems* to be associated with monitors...have you tried leaving your monitor turned on, or physically disconnecting it?
That's a good idea, thanks!

I cannot really leave the monitor on since I use it with another computer. And I would like to turn it off during the night. :)
Also my 1 monitor is connected to 2 computers and I just switch the source to the specific HDMI port if I have to see the screen of the mentioned Linux Mint.

However I can try to disconnect the HDMI cable and see if that helps.
And to think it over again... I can try to plug in an EDID emulator so it will continuously detect a monitor plugged onto it's HDMI port.
Should that be sufficient?
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: xfdesktop consumes 3GB of RAM

Post by Flemur »

aelfwine wrote: Thu May 06, 2021 1:57 pm And to think it over again... I can try to plug in an EDID emulator so it will continuously detect a monitor plugged onto it's HDMI port.
Should that be sufficient?
Ya got me! I only noticed that the memory leak issue seemed to be associated with monitors...Edit: and that you had your monitor turned off.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
aelfwine
Level 1
Level 1
Posts: 4
Joined: Tue May 04, 2021 3:16 am

Re: xfdesktop consumes 3GB of RAM

Post by aelfwine »

And I just found out that a killall -HUP xfdesktop resets my window manager and pushes back the process's RAM consumption to 53MB :P

I will still try the EDID emulator method and report back.

If that won't work I will schedule a xfdesktop reset for every night.
Locked

Return to “Xfce”