Memory leak

Bug #1314787 reported by Pekka Kola
118
This bug affects 24 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Confirmed
High
Unassigned
linux (Ubuntu)
Triaged
High
Unassigned

Bug Description

I upgraded my PC from Ubuntu 13.10 to 14.04 (released one). After upgrade I found the PC slows down soon even without apps running on it. When checking with system monitor I found all the physical memory was full and the swap file was in use (which never happened with 13.10). I restarted the PC and left it alone. After six hours memory consumption of xorg went from original 250MB to 1,3GB. I guess there is a memory leak in the process.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: xorg 1:7.7+1ubuntu8
ProcVersionSignature: Ubuntu 3.11.0-20.34-generic 3.11.10.6
Uname: Linux 3.11.0-20-generic x86_64
NonfreeKernelModules: fglrx
.tmp.unity.support.test.0:

ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Wed Apr 30 23:05:47 2014
DistUpgraded: 2014-04-26 21:44:20,660 DEBUG enabling apt cron job
DistroCodename: trusty
DistroVariant: ubuntu
DkmsStatus: fglrx, 13.350.1, 3.11.0-20-generic, x86_64: installed
ExtraDebuggingInterest: Yes, if not too technical
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series] [1002:68f9] (prog-if 00 [VGA controller])
   Subsystem: Hightech Information System Ltd. Device [1787:2291]
