Bug 202353 - Earth as desktop background causes noticeable, constant CPU load
Summary: Earth as desktop background causes noticeable, constant CPU load
Status: RESOLVED UNMAINTAINED
Alias: None
Product: marble
Classification: Applications
Component: wallpaper (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-02 22:49 UTC by Ireyon
Modified: 2016-12-17 20:08 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch should fix constant CPU load (2.65 KB, patch)
2011-08-08 13:25 UTC, Dmitry Osipenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ireyon 2009-08-02 22:49:28 UTC
Version:            (using KDE 4.2.98)
OS:                Linux
Installed from:    Ubuntu Packages

When setting the earth as desktop background, my CPU (AMD Athlon X2 4000+) runs at full speed - plasma causes 80% of the cpu load. If I switch back to a normal picture or anything else, it's okay again.

This problem does always appear, no matter how I configure the desktop earth.
Comment 1 Torsten Rahn 2009-08-05 12:29:08 UTC
Please always assign bugs to marble-bugs@kde.org.
Before assigning it to marble-bugs@kde.org you should first consider that it might be a problem of the application that uses Marble.

I wouldn't know why the CPU should be drained on wallpaper usage. Usually it would only happen when a repaint is caused. However that shouldn't happen for a wallpaper all the time as Marble would usually only stand still without interaction. In that case a repaint would only happen rarely and hence the CPU shouldn't get used all the time.
Comment 2 Sascha Peilicke 2009-08-05 12:36:47 UTC
There's one case when this could happen: You're able to set up a rotation for the globe. This can be configured to happen once every 0.1 seconds if you wish so. This means a redraw 10 times per second which can cause some overhead. This is however not default nor really sane, it's just possible if you want your earth to spin fast
Comment 3 Diego 2009-10-12 14:05:11 UTC
Same happens here, I get high CPU usage if wallpaper is set as Globe, even with rotation "fixed".
My guess is some graphics driver problem: i get both X and plasma-desktop high CPU usage.
This is on Arch Linux, KDE 4.3.2, drv-ati 6.12.4, and XServer 1.6.4.
Comment 4 Joachim Wilke 2009-11-12 20:33:14 UTC
Same here:
Using the "Globe Satellite View" wallpaper causes my plasma-desktop process to produce significant (i.e., ~ 25%) constant cpu load. The parameters "Quality" and "Rotation" do not influence this. Even with "Low" and "Do not move" the cpu load is unchanged. Switching the wallpaper to "Color" reduces load of plasma-desktop to ~ 2 %.
Comment 5 Diego 2009-11-13 08:51:11 UTC
(In reply to comment #4)
> Same here:
> Using the "Globe Satellite View" wallpaper causes my plasma-desktop process to
> produce significant (i.e., ~ 25%) constant cpu load. The parameters "Quality"
> and "Rotation" do not influence this. Even with "Low" and "Do not move" the cpu
> load is unchanged. Switching the wallpaper to "Color" reduces load of
> plasma-desktop to ~ 2 %.

Joachim: are you able to specify distro version, X Server and video driver?
In case take a look to your /var/log/Xorg.0.log
Comment 6 Joachim Wilke 2009-11-13 11:03:27 UTC
Yes, this is 
- X.Org X Server 1.6.4
- Linux 2.6.31-14-generic #48-Ubuntu SMP x86_64
- intel video driver 2.9.0
Comment 7 Dennis Nienhüser 2010-01-11 23:52:28 UTC
Had the same problem when I last tested it (back in 4.3 though).

The current implementation of the paint() method [1] isn't exactly optimal: It uses a QPixmap as backend store and always causes a full paint (!) of the whole map, ignoring the dirty region of paint(). m_map->paint(gp, mapRect) should be changed to just paint the dirty region inside paint().

Another possibility would be to construct marble's GeoPainter such that it does not operate on the QPixmap, but directly on the paint device of the given QPainter. This way the QPixmap backend shouldn't be needed, but the GeoPainter could be called directly on the dirty region.

I can't test both things currently as it'll take me some time to set up a full kde development environment. Would be great if someone else could jump in.

[1] http://websvn.kde.org/trunk/KDE/kdeplasma-addons/wallpapers/marble/marble.cpp?annotate=1012238
Comment 8 Dmitry Osipenko 2011-08-08 13:25:14 UTC
Created attachment 62663 [details]
patch should fix constant CPU load

MarbleWallpaper mustn't update pixmap on every paint. Only when needed.
Comment 9 Friedrich W. H. Kossebau 2016-12-17 20:08:03 UTC
Thanks for the report. Sadly it seems to never have been solved and the patch been used?
The Plasma worldmap wallpaper has been rewritten now in QML for Plasma5 (and lacking some of the old features still).
The old code is no longer maintained, so closing this now.

Please try the new wallpaper and report any issues or features you would like to see (re-)implemented.
See also https://frinring.wordpress.com/2016/08/04/wip-plasma-world-map-wallpaper-world-clock-applet-powered-by-marble/