Noticed that my xorg is growing in memory usage. How to figure out whats doing this? Rebooted yesterday when it reached 16GB in size.
First step: Check the Xorg logs in
And a journalctl output would help too, I’m curious what you did
journalctl -p 3 -b 0
Did you figure out the solution?
I am having a similar issue. After installing ps_mem I was able to determine that the cause of the memory usage slowly growing was indeed Xorg. (Side note: the resource manager was not useful in this regard).
Right now I have over 10gb of memory usage after closing most of what I had open (media files, many browser tabs, some office files). My total memory is 16gb.
If there was a way to re-start Xorg withought re-booting that would be helpful.
I have been dealing with this problem for months.
systemctl restart display-manager.service
Note: All applications will be killed.
Are you using
conky? If so, have you tried restarting it?
No, no conky. The window manager is Xfce. Some programs I use:
Brave, SMPlayer (instead of VLC), Deadbeef, Veracrypt, Open Office, Geary, and Guake.
Most commonly it is a specific application which leads Xorg to consume more RAM and not Xorg/Dirver itself. Xorg just tries compensate the misbehavior of the application, which leads to higher RAM usage.
Would terminating the offending program resolve the memory issue? I’ve tried closing everything and it doesn’t seem to help. Come to think of it, maybe the VeraCrypt volumes are the last thing to be closed, and I’m not sure if I’ve checked memory after closing those. Is it typical for encrypted volumes to create a mess like that?
Usually yes, but not always. At least it will not release it immediately.
No idea. It is only the GUI or the GPU usage which matters.
Sometimes you can see problems in the Xorg logs or session logs in your home folder.
I use Sway with Wayland, so Xorg is not my main business anymore.