Memory leak fixed on my sony vaio laptop with an HD3400 series. NOT completely, xorg will still leak over time (about 60mb over 8 hours and I think some of this memory is re-used for effects which will not increase the memory any further when opening, closing, etc). The change is DRASTIC compared to what I was seeing. Before this xorg would leak anywhere between 500-700mb over 4 hours of use.
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 really 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=/etc/X11/xorg.conf, 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.
For testing, I opened firefox which had 12 tabs, system monitor, nautilus, terminal with transparency, netbeans 6.7 beta 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 with windows still open is VERY acceptable compared to before.
I posted this info on launchpad a couple days ago.
Anyway, Good luck!
Launchpad Link for this bug;
https://bugs.launchpad.net/ubuntu/+bug/353800/

[...] the previous version. Besides the old configuration possibly still in use after a reboot, you get serious memory leaks in Xorg caused by the ATI Catalyst driver that resemble the same leak you get when using the driver provided by [...]