PDA

View Full Version : [ubuntu] Xorg memory leak on intel



mehturt
July 7th, 2009, 08:10 AM
I'm currently using Ubuntu 9.04 on x86_64 with E17 installed from SVN, the video hardware is GM965/GL960.

My problem is that the xserver consumes a huge amount of memory if my laptop is on for 1 day. After the start, it consumes about 400M of virt memory, 50M of res memory (numbers come from 'top'), the next day it consumes more than 1.2GM of virt memory and 800M of res memory.

I have came across multiple memory leak bugs on launchpad, but they all involve compiz. I'm not sure whether this problem is the same. I have compositing switched on.

For some time I was trying to use the packages from https://edge.launchpad.net/~ubuntu-x-swat/+archive/x-updates/ and https://edge.launchpad.net/~xorg-edgers but the problem did not go away even if various fixed were mentioned in the launchpad bugs as being commited.

My question is whether I should file a separate bug on launchpad or is this bug already existing in there.

Thanks..

mehturt
July 15th, 2009, 03:12 PM
Somebody suggested the symptom is number of object increasing in /proc/dri/0/gem_objects, but it's not my case.
Right now, with Xorg running for 2 days, the consumption is:
17214 root 20 0 1436M 1026M 14676 S 11.0 51.9 1h14:23 /usr/bin/X -quiet -br -nolisten tcp vt7 :0

VCoolio
July 16th, 2009, 01:59 AM
Maybe same problem here; after 16 hours 173 Mb memory usage by Xorg and counting. After appr. 40 hours everything is used (which is not much; 512 Mb + 512 Swap). Jaunty i686 with e17 from svn (including ecomorph). NVidea GeForce FX5200.

xorg.conf:

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
EndSection

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection

Section "Module"
Load "glx"
EndSection

# Re-enable ctrl+alt+backsp = kill x and login screen
Section "ServerFlags"
Option "DontZap" "false"
EndSection

Ideas on troubleshooting and solving are most welcome.

VCoolio
July 18th, 2009, 01:49 AM
Following this (http://www.nvnews.net/vbulletin/showthread.php?t=118088) I added some stuff to xorg.conf:


# heuristic governs amount of pixelmap data that is moved to video memory, which is faster than RAM
# TripleBuffer enables more efficient method of double buffering (used to remove flicker from a screen update)
# pixmapcache and allowshmpixmaps set to 0 prevents applications from allocating Shared Memory pixmaps
Section "Device"
Option "MigrationHeuristic" "greedy" #Available values are: smart, greedy, always
Option "TripleBuffer" "True"
Option "PixmapCacheSize" "1000000"
Option "AllowSHMPixmaps" "0"
EndSection

and to ~/.xinitrc:

#This command will enable X pixmaps to be placed in your GPU's video memory instead of the traditional system memory, allowing the NVIDIA X driver to optimally accelerate rendering operations involving such pixmaps.
nvidia-settings -a InitialPixmapPlacement=2

Don't know if it is really ok and which of the additions does the trick, but looking good. It seemed ok to move stuff from RAM to video memory, so maybe that was it.

mehturt
July 18th, 2009, 07:52 AM
It seems you have nvidia, but I have intel..

VCoolio
July 18th, 2009, 01:24 PM
I know, but first I thought it might have to do with e17 (may still be ...). But if not, sorry for interrupting.

ddrichardson
July 18th, 2009, 01:39 PM
FYI anyone on KDE, setting MigrationHeuristic to greedy causes icon corruption.

ddrichardson
July 18th, 2009, 01:42 PM
Meant to say, the memory leak has several factors and has a bug report here http://is.gd/1Dfcb

mehturt
July 18th, 2009, 03:39 PM
I know, but first I thought it might have to do with e17 (may still be ...). But if not, sorry for interrupting.

no problem.. I thougt this bug is intel related..

mehturt
July 18th, 2009, 03:40 PM
Meant to say, the memory leak has several factors and has a bug report here http://is.gd/1Dfcb

the URL does not work

ddrichardson
July 18th, 2009, 04:47 PM
Sorry is.gd doesn't seem to like "+": https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/98783

mehturt
July 18th, 2009, 05:16 PM
Thanks for the link. I have subscribed.

mehturt
July 21st, 2009, 04:45 PM
It must be e17 then. I am using ratpoison today the whole day and the memory usage of X did not go up.

James.Pandavan
July 26th, 2009, 08:07 PM
I noticed that my xorg memory usage went up whenever I use freemind (http://freemind.sourceforge.net/wiki/index.php/Main_Page). I had to restart the process to free up memory.



00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)
Subsystem: AOPEN Inc. Device 063e
Flags: bus master, fast devsel, latency 0, IRQ 2301
Memory at fd900000 (64-bit, non-prefetchable) [size=1M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at ff00 [size=8]
Capabilities: <access denied>
Kernel modules: intelfb

00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)
Subsystem: AOPEN Inc. Device 063e
Flags: bus master, fast devsel, latency 0
Memory at fdc00000 (64-bit, non-prefetchable) [size=1M]
Capabilities: <access denied>

VCoolio
August 26th, 2009, 06:38 PM
There is a bug in xorg that causes a memory leak with the way e17 draws the mouse. Read this (http://www.mail-archive.com/enlightenment-users@lists.sourceforge.net/msg12928.html). Solution: in settings panel > look > mouse cursor, either change mouse to x cursor or disable idle cursor. Maybe it's not your issue, but I thought I'd mention it.

mehturt
August 27th, 2009, 09:14 AM
Thanks for the information, I'll give it a try. Even though I started to use ratpoison and I'm not sure I'll ever go back:lolflag:

mehturt
August 28th, 2009, 04:13 PM
Looks much better now, thanks. I subscribed to the Xorg bug as well.

ert45
April 15th, 2010, 01:01 PM
Hello,

The solution proposed in https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/186354 worked for me: disable xinerama.

On ubuntu 9.04 (using an Intel GMA chipset), I added this at the bottom of my /etc/X11/xorg.conf and then had no more problem after restarting the X server:

Section "Serverflags"
Option "Xinerama" "false"
Endsection

ert45
April 15th, 2010, 01:17 PM
Hello,

The solution proposed in https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/186354 worked for me: disable xinerama.

On ubuntu 9.04 (using an Intel GMA chipset), I added this at the bottom of my /etc/X11/xorg.conf file and then had no more problem after restarting the X server:

Section "Serverflags"
Option "Xinerama" "false"
Endsection