InstallationDate: Installed on 2013-10-29 (183 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 004 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: System manufacturer System Product Name
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.11.0-20-generic root=UUID=a4de809d-e263-4318-8bf0-1bd1422076e3 ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: Upgraded to trusty on 2014-04-26 (4 days ago)
dmi.bios.date: 09/11/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1105
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4N78 SE
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1105:bd09/11/2009:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4N78SE:rvrRevX.0x:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
version.compiz: compiz 1:0.9.11+14.04.20140409-0ubuntu1
version.fglrx-installer: fglrx-installer N/A
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.52-1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.1.0-4ubuntu5
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.1.0-4ubuntu5
version.xserver-xorg-core: xserver-xorg-core 2:1.15.1-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.8.2-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.3.0-1ubuntu3
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.910-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.10-1ubuntu2
xserver.bootTime: Wed Apr 30 22:53:24 2014
xserver.configfile: default
xserver.devices:
 input Power Button KEYBOARD, id 6
 input Power Button KEYBOARD, id 7
 input Logitech USB Optical Mouse MOUSE, id 8
 input AT Translated Set 2 keyboard KEYBOARD, id 9
xserver.errors:
 open /dev/dri/card0: No such file or directory
 AIGLX error: failed to open /usr/X11R6/lib64/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib64/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
 AIGLX error: failed to open /usr/lib64/dri/fglrx_dri.so, error[/usr/lib64/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
 AIGLX error: failed to open /usr/X11R6/lib/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.15.1-0ubuntu2
xserver.video_driver: fglrx

Revision history for this message
Pekka Kola (pekka-kola-m) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
Revision history for this message
Mateus Araújo (iris-n) wrote :

I suspect the memory leak is related to fglrx. After I removed it, Xorg stopped eating my RAM. Note that OP is also using fglrx.

Revision history for this message
marc (a5578162) wrote :

Same here, trusty and fglrx, eventually xorg eats up 3.5 gb of RAM and I have to restart. Otherwise it will eventually lock up the entire system (can't alt-ctrl out to a terminal). However I can still ssh into the machine, but xorg refuses to be killed.

xrestop doesn't show anything with more than 35MB of pixmaps, maybe 80MB total. X seems to leak memory when using graphically intense programs (e.g. a game that uses hardware acceleration). I compiled the latest fglrx driver from AMD (ahead of the repository fglrx) and the same thing happens. This all did not happen before the upgrade to trusty...

Revision history for this message
Robert (modrobert) wrote :

I have the same problem, memory leak galore, fglrx in combination with Xorg and the selected window manager.

Ironically the bug seem to trigger memory leaks in Xorg a lot faster when using Gnome classic login (metacity), like 1GB per day, than it does when you login choosing Unity (default), where it leaks roughly 200mb per day for me. In comparison, on another heavily used desktop with Ubuntu 12.04 and nvidia drivers, Xorg allocates roughly 200mb after a month uptime using Gnome classic login (metacity).

I guess one of the reasons this bug report is left unassigned, because Unity in general is "leaky", and has been since launch with slowly growing Xorg, so this is expected to some extent.

So either use Unity login as workaround, or use classic login (metacity) and watch Xorg leak faster than you can type this command:

ps -eo fname,rss | grep Xorg

Revision history for this message
RonW (warden-ronald) wrote :

I have the same problem since I upgraded from 13.10 to 14.04 on my TOSHIBA S50D. AMD A10 4 core processor and a RADEON HD 8500 dual graphis card. With only the system monitor running in a 24 hour period Xorg consumes 7GB of pgysical memory and 4 GB of swap space.

Another symptom, is that on the systm monitor it shows the 4 cores, but they appear to working on the the same task, amost like they were acting as a single core processor. I initially saw this same behaviour when I install 13.04. The resilution was to install the AMD driver, however, when I attempt to install the AMD driver the installation process complains that there is an existing fglrx and to remove it. Once I remove the fglrx package I boot into "LOW GRAPHICS MODE". Again, if I user the terminal in low graphics mode and try to complie the AMD driver, the process trys to create a fglrx package and the installation process complains that the is an existing fglrx installed package.

Under Additional Drivers, I get the memory leak whether I use the Xorg driver, or the fglrx-updates or the fglrx option. I also do not see any of the four cores operating independently.

I would appreciate suggestion, because I am running dry.

Thanks

Revision history for this message
Nipul Gandhi (h-noreplyever) wrote :

I have the same problem. I have a DELL XP with 8GB and a AMD Radeon 5700
XOrg will grow to take up around 5-6 GB every 24 hours. I have to kill Xorg with "sudo restart lightdm" daily.

The issue only started after I upgraded from Ubuntu 13.10 to 14.04

Please help !

Revision history for this message
GVS (gvscheik1-g) wrote :

And I have the same issue on my Toshiba C650D w/ 3 GB and AMD Radeon 6350. Being that it is an older laptop and has only 3 GB memory, I have to either restart or kill and restart Xorg many times a day. Terrible, and soon to be a deal breaker for Xubuntu if a fix is not released very soon.

This started with installing Trusty over 12.04.

Revision history for this message
GVS (gvscheik1-g) wrote :

@Nipul Gandhi

Based on the date of your comment, I ask if you noticed the memory leak exacerbated after the recent Network-manager-gnome 0.9.8.8-0ubuntu4.3 update from Network-manager-gnome 0.9.8.8-0ubuntu4.2?

After the above NMG update, on my system, Xorg uses up all memory several times a day; prior to the update it was once a day or once every two days. I have filed a NWG bug (bug #1351903) regarding this.

Timo Aaltonen (tjaalton)
affects: xorg (Ubuntu) → fglrx-installer (Ubuntu)
Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

If you get a worser problem with the updated network-manager-gnome, does killing nm-applet free some of the leaked memory?

Changed in fglrx-installer (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
GVS (gvscheik1-g) wrote :

No, it does not release any of the memory used by Xorg, just the memory used by NMG. One can exit all open apps, and even kill many processes and Xorg retains the leaked memory.

There is definitely some relation between the latest NMG update and the Xorg memory leak. I have since backracked to Network-manager-gnome 0.9.8.8-0ubuntu4.2 simply to have a usable system for more than a few hours.

Note: The memory leak, both before and after the NMG update begins as soon as any network activity through either eth0 or wlan0 is initiated. Prior to this any leak is minimal; after it, the leak is extreme. Using as app such as "Glances" etc., you can actually watch the megabytes leak away every 2 - 5 seconds.

Revision history for this message
GVS (gvscheik1-g) wrote :

To be clear (which the above was not):

The "extreme" memory leakage mentioned in the last paragraph above is of course, AFTER the NMG update. However, the leak before the NMG update is still initiated by activity through the network interfaces, it is just not anywhere near as extreme.

Revision history for this message
Eli (iidbox) wrote :

Hi! Is anybody working on the bug? I find myself in the same situation with my AMD graphic card, memory Xorg leak is about 2 GB per day. So i have to restart the system every once in a while.

Revision history for this message
GVS (gvscheik1-g) wrote :

I do not know if anyone is working on this horrible bug.

Being that I noticed users here said they "upgraded" to Trusty (as did I), I decided to do a clean install to see if indeed the issue was confined to upgraded systems.

Alas, the memory leak is as bad as ever on a clean install.

Trusty is supposed to be "the best ubuntu ever" ... well I have several severe problems with it that did not exist prior to Trusty. Sorry, just frustrated ...

Revision history for this message
Eli (iidbox) wrote :

I also have done a clean install of the "best ubuntu yet", and my system is affected by the bug, xorg is leaking 2GB/day as mentioned above.

I am new to Ubuntu and previosly was using mac. So ubuntu feels familliar to me, but the buginess bugs me...

In obinions what linux needs is not features, but stable core functionality. I'd rather prefer working on a systems that lacks latest features but which is rock solid and efficient. This is true not only foor servers but also for consumer PCs

We were considering installing Ubuntus at our office, but droped the idea beacase we could not be certain that it will not be giving us a support headache. May be I was unlucky, but despitre common notion that windows is a buggy beast, it is my expericne that Ubuntu has more troubles, conflicts etc... So far Mac is the most trouble-free computer i used.

Revision history for this message
GVS (gvscheik1-g) wrote :

I am very pleased to say that on my system the memory leak "appears" to be corrected by upgrading to generic kernel 3.13.0.33.39.

Xorg is once again releasing memory.

It has been only 24 hours of up time so I have my fingers crossed. Before the kernel upgrade I would have had to reboot at least twice.

Revision history for this message
Pekka Kola (pekka-kola-m) wrote :

@GVS (gvscheik1-g)

Is you system still up and running without leaks? I have got 3.11.0-20-generic and the leak is there. I just wonder why Canonic is not interested at all this major bug.

Revision history for this message
Hanmac (hanmac) wrote :

using "3.13.0-33-lowlatency" with fglrx beta driver[1], leak still there ...
will test today new installed "3.13.0-34-lowlatency" and look if it still happens

[1] http://support.amd.com/en-us/kb-articles/Pages/latest-linux-beta-driver.aspx

Revision history for this message
GVS (gvscheik1-g) wrote : Re: [Bug 1314787] Re: Memory leak

No leaks since the kernel upgrade. However, I have stopped latest
updates of Network-Manager-Gnome at version 0.9.8.8-0ubuntu4.2 due to
the fact that the latest update made the memory leak so bad I could not
be up for more than a couple of hours without a reboot.

Being that I am unwilling to install the NMG update to see if the new
kernel fixes that as well, all I can say is that "on my system" Xorg is
releasing memory now ... even though it still uses a lot... but I have
been up for over two days without a reboot and am only using 38% of my
memory ... Xorg is still the biggest hog but at least it is now
bearable. Note that I am a very heavy user so the system is run hard...
so far so good.

If you can revert back to NMG 0.9.8.8-0ubuntu4.2, you can prevent an
update by both system updates and system upgrades by adding these line
to the "/etc/apt/preferences" file (if it does not exist, create it):

Package: network-manager-gnome
Pin: version 0.9.8.8-0ubuntu4.2
Pin-Priority: -1

Package: libnm-gtk-common
Pin: version 0.9.8.8-0ubuntu4.2
Pin-Priority: -1

Package: libnm-gtk0
Pin: version 0.9.8.8-0ubuntu4.2
Pin-Priority: -1

Use Timeshift <https://launchpad.net/%7Eteejee2008/+archive/ubuntu/ppa>
to back up your setup and try the kernel update. With the above config
my system is doing OK now.

Good luck!

Gordon VS
<email address hidden>

On 14-08-15 01:22 AM, Pekka Kola wrote:
> @GVS (gvscheik1-g)
>
> Is you system still up and running without leaks? I have got
> 3.11.0-20-generic and the leak is there. I just wonder why Canonic is
> not interested at all this major bug.
>

Revision history for this message
GVS (gvscheik1-g) wrote :

How I stopped the Xorg memory leak (or slowed it down enough to not notice it):

1) I Did NOT update to latest Network-Manager-Gnome update (0.9.8.8-0ubuntu4.3).
2) I updated the kernel via system updates to Generic Linux kernel 3.13.0.34.40
3) Installed latest AMD ATI Drivers 14.8 available here:
http://support.amd.com/en-us/download/embedded?os=Linux+x86&rev=13.151
4) I did everything exactly as follows:

NOTE!!!! This worked well for me. I cannot promise success for you. However, I thought I would share this because the memory leak basically made my system unusable. Hopefully it will work on your system as well. Good Luck!

To stop system updates from updating to NMG 0.9.8.8-0ubuntu4.3, either edit or create the file “/etc/apt/preferences” and add these lines (note that even a system upgrade using apt will leave them alone. Reboot.):

Package: network-manager-gnome
Pin: version 0.9.8.8-0ubuntu4.2
Pin-Priority: -1

Package: libnm-gtk-common
Pin: version 0.9.8.8-0ubuntu4.2
Pin-Priority: -1

Package: libnm-gtk0
Pin: version 0.9.8.8-0ubuntu4.2
Pin-Priority: -1

Kernel update: Use Timeshift, Clonezilla, or some other reliable app to back things up!!!

Next, and for pete's sake, uninstall your proprietary ATI drivers BEFORE updating the kernel or you will likely pooch your system. Reboot, and update the kernel to the version above. Restart your system.

ATI 14.8 driver install: (I gathered off the 'net over a year or so ago. I do not remember who posted it, but the credit is his.)

Install the following dependencies in order using the command lines below:
sudo apt-get install dh-modaliases
sudo apt-get install execstack

Assuming you downloaded the ATI 14.8 drivers from the above link, extract the ZIP file and open a terminal in the extract folder.

Build the install debs by typing the following at the command prompt (note, this will take quite a long time so be patient):
sudo sh ./amd-driver-installer-14.201.1005-x86.x86_64.run --buildpkg Ubuntu/trusty

To install the packages type the following at the command prompt in the folder where the package are:
sudo dpkg -i fglrx*.deb

(Note, if you get a error message saying that you have broken dependencies, follow the on-screen instruction to repair them. This will be “apt-get install -f”. Let it finish and then retype the “sudo dpkg -i fglrx*.deb” command.

When the install is finished, enable your new settings by typing the following at the command prompt:
sudo aticonfig --initial -f

Restart your system.

You should now have your AMD Catalyst Control Center icons in your menus. AND, the Xorg issue should no longer dominate your Ubuntu usage.

Backup your working config!

Revision history for this message
Pekka Kola (pekka-kola-m) wrote :

Bug #1354350 looks like the same as this one.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for fglrx-installer (Ubuntu) because there has been no activity for 60 days.]

Changed in fglrx-installer (Ubuntu):
status: Incomplete → Expired
Revision history for this message
clickwir (clickwir) wrote :

FWIW, I have Kubuntu 14.10 with an AMD 5770 video card. If i use the fglrx or fglrx-updates drivers, reboot, within 6 hours my 8GB RAM is used up and swap is thrashing.

If i switch back to the xserver-xorg-video-ati driver, reboot, then apt-get --purge autoremove, then reboot again... memory use is fine. I've been on for about 6 hours now and use is just under 1GB according to ksysguard.

Of course now I cannot play Steam games like TeamFortress 2, which works great if I'm using the fglrx-updates driver. But it's a real pain using that driver and having to reboot every 4 hours.

Changed in fglrx-installer (Ubuntu):
status: Expired → Confirmed
Revision history for this message
clickwir (clickwir) wrote :

Still a big problem.

Revision history for this message
GVS (gvscheik1-g) wrote :

Backup using Clonezilla (recommended).

STEP ONE: Remove proprietary AMD / ATI drivers.

STEP TWO:

What kernel are you using? Type in terminal:

uname -r

If you are not using this kernel (3.14.37) download it here as I know it
works very well:

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.37-utopic/

You will need all three of the following packages (if your system is 64
bit; if 32 bit, download the corresponding i386 packages):

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.37-utopic/linux-headers-3.14.37-031437-generic_3.14.37-031437.201503261136_amd64.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.37-utopic/linux-headers-3.14.37-031437_3.14.37-031437.201503261136_all.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.37-utopic/linux-image-3.14.37-031437-generic_3.14.37-031437.201503261136_amd64.deb

KERNEL INSTALL INSTRUCTIONS (note, do this from a terminal in the folder
where the above kernel debs are stored):

INSTALL KERNELS:

sudo dpkg -i linux-headers-3.14.37-*.deb linux-image-3.14.37-*.deb

Reboot your system.

STEP THREE:

Do not use the drivers installed via the "Additional Drivers" app. Make
sure you are using these drivers for your AMD / ATI card:

http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip

Here are the install instructions for the above drivers. Make sure you
are patient as the build and install procedures take a fair amount of time:

#prerequisite packages#
sudo apt-get install build-essential cdbs dh-make dkms
sudo apt-get install execstack dh-modaliases fakeroot libqtgui4

# If you are 64 bit, install these too
sudo apt-get install ia32-libs ia32-libs-multiarch:i386
sudo apt-get install lib32gcc1 libc6-i386

Correct dependency issues with:
apt-get install -f

# Create and install deb packages for trusty after unzipping the AMD
driver package:

sudo sh ./insert_amd_driver+package_name_here.run --buildpkg Ubuntu/trusty

sudo dpkg -i fglrx*.deb

# Enable new settings (make sure you do this before rebooting).
sudo aticonfig --initial -f

# Reboot your PC

Your problem should now be solved.

It is recommended you keep the install packages for both the video
drivers and the kernel. Keep the instructions as well as you will
repeat the process with new drivers etc..

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
On 15-04-01 05:02 PM, clickwir wrote:> Still a big problem.
>

Gordon VS
<email address hidden>

On 15-04-01 05:02 PM, clickwir wrote:
> Still a big problem.
>

Revision history for this message
Mediaklan (didli) wrote :

I'm on kernel 3.16.0-34-generic, already with latest AMD catalyst driver, and I'm still having this issue.

Revision history for this message
GVS (gvscheik1-g) wrote :

How did you install the AMD driver? Did you build the packages or use
the "update drives" app, or use the:

sh ./drivername.run

method.

For me only building the packages for my distro worked. The method is
in my post.

Gordon VS
<email address hidden>

On 15-04-17 10:23 AM, Mediaklan wrote:
> I'm on kernel 3.16.0-34-generic, already with latest AMD catalyst
> driver, and I'm still having this issue.
>

Revision history for this message
Mediaklan (didli) wrote :

I build them, using a method close to yours. I've just installed latest 3.16.0-36.48 kernel a few minutes ago, and I can already tell I'm probably gonna still have the issue...

Revision history for this message
GVS (gvscheik1-g) wrote :

Damn. That is so frustrating. I know how you feel. What distro you using?

Gordon VS
<email address hidden>

On 15-04-17 11:14 AM, Mediaklan wrote:
> I build them, using a method close to yours. I've just installed latest
> 3.16.0-36.48 kernel a few minutes ago, and I can already tell I'm
> probably gonna still have the issue...
>

Revision history for this message
Mediaklan (didli) wrote :

Xubuntu 14.10 x64 on an Aspire One 722 (4go RAM - AMD series C-60). As you say earlier, it's quite frustrating indeed : it's clearly related to fglrx and xorg in some point, but I think it's not related to kernel : this netbook had a fresh install not so long ago and so, started with a 3.16 kernel (or close, can't remember). I had the problem before the reinstall, and after. Go figure.
Maybe trying another distro (i was thinking archlinux) would provide some insight, but if it was not for this damned memory leak, I would have been quite happy with my xubuntu right now :/

Revision history for this message
santzi (santzi76) wrote :

Hellou,

I followed GVS's instruction above and leak is still exist.

Linux Mint 17.1
MATE 1.8.1
Kernel: 3.16.0-34-generic

AMD Catalyst driver: 14.20

Uptime about 2 hours:
1479 root 20 0 1126892 840244 101008 S 1,0 20,8 15:56.05 Xorg
So almost 21% Xorg has eat memry.

uptime; pmap 1479 | grep total
 12:19:27 up 2:18, 3 users, load average: 0,37, 0,29, 0,24
 total 1166888K

This is quite bad. Need some workaround for this issue quite soon.
I have to try this again when I have more time.
Should I install kernel 3.14? Previous was 3.13.

Revision history for this message
GVS (gvscheik1-g) wrote :

I cured my issue by installing kernel 3.12.36 and the drivers mentioned
in my solution. I was using 3.13.x. I now use 3.14.38 with no issues.

Even though it may not be the same for others, the kernel was definitely
an issue on my system.

What makes this so frustrating is that very few people have this issue,
therefore nothing official is being done about it.

Gordon VS
<email address hidden>

On 15-04-18 03:32 AM, santzi wrote:
> Hellou,
>
> I followed GVS's instruction above and leak is still exist.
>
> Linux Mint 17.1
> MATE 1.8.1
> Kernel: 3.16.0-34-generic
>
> AMD Catalyst driver: 14.20
>
> Uptime about 2 hours:
> 1479 root 20 0 1126892 840244 101008 S 1,0 20,8 15:56.05 Xorg
> So almost 21% Xorg has eat memry.
>
> uptime; pmap 1479 | grep total
> 12:19:27 up 2:18, 3 users, load average: 0,37, 0,29, 0,24
> total 1166888K
>
> This is quite bad. Need some workaround for this issue quite soon.
> I have to try this again when I have more time.
> Should I install kernel 3.14? Previous was 3.13.
>

Revision history for this message
Mediaklan (didli) wrote :

I was able to reduce (but not solved) the leak somehow, for 3 days now, using swappiness. I have slightly icreased my swap partition, and setup like this :
cat /proc/sys/vm/swappiness
sudo sysctl vm.swappiness=40
sudo mousepad /etc/sysctl.conf
# confirm you have this line :
vm.swappiness=40
Now for the strange part : Memory leak is still happening, gradually reaching 40% as I am using my laptop more and more. But once it reaches 40%, the memory leak won't go any further and i don't see my swap increasing neither (which I found very strange, I chech and recheck, swap is all well and active). Xorg is still the higher ram eater (but not the only one eating ram), but now, it seems stuck to 40% which, at least prevents the need to reboot my laptop as often as before.

Revision history for this message
GVS (gvscheik1-g) wrote :

Guys: I know that some of you think that this issue exists independent
of kernel version. Personally, that is simply not correct. Of course I
can only go on my own detailed experience as there is no official
response to this issue. However, I can reproduce the issue at will. I
can also get rid of it at will ... and that should tell you something.

1) I do NOT have this issue in any way shape or form using kernel
branches 3.12, or 3.14.

2) Installing kernels from the 3.13 or 3.16 (I have not bothered with
3.15 branches) branches result in the issue instantly back.

3) AMD has well documented kernel support issues. AMD fglrx integrates
itself into the kernel... so how can it NOT be a kernel issue?

At least be willing to try the 3.14 branch. Version 3.14.39 is
available for download here:

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.39-utopic/

It is easy to install and easy to purge if it does not work for you.
Instructions were given in one of my recent posts.

Gordon VS
<email address hidden>

On 15-04-21 06:50 AM, Mediaklan wrote:
> I was able to reduce (but not solved) the leak somehow, for 3 days now, using swappiness. I have slightly icreased my swap partition, and setup like this :
> cat /proc/sys/vm/swappiness
> sudo sysctl vm.swappiness=40
> sudo mousepad /etc/sysctl.conf
> # confirm you have this line :
> vm.swappiness=40
> Now for the strange part : Memory leak is still happening, gradually reaching 40% as I am using my laptop more and more. But once it reaches 40%, the memory leak won't go any further and i don't see my swap increasing neither (which I found very strange, I chech and recheck, swap is all well and active). Xorg is still the higher ram eater (but not the only one eating ram), but now, it seems stuck to 40% which, at least prevents the need to reboot my laptop as often as before.
>

Revision history for this message
Mediaklan (didli) wrote :

Well, I'm willing to try because I spoke too soon : leak is back for me after a few days if i let 1 or 2 programs running. It's still slower than before to fill my ram, but still here.

