Ubuntu – Very high Xorg memory usage with Ubuntu 18.04

18.04memory leakramxorg

I'm having a memory leak issue with Xorg and it's taking up huge portions on my memory. Right now, it's up to 41.2% of memory and I haven't even been using the computer that much.

This is some output regarding it.

    Linux grant-N501VW 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

root      1402  0.0  0.6 400860 99080 tty1     Sl+  Jul29   0:03 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/120/gdm/Xauthority -background none -noreset -keeptty -verbose 3
root      2097  0.0 34.4 6136080 5608064 tty2  Sl+  Jul29   4:26 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
grant    23603  0.0  0.0  21536  1096 pts/0    S+   23:11   0:00 grep --color=auto xorg

          total        used        free      shared  buff/cache   available
Mem:          15903        7914        5325         352        2663        7450
Swap:           716           0         716

All drivers are updated as well. Restarting will reset the memory usage but it still creeps up over time.

Best Answer

UPDATE:

I managed to figure out that the issue was a custom wallpaper systemd service that I was running to update the wallpaper every 30 seconds using pscirlce. Apparently I misconfigured the service and it wasn't removing something from memory properly. I don't know the exact cause of the issue, but removing this fixed my issue.

Unfortunately I lost the .service files so I don't have any more information for further research.

Related Question