The longer my PC is on, the more memory Xorg swallows. It starts at under 30,000~ KB, and crawls over 300 megs with normal desktop usage. I’ve also observed it eating up CPU time too. I’m not using any propriety drivers. How can this be fixed, and is this happening to anyone else?
This shouldn’t happen.
What graphics card and what drivers are you using?
And you should specify what openSUSE version you are using, too.
But most likely, some programs you are running are causing this.
Check with “top” or by pressing Ctrl+ESC if you are using KDE to find out which ones.
A Radeon HD 5770, and the “radeon” kernel driver.
I did in the title.
I am using Firefox, and doing standard desktop tasks like opening dolphin, etc. Nothing out of the ordinary. Xorg never frees memory after closing Firefox and all applications open. I also notice that plasma-desktop increases in memory usage as time goes on, and I don’t know if these things are related. Could this be related to OpenGL 2.0 compositing, that is turned on by default?
Yes, you did.
Sorry, I missed that somehow! :shame:
I am using Firefox, and doing standard desktop tasks like opening dolphin, etc. Nothing out of the ordinary. Xorg never frees memory after closing Firefox and all applications open. I also notice that plasma-desktop increases in memory usage as time goes on, and I don’t know if these things are related. Could this be related to OpenGL 2.0 compositing, that is turned on by default?
Maybe.
You could try a different settings in “Desktop Effects”->“Advanced”->OpenGL.
Is “Qt graphics system” set to “raster”?
You may want to try to install the proprietary fglrx driver. Maybe it would improve things for you?
http://en.opensuse.org/SDB:AMD_fglrx
On my system, konqueror and firefox are both using far more than Xorg. Even “konsole” is using a tad more than Xorg.
But then, I have desktop effects disabled, and I don’t do much that is graphic intensive.
There’s been a bug report about this, and nothing I do changes the fact that both Xorg and plasma-desktop are leaking memory. And barely anybody responds to serious bug reports dating all the way back to openSUSE 12.3 for a myriad of issues that obviously the people reporting aren’t able to fix themselves. This bug will probably not be fixed either, because it’s been months with not even a single reply. I can’t believe how few people are filing bug reports…but then again, whats the point. Most likely it will just sit there for years, unanswered.
Maybe you should report that directly at KDE?
http://bugs.kde.org/
Btw, I never had such a problem either (open source radeon driver here, and another system with an intel chip).
Do you have any non-default plasmoids added, or does this already happen on a default installation?
IIRC something like this was caused once by certain applications that add a systray icon. But that bug that I’m thinking of should be fixed already for some time.
But this one sounds similar to your description as well:
https://bugs.kde.org/show_bug.cgi?id=324012
So, are you using the “Current Application Control” applet maybe?
I report quite a few bugs. Most of them are addressed.
Some bugs are really upstream problems, so the opensuse team cannot do much other than report them upstream. Some bugs are hard to investigate, because they only show up in peculiar conditions.
Both of those problems might apply in your case.
I am using no non-default plasmoids. It’s happening on a default installation, and there’s nothing custom about my installation. I’m not using “Current Application Control”. If you add plasmoids, do you see plasma-desktop consume more memory, and if you close them, does the memory get freed? On my system, both plasma-desktop and Xorg consume more and more memory as the system is used, and the ram will never free up until rebooting.
On Tue 04 Feb 2014 09:56:02 PM CST, pirithous wrote:
There’s been a bug report about this, and nothing I do changes the fact
that both Xorg and plasma-desktop are leaking memory. And barely anybody
responds to serious bug reports dating all the way back to openSUSE 12.3
for a myriad of issues that obviously the people reporting aren’t able
to fix themselves. This bug will probably not be fixed either, because
it’s been months with not even a single reply. I can’t believe how few
people are filing bug reports…but then again, whats the point. Most
likely it will just sit there for years, unanswered.
Hi
So that bug is waiting for info back from the reporter… if they
don’t respond then…
I have one against my sec package like that, you wait and wait…and
close… (in this case I’ve actually fixed it…)
So did you try running valgrind as suggested in the bug to see what is
leaking? If so, add your voice to that one…
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
Yes. I just added/removed the analog clock to the desktop a few times. plasma’s memory usage did raise for a few MBs temporarily, but it’s back now at what it was before.
So I don’t see any bad behaviour there, sorry.
As I said, it might be specific to certain plasmoids. That would be a bug/memleak in those plasmoid(s) then, not plasma.
And in my case Xorg is lower than konqueror and mysqld, at 60MB atm.
I have rebooted 2 hours ago though, because I updated KDE to 4.12.2.
But I can’t remember different stats after running plasma the whole day either. Although I don’t normally add/remove widgets all the time of course.
Can you try switching activities, creating new ones, etc? I can easily get plasma-desktop to consumer over 200 MB of ram by just switching activities, but it’s never freed once you go back to your original activity. You may be right about specific widgets having memory leaks, but I have to do more testing to find out which ones are bad. Can you try the web browser widget and see if memory is freed after you close it? Is there anybody here that can keep their system powered up for days and tinker around and see if Xorg and plasma-desktop increase their memory consumption with continued use? My system rarely goes down or gets rebooted, so that may be one reason as to why I am experiencing something different than others.
I tried running valgrind against Xorg in console mode, and the screen went totally black. I issued a “rcxdm stop” to make sure Xorg wasn’t running before the test. How do I get this to work?
So is Xorg gobbling up your memory (as you wrote in the title) or plasma-desktop?
Yes, plasma-desktop shows up with ~210MB RSS in top here, too (right after boot already). But that DOES NOT increase here, it’s stable at that amount. Actually I have now nearly the exact same value than yesterday (+/- a few MB) before I shut down my system (after writing the previous post).
Regarding the fact that plasma’s theme cache (which is just a dump of some of plasma’s in-memory structures) is about 80MB big, this doesn’t sound overly much.
The system activity’s detailed memory information tells me atm:
The process **plasma-desktop** (with pid 2091) is using approximately 192.0 MB of memory.
It is using 180.4 MB privately, 688.7 KB for pixmaps, and a further 54.3 MB that is, or could be, shared with other programs.
Dividing up the shared memory between all the processes sharing that memory we get a reduced shared memory usage of10.9 MB. Adding that to the private and pixmap usage, we get the above mentioned total memory footprint of 192.0 MB.
I will try to play around with activities later, but I don’t expect any other results there as well.
You may be right about specific widgets having memory leaks, but I have to do more testing to find out which ones are bad. Can you try the web browser widget and see if memory is freed after you close it? Is there anybody here that can keep their system powered up for days and tinker around and see if Xorg and plasma-desktop increase their memory consumption with continued use? My system rarely goes down or gets rebooted, so that may be one reason as to why I am experiencing something different than others.
I do let my system run for a few days as well sometimes. And actually until 2 years ago it was the norm that it was running 24 hours/5 days without reboot or even logout.
And I didn’t see abnormal increases in memory then either.
I tried the webbrowser widget right now. Yes, it takes additional memory, and yes the memory is released when I remove it again.
I added/removed it a few times now, and the memory usage didn’t change significantly. It definitely isn’t constantly increasing.
This problem obviously is not that general as you might think.
And many memleaks have been fixed in the last years.
But I want to say it again:
You should consider reporting this upstream at KDE. The KDE developers should know best what could be the reason and how to debug this.
And they are the ones who should fix it if there is indeed a bug somewhere.
Well, if you think that plasma-desktop is leaking memory, you should run plasma-desktop in valgrind, not Xorg.
Quit it with “kquitapp plasma-desktop” before. Or just kill it, that shouldn’t do any harm either.
1 hour later and plasma-desktop uses even less RAM than before:
The process **plasma-desktop** (with pid 2091) is using approximately 175.2 MB of memory.
It is using 169.3 MB privately, 720.7 KB for pixmaps, and a further 19.3 MB that is, or could be, shared with other programs.
Dividing up the shared memory between all the processes sharing that memory we get a reduced shared memory usage of5.3 MB. Adding that to the private and pixmap usage, we get the above mentioned total memory footprint of 175.2 MB.
37.3 MB is swapped out to disk, probably due to a low amount of available memory left.
(top shows 190MB RSS)
So I definitely don’t see memleaks and continuous increase in RAM usage here.
(Kontact is using 450MB ATM, though…)
And no, I didn’t reboot since then.
One thing to mention though:
If you switch activities they stay in memory of course (and the programs started in the other activities keep running). You have to stop them to free the memory. (and yes, the memory is released here AFAICT, when I stop an activity)
Both are, but Xorg takes up ram at a much slower pace.
When I load the web browser widget, memory is never released after I close it. The more widgets I open, the more ram plasma-desktop takes up. Closing all open widgets does not free up any ram. The more I do in KDE (even opening programs), the more ram plasma-desktop takes up. I left my machine on overnight, and plasma-desktop was taking up 267,000~ KB of ram (I got it up to this amount just by doing some basic stuff such as opening widgets; switching activities). When I checked it again in the morning, it was at the same amount. The only way to free the memory up is to log out and back in or do a “kquitapp plasma-desktop” like you wrote. I will open up a new bug report with KDE, even though this same exact problem had already been reported and was marked as fixed.
Here’s an image showing Xorg’s memory leaks after normal desktop use. It will continue taking more and more memory until logging out and back in. Xorg is broken, and it’s interesting how I’m the only one on here talking about it.
I am currently running System monitor. I’ll just quote a few lines:
firefox user 193,176K 67,808K
plasma-d... user 146,724K 79,880K
Xorg root 26,596K 107,056K
I think you might be able to see why I am not complaining about it.
What kinds of things are you doing with your system, how long is it up, and what video card driver are you using? Xorg’s been in development for how long?..And it still doesn’t work right. A bug report exists on this and it just sits there, unanswered. I have a feeling it won’t be fixed either. They’ll then release Wayland, which will go down the same path as PulseAudio, and that will be broken for 10 years.