> 2) Installing kernels from the 3.13 or 3.16 (I have not bothered with
> 3.15 branches) branches result in the issue instantly back.

So you think it's a regression ? Didn't expect that.

Revision history for this message
GVS (gvscheik1-g) wrote :

I see where you are coming from, but no, I do not think it is a
regression because a) it existed with the prior AMD driver set, and b)
it goes away with the 3.14.x kernel & Trusty shipped with the 3.13.x
branch. Technically, I guess it could be some sort of regression though
because it comes back with later kernel branches.

What I think is that AMD sucks at Linux driver sets :) I.e., still
using Loki; still using 32bit libraries etc. etc.. The reason I believe
it is kernel related is to not blame Linux, but AMD's long history of
poor kernel integration. Do a google of that and you will see what I
mean.

As it stands, the latest driver only supports versions of the 3.16.x
Kernel branch. When it was released I believe the 3.18.x branch was
well established... Maybe 3.19.

I know that as a Linux user who will never go back to Windows, that I
will also never buy another AMD GPU ... at least while they continue
with their half-hearted driver development for Linux.

Gordon VS
<email address hidden>

On 15-04-23 01:03 AM, Mediaklan wrote:
> Well, I'm willing to try because I spoke too soon : leak is back for me
> after a few days if i let 1 or 2 programs running. It's still slower
> than before to fill my ram, but still here.
>
>> 2) Installing kernels from the 3.13 or 3.16 (I have not bothered with
>> 3.15 branches) branches result in the issue instantly back.
>
> So you think it's a regression ? Didn't expect that.
>

