Skip to main content
Topic: Xorg memory leak (Read 1358 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Xorg memory leak

Hello Folks,

It's me again with weird issues... This time I'm not sure on how to provide relevant outputs or info so please indulge me on what you'd need to read in order to investigate this issue.

I'm going to relate as much as I can to explain the events that seems to trigger this memory leak.

Last week I've almost finished my rice setup from artix-openrc base, using bspwm / picom / polybar. Then I did a sys upgrade running pacman -Syu

After that I noticed my RAM usage was getting full, so I've been troubleshooting and trying to disable apps from polybar / bspwm, but nothing changes.

What I could figure is that the memory leak happens when I start any GUI related application, Xorg starts to eat all my memory. Call it the browser or even a terminal (tried with gnome-terminal and xfce4-terminal). It doesn't happen straight away after launching X server (startx) and openning a terminal, for example, but at some point (I don't know if it's arbitrary tbh) it starts to leak to the point that all ram gets used and I get a completely dummy system.

When checking with command free -m I see the
Code: [Select]
shared
and
Code: [Select]
buff/cache
filling up at the same time the
Code: [Select]
free
column goes down in favour of filling up
Code: [Select]
used

I'm using a Lenovo T14 AMD Gen2 with artix 5.17.3 kernel on base openrc ( bspwm / polybar / picom )

Let me know what else can I provide and how to troubleshoot this issue which is a complete blocker.

Thanks in advance!


Re: Xorg memory leak

Reply #1
some outputs

Code: [Select]
uname -a
Linux iddqd 5.17.3-artix1-1 #1 SMP PREEMPT Thu, 14 Apr 2022 18:16:36 +0000 x86_64 GNU/Linux


Pacman.log output from the theoretical upgrade that broke Xorg.

Spoiler (click to show/hide)

Re: Xorg memory leak

Reply #2
Found the culprit using xrestop, issue seems to lay on picom, will report this upstream.

As a temporary workaround I've stopped launching picom --experimental-backends

Re: Xorg memory leak

Reply #3
After that I noticed my RAM usage was getting full, ...
Possible cause and solution can be found here:

https://superuser.com/questions/1007807/xdg-open-hogging-the-cpu-by-forking-itself-endlessly
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: Xorg memory leak

Reply #4
back in the day when i used openbox i ran into this same error.  i used xdg-utils-mimeo to solve the issue.  It's in the aur  also mimeo may also resolve it.  or maybe install them both?  it's been a long time since i used openbox and had that issue but it solved it for me that way.  If you got nothing resolved it could be worth the few minutes to build them
Cat Herders of Linux

Re: Xorg memory leak

Reply #5
Thanks for your replies.

echo $BROWSER returns blank. Not sure that is related to my issue, will dig further, but for now just disabling the experimental backends from picom is back to normal performance.


Re: Xorg memory leak

Reply #7
echo $BROWSER returns blank. Not sure that is related to my issue, will dig further, but for now just disabling the experimental backends from picom is back to normal performance.
It may well be that your inconvenience is not xdg-open infinity loop at all.
But instead of guessing, it would be much better to monitor the running processes.
If you haven't installed system monitoring software yet, now would be a good time to do it.
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "