Bug 301883 - Elevated CPU usage after Konsole Color Theme Change, when two or more Konsoles are open
Summary: Elevated CPU usage after Konsole Color Theme Change, when two or more Konsole...
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.8.4
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-14 07:51 UTC by John Stanley
Modified: 2012-06-17 09:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Stanley 2012-06-14 07:51:38 UTC
When I have two or more konsoles running, if in one of them, I change the color theme:
    Settings->Configure Current Profile->Appearance
from, say BlackOnWhite to WhiteOnBlack, on clicking Apply, and then Ok, konsole and X cpu usage goes up dramatically.  I noticed this because I always monitor cpu temps. On my laptop, konsole cpu usage is typically 0.3-1.7% and X is 2-3%.  On doing the color theme change described above, konsole and X cpu usage go to 7-9%, and 15-18%, respectively (as seen in top as soon as the Apply change button is clicked).  Repeating, ie, doing another color theme change, konsole and X cpu usage jumps again going to 15-19% and 27-31%, respectively.  I also see elevated cpu temps: a normal idle temp of 52C goes to 60-70C.

Logging out and back in fixes the problem, as does simply closing the konsole in which the change
was done.

If these changes are made in konsole, with just one konsole open, the issue does not occur, so there appears to be a bug when doing color theme changes when more than one konsole is open.  Also, note that the issue only occurs if an Appearance/Color theme is actually changed by clicking apply.

Note that this issue is not unique to BlackOnWihite/WhitOnBlack themes -- is occurs for all of the themes.

This problem has been present for quite some time (at least since kde-4.7.X).


Reproducible: Always

Steps to Reproduce:
1. Open two or more Konsoles
2. In on Konsole do a color theme change 
3. Settings->Configure Current Profile->Appearance
4. Select a color theme and click Apply, and then Ok
Actual Results:  
Konsole and X cpu usage jumps excessively after the theme change, and does not return to normal.

Expected Results:  
Konsole and X cpu usage should return to normal within a reasonable time. 

System: i686-pc-linux-gnu, Linux-3.4.2, Qt-4.8.1, KDE-4.8.4, libX11-1.5.0, xorg-server-1.12.2, dbus-1.4.20, and libdbusmenu-qt-0.9.2.

There do not appear to be any messages in ~/.xsession-errors (for in the system logs) associated with this issue.  In passing, though apparently unrelated, I do see the following warning whenever the konsole Appearance menu is entered (even if no changes are made):
konsole(939) Konsole::ColorSchemeManager::loadKDE3ColorScheme: color scheme with name "WhiteOnBlack" has already been found, ignoring.
Comment 1 Jekyll Wu 2012-06-14 11:20:43 UTC
Thanks for reporting!

However, I haven't managed to reproduce the reported problem. The CPU usage does jump when applying new colorscheme, but it also returns to normal after a few seconds(reasonable time for me). Repeating the operation does not make the CPU usage going higher and higher, either. 

Just to be clear, when you say "more than one konsole", you mean "two konsole windows belonging to the same konsole process", not "two konsole windows belonging to two separate konsole process", right?

That warning message about colorschme should be harmless and unrelated with this problem. It just means konsole finds both WhiteOnBlack.colorschme(KDE4 format) and WhiteOnBlack.schema(KDE3 format) in your system, and the KDE4 one takes precedecance of the KDE3 one.
Comment 2 John Stanley 2012-06-14 22:39:55 UTC
(In reply to comment #1)
> Thanks for reporting!
> 
> However, I haven't managed to reproduce the reported problem. The CPU usage
> does jump when applying new colorscheme, but it also returns to normal after
> a few seconds(reasonable time for me). Repeating the operation does not make
> the CPU usage going higher and higher, either. 
> 
> Just to be clear, when you say "more than one konsole", you mean "two
> konsole windows belonging to the same konsole process", not "two konsole
> windows belonging to two separate konsole process", right?
>
I assume its one process, two windows (Kickoff app launcher->system->konsole, or using shortcuts in taskbar panel); ps x shows:
  1343 ?        Sl     0:11 kdeinit4: konsole [kdeinit] -session 10ded1e9dc000133971287300000007940012_1339713027_240155

> That warning message about colorschme should be harmless and unrelated with
> this problem. It just means konsole finds both WhiteOnBlack.colorschme(KDE4
> format) and WhiteOnBlack.schema(KDE3 format) in your system, and the KDE4
> one takes precedecance of the KDE3 one.

Suspected this..
Comment 3 John Stanley 2012-06-14 23:11:09 UTC
Ok, playing with it some more, I did the following:
1) launch a konsole: Kickoff app launcher->applications->system->konsole
2) change konsole color theme; all Ok
3) either (a) repeat step (1), or (b) open a new window from konsole->File->New window
4) change konsole color theme in either konsole window, with 'top' running in the konsole
5) konsole and X cpu usage momentarily jumps high for 1-2 secs, and then reduces to and stays at an elevated level (8% for konsole, 16% for X). At this point, focus is still in the konsole in which I made the color theme change. Waiting for 5-10min: cpu usage remains elevated.
6) now, change focus the other konsole (top is still running in the first);  within 1-2 seconds, cpu usage returns to normal..

Repeating these steps; same results.  So, doing the color change in one konsole, and then quickly clicking on the second konsole (thus changing focus), and then clicking on the first konsole to return focus to it, restores  normal cpu usage.. Peculiar. So, could be that some processing associated with the color theme change, while done for the konsole in which the change was made, is not done in the other konsole(s) until they get focus ?

Of course, if you cannot reproduce the issue, then I guess it must be something else.
Comment 4 John Stanley 2012-06-17 09:29:11 UTC
I've tried several other laptops, following the steps I gave above, and the issue is not present.  So this is probably not a KDE issue but an X issue specific to the laptop.  The laptop for which it occurs is really old (11+ years)  and will probably die soon.. so I don't see it has an issue any more.  My apologies for suggesting it was a konsole bug.  I'd be happy if this report were closed.

Thanks much for your time.
Comment 5 Jekyll Wu 2012-06-17 09:57:10 UTC
Thanks for your feedback. 

Never mind, you are always welcome to report problems. I'm always grateful to users who bother spending their time on filing bug report,  because I know bugzilla is not something that is pleasant to work with.