Revision history for this message
Mediaklan (didli) wrote :

'Couldn't agree more on the poor AMD driver set. That's also why I was (notice the past tense) not quite convinced about it being kernel related, since some people with both AMD and latest kernel don't share this leak problem. Anyway, thanks for sharing your positive results with 3.14 kernel, it is worth a try, and that's what I'm doing, right now.

Revision history for this message
santzi (santzi76) wrote :

Hi,

Just downgraded kernel 3-16 -> 3.14.39 and I followed GVS's instruction above.
And after that I installed
http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip

See this Xorg process's memory comsumption:

nuhapumppu Desktop # uptime; pmap 1564 | grep total
 18:53:00 up 1:08, 2 users, load average: 1,07, 1,01, 1,14
 total 291664K
nuhapumppu Desktop # uptime; pmap 1564 | grep total
 19:02:55 up 1:18, 2 users, load average: 0,32, 0,33, 0,69
 total 291664K
nuhapumppu Desktop # uptime; pmap 1564 | grep total
 19:06:10 up 1:21, 2 users, load average: 0,24, 0,39, 0,65
 total 291664K
nuhapumppu Desktop # uptime; pmap 1564 | grep total
 19:26:15 up 1:41, 2 users, load average: 0,25, 0,30, 0,40
 total 326224K
