Bug 242911 - Kwin. High CPU usage when a 3D applications is running.
Summary: Kwin. High CPU usage when a 3D applications is running.
Status: RESOLVED DUPLICATE of bug 234463
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-26 23:40 UTC by Alexander
Modified: 2010-06-29 21:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2010-06-26 23:40:55 UTC
Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

Subj. With compositing enabled — http://img517.imageshack.us/img517/6811/128np.png and with disabled — http://img13.imageshack.us/img13/6235/126p.png

Reproducible: Always
Comment 1 Thomas Lübking 2010-06-27 00:20:10 UTC
this is no bug but an architetural limit - and not in the windowmanager :-(

a) it's likely (partially...) more related to the framerate than to the fact of another GL client
b) nevertheless, the driver needs to manage/swap between 2 gl contexts - what can be slow
c) it's also necessary to convert the X drawables into textures, what can be slow (depending on the driver again) as well (afaics the css nvidia driver shows best results on this so far, unlimited GL application will stress the GPU, but hardly the CPU here, neither in kwin nor in X11)

the minimum information you need to provide is your GPU & driver as well as the settings in the advanced tab of "kcmshell4 kwincompositing"

in order to check the impact of the second GL context you can limit the framerate of the gl application (eg. all x screensaver hacks provide a "-delay" flag (40000 will result in 24-25fps) and on the other hand run a video with the same framerate and of comparable size (eg. in mplayer "-fps")

there will however always be an overhead and it's heavier on the GL backend than on the XRender backend.
Comment 2 Alexander 2010-06-29 17:24:57 UTC
GPU is nvidia 9500gt with nvidia (256.35) driver. Kwin uses next settings:
Compositing type: OpenGL
OpenGL mode: texture from pixmap
Texture filter: Trilinear
With enabled direct rendering.

The same situation is with blu-ray videos. When I watching 1080p in mplayer and compositing is disabled — I've got 10-15% of CPU usage, but if compositing is enabled — CPU usage increases to 70-80% (60-70% falls on Xorg)...
http://img638.imageshack.us/img638/8697/132u.png

P.S. Maybe I'm sending too many reports, sorry if that :)
Comment 3 Thomas Lübking 2010-06-29 21:38:48 UTC
(In reply to comment #2)
> P.S. Maybe I'm sending too many reports, sorry if that :)

at least this is a dupe.
you suffer from bad X11 performance on texture_prom_pixmap in the nvidia css driver (or pot. any conversion method)

- have you ever checked your /var/log/Xorg.0.log (esp. have a look for "WW", "EE" and "dri")
        grep -E '(EE|WW|dri|DRI)' /var/log/Xorg.0.log

- is X11 load high using the XRender backend as well?

- sure you're actually using the nvidia css driver?
        glxinfo | grep -i version

*** This bug has been marked as a duplicate of bug 234463 ***