7

I've read this question but it doesn't seem to be the same issue, as the memory leak there is an order of magnitude smaller than mine and seems to be caused by Nvidia drivers.. Here's my top output at the moment:

top - 03:51:03 up 7 days, 11:09, 11 users,  load average: 0.76, 0.62, 0.64
Tasks: 257 total,   2 running, 255 sleeping,   0 stopped,   0 zombie
...
MiB Mem:  7967.691 total, 7733.668 used,  234.023 free,  126.688 buffers
MiB Swap: 8171.996 total,  602.707 used, 7569.289 free.  917.934 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                    
 1137 root      20   0 3408440 2.621g 526784 S   3.6 33.7 505:06.61 Xorg 

After about a week of uptime, xorg eats up 2.5g of memory, things start getting pushed on to swap, and I have to restart as the machine gradually becomes unusable. I've checked the output of xrestop and it doesn't account for all of the memory used -- adding up everything there comes out to about 300m, which I'd be happy to put up with.

I'm using Xubuntu 14.04 "trusty," with xmonad on top of xfce4. I have an AMD video card so I use fglrx. Shutting down everything I have open doesn't reduce xorg's memory usage. On startup, it takes up only a few megabytes.

Restarting is a hassle -- what can I do to reduce xorg's memory usage?

1 Answers1

2

This question is a year old, but I'm having the same troubles, also on 14.04, using xmonad and fglrx. The cause seems to be Java apps. Whenever a Java app runs for over a day or so, half of my memory fills up with Xorg. Java apps tend to not display properly with xmonad, which can be solved by setting wmname to LG3D, and I assume some assumptions are being made about xmonad cleaning up things even though it doesn't, whereas LG3D would have. This is purely speculation though.

As for answering the actual question: one thing that's worked for me is simply sudo lightdm restart and logging back in. It's ugly, but it's not as bad as a reboot: it does not touch the network, meaning any ssh sessions are kept alive. Also, it's a whole lot faster than actually rebooting on my machine. If anyone ever comes along with a proper answer I'll be a happy man, but for now this makes it manageable.

Louis
  • 71
  • Thanks for the suggestion. As a side note, this problem seems to have disappeared over time, and I'm not sure why. Do you connect to your internet over wifi that requires a custom driver? – Patrick Collins Dec 21 '15 at 22:29
  • Nope, I don't. However, I did get some new info from poking my system. I was wrong about (only) Java apps causing the problem. I messed around with PyAutoGui for a bit for an unrelated thing, and after about 7000 button presses / mouse clicks, Xorg had blown up to 4.5GB. Something funny's going on, because this doesn't happen on my install that uses the open source driver. At this point I feel pretty confident blaming fglrx. – Louis Dec 24 '15 at 11:49