nuhapumppu Desktop # uptime; pmap 1564 | grep total
 19:35:14 up 1:50, 2 users, load average: 0,74, 0,51, 0,44
 total 326224K
nuhapumppu Desktop # uptime; pmap 1564 | grep total
 20:03:14 up 2:18, 2 users, load average: 1,29, 1,13, 0,83
 total 326224K
nuhapumppu Desktop # uptime; pmap 1564 | grep total
 05:06:16 up 11:21, 2 users, load average: 0,05, 0,05, 0,05
 total 326224K

As you see, there is no memory at all. Uptime is over 11 hours.
This is kernel related issue definitely.
When huge Xorg memory leak was exist, the memory consumption was several GBs so far (11 hours)

So kernel 3.14.39 cured my system.
Need to know which kernel commit(s) fix this memory leak.
So I don't update kernel to 3.16 until this leak is fixed. I stay 3.14.xx branch.

Big thanks to GVS!!!

Revision history for this message
GVS (gvscheik1-g) wrote :

Awesome! And you are welcome. :)

Gordon VS
<email address hidden>

On 15-04-23 08:21 PM, santzi wrote:
> Hi,
>
> Just downgraded kernel 3-16 -> 3.14.39 and I followed GVS's instruction above.
> And after that I installed
> http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip
>
> See this Xorg process's memory comsumption:
>
> nuhapumppu Desktop # uptime; pmap 1564 | grep total
> 18:53:00 up 1:08, 2 users, load average: 1,07, 1,01, 1,14
> total 291664K
> nuhapumppu Desktop # uptime; pmap 1564 | grep total
> 19:02:55 up 1:18, 2 users, load average: 0,32, 0,33, 0,69
> total 291664K
> nuhapumppu Desktop # uptime; pmap 1564 | grep total
> 19:06:10 up 1:21, 2 users, load average: 0,24, 0,39, 0,65
> total 291664K
> nuhapumppu Desktop # uptime; pmap 1564 | grep total
> 19:26:15 up 1:41, 2 users, load average: 0,25, 0,30, 0,40
> total 326224K
> nuhapumppu Desktop # uptime; pmap 1564 | grep total
> 19:35:14 up 1:50, 2 users, load average: 0,74, 0,51, 0,44
> total 326224K
> nuhapumppu Desktop # uptime; pmap 1564 | grep total
> 20:03:14 up 2:18, 2 users, load average: 1,29, 1,13, 0,83
> total 326224K
> nuhapumppu Desktop # uptime; pmap 1564 | grep total
> 05:06:16 up 11:21, 2 users, load average: 0,05, 0,05, 0,05
> total 326224K
>
> As you see, there is no memory at all. Uptime is over 11 hours.
> This is kernel related issue definitely.
> When huge Xorg memory leak was exist, the memory consumption was several GBs so far (11 hours)
>
> So kernel 3.14.39 cured my system.
> Need to know which kernel commit(s) fix this memory leak.
> So I don't update kernel to 3.16 until this leak is fixed. I stay 3.14.xx branch.
>
> Big thanks to GVS!!!
>

TJ (tj)
Changed in linux (Ubuntu):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-14.04.3
Revision history for this message
Andy Foley (andy-foley) wrote :

I just started getting this problem after swapping an old nvidia GFX card with a Radeon 6850. Running Mint 17.2 (based on 'Trusty'), kernel 3.13.0-24-generic.

I found a stab-in-the-dark solution that works for me. In synaptic package manager, I replaced all the fglrx packages with the 'updates' versions, and also installed xserver-xorg-video-radeon-lts-trusty (Transitional package). (There's versions for other Ubuntu flavours.)

Check in Driver Manager that the fglrx updates version is selected, and restart X. My Xorg mem is now sitting steady.

Hope it helps someone.

Mathew Hodson (mhodson)
Changed in linux (Ubuntu):
milestone: ubuntu-14.04.3 → none
Changed in fglrx-installer (Ubuntu):
importance: Undecided → High
Revision history for this message
Andreas Ritter (eddie8) wrote :

@Andy Foley:
Thanks for the hint, but I have the issue with both versions: fglrx und fglrx-updates

(Radeon R7 200)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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