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.

  • did you try to set memory limits
    – user643653
    Commented Aug 3, 2018 at 3:29
  • I dont see anything wrong with your memory use
    – Panther
    Commented Aug 3, 2018 at 3:58
  • 2
    @Panther Xorg memory usage increases over time. It's gotten to 9GB of just Xorg when I wasn't even doing anything. Since I have 16GB of RAM it hasn't slowed me down too much but I want to pin point the issue.
    – NUTsTUN
    Commented Aug 3, 2018 at 18:46
  • Unused ram is wasted ram. Is it causing some sort of problem?
    – Panther
    Commented Aug 3, 2018 at 19:19
  • 2
    @Panther how would you justify 9GB of RAM used by Xorg? Of course, using RAM for caching etc. when it is not used by applications is reasonable. But applications shouldn't occupy more RAM than they need; and Xorg occupying 9GB sounds like a memory leak, especially because it happens over time.
    – danzel
    Commented Aug 26, 2018 at 15:12

1 Answer 1



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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .