restricted drivers (ATI) causes Xorg memory leakage

Bug #353800 reported by e.s.t on 2009-04-02
104
This bug affects 14 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Undecided
Unassigned

Bug Description

tested in Ubuntu 9.04 beta x86_64 and in Kubuntu beta 9.04 i386.

After fresh install, the first thing I usually do is to enable restricted drivers for my ATI 3450. After automatic installation and reboot, everything is ok, except that Xorg process in system monitor uses about 80MB of RAM, and despite everything, memory usage of Xorg is growing with time. After 2h, in system monitor Xorg process was taking something about 1,2GB of RAM. Then I installed Kubuntu (this time i386), and after enabling restricted driver for ATI, problem was the same, it looks like Xorg memory usage grows to unlimited.

The problem did NOT occurred while un-installing restricted ATI dirver and replacing it with standard open driver for ati. Xorg memory usage was then constant during hours of usage (at about 60 - 80 MB).

Update: Also see here: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/351186 (slow unminimizing with ati card and desktop effects enabled).

My specs:
Asus ATI Radeon 3450 256MB PCI Ex
Intel Core 2 Duo 7400
Gigabyte E-P45 DS3LR
Kingston Hyper X (800) 2GB DRAM2

HammerHead66 (hollycowbatman23) wrote :

Can you post your log file /var/log/Xorg.0.log so we can see? Thank you. rowbgcolor=lightgreen

Changed in ubuntu:
status: New → Incomplete
e.s.t (e.s.t) wrote :

try these commands in your Terminal:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

and let me know of the out come...thank you.

--- On Fri, 4/10/09, e.s.t <email address hidden> wrote:

From: e.s.t <email address hidden>
Subject: [Bug 353800] Re: restricted drivers (ATI) causes Xorg memory leakage
To: <email address hidden>
Date: Friday, April 10, 2009, 9:41 AM

** Attachment added: "Xorg.0.log"
   http://launchpadlibrarian.net/25215394/Xorg.0.log

--
restricted drivers (ATI) causes Xorg memory leakage
https://bugs.launchpad.net/bugs/353800
You received this bug notification because you are a direct subscriber
of the bug.

Status in Ubuntu: Incomplete

Bug description:
tested in Ubuntu 9.04 beta x86_64 and in Kubuntu beta 9.04 i386.

After fresh install, the first thing I usually do is to enable restricted drivers for my ATI 3450. After automatic installation and reboot, everything is ok, except that Xorg process in system monitor  uses about 80MB of RAM, and despite everything, memory usage of Xorg is growing with time. After 2h, in system monitor Xorg process was taking something about 1,2GB of RAM. Then I installed Kubuntu (this time i386), and after enabling restricted driver for ATI, problem was the same, it looks like Xorg memory usage grows to unlimited.

The problem did NOT occurred while un-installing  restricted ATI dirver and replacing it with standard open driver for ati. Xorg memory usage is then constant during hours of usage (ate the level of 60 - 80 MB).

My specs:
Asus ATI Radeon 3450 256MB PCI Ex
Intel Core 2 Duo 7400
Gigabyte E-P45 DS3LR
Kingston Hyper X (800) 2GB DRAM2

e.s.t (e.s.t) wrote :

I did as you said, then reboot.
Now Xorg uses about 140 MB, which is high enough, but it doesn't grow up any more, so it is "acceptable" I guess.

HammerHead66 (hollycowbatman23) wrote :

I'm glad that worked for you. If you need anymore help please fill free to contact me.

--- On Tue, 4/14/09, e.s.t <email address hidden> wrote:

From: e.s.t <email address hidden>
Subject: [Bug 353800] Re: restricted drivers (ATI) causes Xorg memory leakage
To: <email address hidden>
Date: Tuesday, April 14, 2009, 12:29 PM

I did as you said, then reboot.
Now Xorg uses about 140 MB, which is high enough, but it doesn't grow up any more, so it is "acceptable" I guess.

--
restricted drivers (ATI) causes Xorg memory leakage
https://bugs.launchpad.net/bugs/353800
You received this bug notification because you are a direct subscriber
of the bug.

Status in Ubuntu: Incomplete

Bug description:
tested in Ubuntu 9.04 beta x86_64 and in Kubuntu beta 9.04 i386.

After fresh install, the first thing I usually do is to enable restricted drivers for my ATI 3450. After automatic installation and reboot, everything is ok, except that Xorg process in system monitor  uses about 80MB of RAM, and despite everything, memory usage of Xorg is growing with time. After 2h, in system monitor Xorg process was taking something about 1,2GB of RAM. Then I installed Kubuntu (this time i386), and after enabling restricted driver for ATI, problem was the same, it looks like Xorg memory usage grows to unlimited.

The problem did NOT occurred while un-installing  restricted ATI dirver and replacing it with standard open driver for ati. Xorg memory usage is then constant during hours of usage (ate the level of 60 - 80 MB).

My specs:
Asus ATI Radeon 3450 256MB PCI Ex
Intel Core 2 Duo 7400
Gigabyte E-P45 DS3LR
Kingston Hyper X (800) 2GB DRAM2

e.s.t (e.s.t) wrote :

Thank you.

AndresClari (andresclari) wrote :

I can confirm this bug in Ubuntu 9.04 x86_64 with all updates applied, Xorg memory keeps growing without control filling both physical memory and swap.

Specs:
iMac 20"
Intel Core2Duo 2.4ghz
ATI Radeon 2600HD

Changed in ubuntu:
status: Incomplete → Confirmed
e.s.t (e.s.t) wrote :

Today I made fresh install (9.04 RC i386).
After enabling restricted driver for radeon, I have again same bug as wrote at the beginning.

description: updated
Final_x (lu-4985) wrote :

hi I have got the same problem with you , and the same Xorg.0.log <when i use restricted ATI driver>
when I remove <restricted ATI driver> everything goes where except can't use Visual Effects
Waiting for newer driver.......

Yuriy Senko (yura-senko) wrote :
Download full text (4.5 KiB)

I have got the same probelm on 9.04 release (i386).

lspci:
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub
(rev 02)
00:01.0 PCI bridge: Intel Corporation 82945G/GZ/P/PL PCI Express Root Port
(rev 02)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller
(rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1
(rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2
(rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1
(rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2
(rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3
(rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4
(rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller
(rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge
(rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller
(rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH...

Read more...

Yuriy Senko (yura-senko) wrote :

P.S. There is my xorg.conf (restricted driver is installed and 2 monitors are connected).

Thanks.

Aisthesis (aisthesis) wrote :

Same issue. Below is lspci and xorg.conf. Attached is Xorg.0.log

lspci
01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3400 Series
 Subsystem: Sony Corporation Device 9035
 Flags: bus master, fast devsel, latency 0, IRQ 2296
 Memory at c0000000 (32-bit, prefetchable) [size=256M]
 I/O ports at 6000 [size=256]
 Memory at d0020000 (32-bit, non-prefetchable) [size=64K]
 Expansion ROM at d0000000 [disabled] [size=128K]
 Capabilities: [50] Power Management version 3
 Capabilities: [58] Express Legacy Endpoint, MSI 00
 Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
 Capabilities: [100] Vendor Specific Information <?>
 Kernel driver in use: fglrx_pci
 Kernel modules: fglrx

xorg.conf
Section "ServerLayout"
        Identifier "aticonfig Layout"
        Screen 0 "Default Screen" 0 0
EndSection

Section "Files"
EndSection

Section "Module"
        Load "glx"
        #Disable "dri2"
EndSection

Section "Monitor"
        Identifier "Configured Monitor"
        Gamma 0.80 0.80 0.80
EndSection

Section "Device"
        Identifier "Configured Video Device"
        Driver "fglrx"
        BusID "PCI:1:0:0"
EndSection

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

Yuriy Senko (yura-senko) wrote :

HI again,
I have partially fixed the problem, by rewriting my xorg.conf, and removing /etc/ati/amdpcsdb.
After these manipulations I was able to configure 2 monitors using ATI restricted driver. But, Xinerama still works bad. When it's disabled I have the same picture on both monitors, and when it's enabled I have two separate screens, but I cannot drag opened windows from one screen to another, only mouse can cross the border between monitors.

Rad (rad-xclouds) wrote :

ATI card, after two days, my xorg is up to 1.2 GB. Is there any resolution for this?

Matt C (proteus400) wrote :

I can confirm this issue (Xorg fglrx leaks like a sieve).

I've upgraded my work machine to the latest Ubuntu 9.04. Now Xorg fills up my RAM and swap in less than 12 hours and I have to restart X to clear it up.

Xorg memory usage from 'top':
  Virtual 3,358m Resident 654M.

Xorg driver: fglrx
CPU: Intel(R) Core(TM)2 Duo CPU ("64-bit")
RAM: 2GB
Device: 01:00.0 VGA compatible controller: ATI Technologies Inc RV610 video device [Radeon HD 2400 PRO]
Daily apps: Evolution, Eclipse, Terminal and Firefox.

Canoblus (noto99) wrote :

I can confirm this bug. The problem emerged since I updated to 9.04. I also have an ATI HD 4850. After some hours Xorg uses several GBs of memory. It takes noticably longer compared to 8.04 to maximize/minimize windows (it seems to hang for 2 seconds, then the window appears). Xorg is using almost 100% of one core (I have 4).

I wonder why this bug still isn't fixed, given that it is known for almost a month now and so many people are having this problem, sometimes making the system unusable, because limited memory is used up pretty fast.

e.s.t (e.s.t) wrote :

"" It takes noticably longer compared to 8.04 to maximize/minimize windows (it seems to hang for 2 seconds, then the window appears).""

> I can confirm that too. Maximising windows lags a lot, and only what seems to help is completely disabling desktop effects (compiz).

"" I wonder why this bug still isn't fixed, given that it is known for almost a month now and so many people are having this problem, sometimes making the system unusable, because limited
 memory is used up pretty fast.""

> Remember that problem doesn't occur while using open source driver (default after install is xf86-video-ati afaik). Thus, chances are, the complains must go to AMD/ATI because the one causing problems is proprietary (closed) driver, so Ubuntu-dev can't fix, change, analyse or patch restricted driver.

e.s.t (e.s.t) wrote :

I think this bug: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/351186?comments=all, is very similar and has the same cause of the problem.

description: updated
tags: added: ati fglrx proprietary radeon xorg
Aisthesis (aisthesis) wrote :

bug: 351186 is not related.
I've applied the patch there yesterday and still have the memory leak.

Those of you who want to try this patch for lag, it should fix it. But it will not fix the leak. It did not for me anyway.

Aisthesis (aisthesis) wrote :

Memory leak fixed on my machine. NOT completely, but the change is DRASTIC compared to what I was seeing before.

For testing, I opened firefox which had 12 tabs, system monitor, nautilus, terminal with transparency, and evolution. I also ran glxgears and I am seeing 500-600 FPS more! glxgears is now up to 1500-1600 on HD3400 Series.

I booted with Xorg at 65mb, after running these applications and glxgears. Also maximizing and minimizing each window repeatedly since this clearly showed the leak the most, Xorg is freeing up memory and garbage collecting quite well! Xorg is now at 76-77mb. Open is firefox with 5 tabs and system monitor. Normally before, Xorg would be at 130-170mb at least after this. Especially after minimize and maximize so many times. So at this point, an 11-12mb increase after all that is VERY acceptable compared to before.

Anyway, what I did was this...

I downloaded the official driver from ATI's website. 9.4 catalyst.

I followed the instructions to install the drivers manually from the link below line for line;
When I built the packages I had the previous driver still installed from envyng. I also left compiz running with all my desktop effects enabled. I'm not sure how relevant that is, but it is what I did.

This is not for the faint of heart! Be cautious and patient, READ CAREFULLY and follow the instructions word for word! If you mess this up, ubuntu will more than likely not be bootable into the GUI after. If something is wrong, ubuntu will freeze at boot probably with some messed up crap on the screen. You will have to remove the fglrx packages from the recovery terminal. (which happened to me once already).
http://wiki.cchtml.com/index.php/Ubuntu_Jaunty_Installation_Guide#Installing_the_drivers_manually

After installation was complete, I did not reboot immediately.
I backed up first /etc/ati/amdpcsdb and then removed it from that directory.
Then I rebooted...

After reboot, i DID NOT do aticonfig --initial OR aticonfig --input=/etc/X11/xorg.conf. And I don't plan on it.

My xorg.conf is a mess at the moment and not complete, but I attached it anyway since the video card driver settings I am using are there and are complete. But I've read that without running aticonfig --input, the ati driver doesn't read the xorg.conf settings. Not sure one way or the other right now honestly. But I'm not running it.

Anyway, Good luck!

ingotheuser (ingo-hassel) wrote :

Hi, I have the same problem. Onboard HD 3200. Does anyone know if ATI/AMD works on this bug or is it a problem of Ubuntu 9.04?

Regards
Ingo

e.s.t (e.s.t) wrote :

This is not only Ubuntu, I've had the same problem (plus unminimize lag problem), on Arch Linux.

QIII (qiii) wrote :

The problem is not Linux, Ubuntu, Compiz or your video card.

I looked at www.x.org's bug reports and was directed to bugzilla. Sorry. Forgot to C&P the link.

This is a regression from an earlier Xorg bug. It was recently reopened.

Priority: High
Severity: Major.

fasmide (fasthud) wrote :

Hi, I have the same problem.

with:

OpenGL renderer string: ATI Mobility Radeon HD 3400 Series

fglrx installed with envyng (8.600-0ubuntu2)

also using the xserver-no-backfill ppa

Lenovo R500 2732-6AG

cdude (cdude996) wrote :

Same problem here, ati Radeon HD 2900; up-to-date ubuntu jaunty with no modifications.

Neil_C (neil-chesh) wrote :

I had the same problem with an up to date Ubuntu Jaunty and a ATI Radeon HD 3870.

I did the same as Aisthesis above and downloaded the 9.4 driver from the ati.amd.com website and installed that and it's been much better. I no longer need to reboot everyday. (uptime 4 days)

Rad (rad-xclouds) wrote :

I did the same as Aisthesis and my xorg died - could not even boot up properly. I removed the drivers, still could not boot up properly :(

I was wondering if I should wait or move on from compiz. I am using an ATI card too.
If this is an X problem, anybody has any idea who long we have to wait?

Thx.

Aisthesis (aisthesis) wrote :

You must have missed a step to kill xorg and stop xserver from loading. I said this in my post that you can stop your GUI from being bootable.

Have you tried purging, rm everything from /etc/ati (just in case, but this should be removed with purge) and reinstalling the ati-drivers through the recovery terminal? Also, did you follow the ati driver installation instructions and make sure you had all the required packages to build the drivers for your system correctly? Also make sure your settings in xorg.conf are setup correctly for all devices? And if the fglrx driver is not installed, make sure your xorg.conf is not looking for it.

You might also want to try from a terminal dpkg-reconfigure -xserver-xorg once you reinstall the drivers.

I just installed ati fglrx 9.5 today and reverted back to 9.4 with my own guide. You had to have missed a step. Do you see a black screen or does xorg actually report an error before you even get that far?

Also, some googling might help as well to get you back in the GUI. I found these in the first set of results. You should also maybe start a post if your issue is not generic.

http://forumubuntusoftware.info/viewtopic.php?f=58&t=3157
http://ubuntuforums.org/showthread.php?t=690760

Feel free to email me, sorry you're having issues,
-Ais

Rad (rad-xclouds) wrote :

Thx Ais, I will look more into it. So far, I just reboot every morning and it is good for the whole day.

Guillermo (gmlopez-mackinnon) wrote :

Any news about this issue? Is there anyone working on it yet?

I'm experiencing the same. Xorg grows up to 1.2 gigs in few hours (ATI HD3400). I'll try out Aisthesis's workaround but if this is an xorg issue as QIII stated, I cannot understand how a driver reinstall may help...

apetrelli (antonio-petrelli) wrote :

Specs:
Asus F3Sa, Ati hd2600, 4GB RAM

When effects are enabled, I noticed that the memory increases even if I minimize/maximize in turn a window, with a rate of 4 MB at a type (seen in system monitor).
When I shut the effects down, *without* changing the driver, the memory increase stop (in my case at 126 MB).

apetrelli (antonio-petrelli) wrote :

Sorry, I forgot to tell that I am using Kubuntu Jaunty.

BTW, probably this bug in x.org is somewhat related, though it refers to the CVS version:
http://bugs.freedesktop.org/show_bug.cgi?id=22171

chekhovs1 (chekovs) wrote :

I confirm this on my Lenovo T400, ATI mobility radeon 3400 series, Jaunty 9.04, with Canonical's version of the proprietary driver. If I have desktop effects enabled (I use Gnome), Xorg's memory usage goes up without bound up to a few gigabytes per a day. Disabling desktop effects stops this.

Ramon (ram130-gmail) wrote :

Well I did what Ais said and my problem seems to be good so far. After a few hours my Xorg would approach 1.5GB, when i disable the effects it would go down to 200MB. Now since trying Ais suggestion of reinstalling from ATI website I am happy to say after a four hour uptime its @ 227MB(started @ 64mb). I have thus far had Firefox with 32tabs open, xp in a virtual machine, skype, opera and pidgin all open and closed. So far so good. Its still kinda big but I can work alot better now. Will keep you posted as my system stays on.

I have EXACTLY THE SAME experience as the user above, after manually upgrading Ubuntu 9.04 to ATI driver 9-6.x86_64 (released about June, 15). Still huge memory hungry, but system is usable.

I confirmed that issue. Testing new version of the -fglrx driver to our xorg-edgers PPA,
from here

  https://edge.launchpad.net/~xorg-edgers/+archive/ppa

similiar bug is https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/372345

It seems that memory leakage was gone. But i've got back to the bug https://bugs.launchpad.net/bugs/351186 slow unminimizing with ati card and desktop effects enabled after installing xorg from xorg-edgers PPA

Please try if this happens to you too:
- when memory grows up, open system manager;
- press CTRL+ALT+L to lock the session, then enter your password;
- back on the desktop, check system manager.

On my system, it shows that ~200MBs of memory is instantly freed.

svaens (svaens) wrote :

@Ramon + Aisthesis

I am experiencing the lag problem which others have mentioned. I've not left my laptop on for more than a day, so i haven't noticed any memory leak problem (though, I wasn't looking for it).

Due to to the maximising lag problem, I disabled desktop effects.

Does installing the official driver from ATI's website. 9.4 catalyst, as you have done, fix the lag problem? Or were you guys never experiencing this yourselves?

p.s. I am using Ubuntu Jaunty, on Sony vaio with ATI Mobility Radeon HD 3470

Ramon (ram130-gmail) wrote :

@svaens

Well i wasn't experiencing any lags. But what i notice is the fact that my monitor now turns off without a problem when set. I also notice some of my video problems fixed, such as full screen video which would sometime crash my system for no reason. For my system I am using the ATI HD3200 on board graphics. To answer, try the installation and see if your lag problem goes away. I have another Ubuntu install for my mother, sometimes there would be a lag whenever something flash related pops up in the browser. After installing from the ATI website i notice an improvement. My suggestion is to try it and see what happens.

For those wondering, my Xorg has been good to me since then. Its currently at 147MB with a two day uptime, 10 tabs in Mozilla and Opera. So far so good.

Aisthesis (aisthesis) wrote :

Installing the ATI driver (from their site) fixes the Xorg memory leak. Not entirely though, Xorg will still leak over time, just not as severe. When upgrading, make sure you remove the previous version completely and all configuration files in /etc/ati from the previous version or the memory leaks will be extremely severe. http://k3mist.com/linux/ati-catalyst-9-9-fglrx-8-650-installation/

The lag fix (PPA) can be found at the link below, this will replace Xorg.
https://edge.launchpad.net/~ubuntu-x-swat/+archive/xserver-no-backfill

affects: ubuntu → fglrx-installer (Ubuntu)
smoosh (lolomcdoo) wrote :

This is interesting... I upgraded Xorg first but left fglrx alone, and the memory leak is MUCH less significant. I randomly had to restart compiz after running up the memory watching full screen video, and it reset the memory to what it had been when I first booted the computer! So, for me, on a SOny Vaio with ATI Radeon hd 3400 series, I just added a custom compiz launcher in cairo dock, and I just reset it when necessary. seems to work good so far. No issues with the new Xorg.

Bryce Harrington (bryce) on 2010-02-26
tags: added: kubuntu

got this also in catalyst 10.4 and 10.5 and ubuntu 10.4 :(
however memory leaked can be reclaimed when running the command 'glxinfo'.

bugbot (bugbot) on 2011-04-27
tags: added: jaunty
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.