Bug 178538 - Compositing penalises OpenGL applications
Summary: Compositing penalises OpenGL applications
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 178489 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-23 03:56 UTC by Jelle Geerts
Modified: 2009-12-11 14:16 UTC (History)
5 users (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 Jelle Geerts 2008-12-23 03:56:34 UTC
Version:            (using Devel)
Compiler:          4.2.4 
OS:                Linux
Installed from:    Compiled sources

As described, when using desktop effects, the performance of glxgears drops by 9000 FPS.

Direct rendering is enabled (by checking glxinfo | grep direct).

I'm using an NVIDIA 7800 GS graphics card and the NVIDIA proprietary driver.

Without the desktop effects, I'm getting ~10850 FPS. With them enabled, I'm getting about ~3200 FPS.

Is this normal?
Comment 1 lucas 2008-12-23 11:13:09 UTC
I'm pretty sure this is a driver issue that we can't do anything about.
Comment 2 lucas 2008-12-23 11:13:17 UTC
*** Bug 178489 has been marked as a duplicate of this bug. ***
Comment 3 Jelle Geerts 2008-12-23 15:03:15 UTC
Well, in KDE 3, after enabling GUI effects like fading and shadows, glxgears still gives ~10850 FPS. Not sure why it should be different in KDE 4? The effects in KDE 3 work and OpenGL performance is still good, so it should be possible to do the same in KDE 4 I'd think?
Comment 4 Thomas Lübking 2008-12-23 19:10:46 UTC
kompmgr used xrender, so you don't have to textureFromPixmap forth and back
tried the render backend? how's glxgears then?
Comment 5 Jens Schmidt 2009-03-10 14:20:56 UTC
Hello together,

i think, this is the same Problem as i have.

In KDE 3 everything works fine but in KDE 4 every OpenGL Application is _very_ slow.

I have tried some KDE Version, i have tried every xorg option i found related to kde-problems in nvidia forums, i have tried turning off my second screen, i have tried alle nvidia driver *g* and... and... and...

I have opend the following Bugreport at my Distro-Bugtracker, because i dont from wich packages this problem comes from (i dont think that this is a nvidia-driver problem). First (at Kubuntu 8.10 Alpha/Beta) the problem only exists with open GTK applications, after some KDE Updates (now: 4.2.1) i have this problem every time. I have collected some Informations in this case:
https://bugs.launchpad.net/ubuntu/+bug/280033

I hope it helps or i can help to get this problem solved as fast as its possible.

Regards.
Comment 6 Jens Schmidt 2009-03-10 21:25:23 UTC
Hello again,

just another test from my side.

I have suspended composite by pressing ALT+SHIFT+F12, and here are my glxgears output:

WITH COMPOSITE:
[21:19:17] jeschmidt@curium:~ > glxgears
9362 frames in 5.0 seconds = 1872.300 FPS
11671 frames in 5.0 seconds = 2334.151 FPS
11724 frames in 5.0 seconds = 2344.704 FPS
11722 frames in 5.0 seconds = 2344.251 FPS
10830 frames in 5.0 seconds = 2165.790 FPS
10749 frames in 5.0 seconds = 2149.788 FPS
11764 frames in 5.0 seconds = 2352.729 FPS
11675 frames in 5.0 seconds = 2334.329 FPS
7329 frames in 5.1 seconds = 1428.460 FPS
== FULLSCREEN ==
15 frames in 5.2 seconds =  2.895 FPS
15 frames in 5.2 seconds =  2.907 FPS
15 frames in 5.2 seconds =  2.894 FPS
14 frames in 5.3 seconds =  2.645 FPS
15 frames in 5.2 seconds =  2.878 FPS

WITHOUT (SUSPENDED) COMPOSITE:
[21:20:34] jeschmidt@curium:~ > glxgears
32641 frames in 5.0 seconds = 6528.158 FPS
34403 frames in 5.0 seconds = 6880.498 FPS
34403 frames in 5.0 seconds = 6880.508 FPS
34404 frames in 5.0 seconds = 6880.643 FPS
34427 frames in 5.0 seconds = 6885.331 FPS
34423 frames in 5.0 seconds = 6884.523 FPS
34435 frames in 5.0 seconds = 6886.953 FPS
21636 frames in 5.0 seconds = 4324.801 FPS
== FULLSCREEN ==
3484 frames in 5.0 seconds = 696.752 FPS
3651 frames in 5.0 seconds = 730.193 FPS
3653 frames in 5.0 seconds = 730.451 FPS
3653 frames in 5.0 seconds = 730.515 FPS
3652 frames in 5.0 seconds = 730.339 FPS
[21:21:44] jeschmidt@curium:~ >

Maybe this helps.

Regards.
Comment 7 Casey Jones 2009-04-17 23:57:10 UTC
Still exists in 4.2.2.  I ran Unigine-tropics Benchmark using Phoronix-test-suite, and with compositing, I got less than 1fps.  Turning off compositing, I got 24fps.

I don't know if this is an nvidia problem, or a Kwin problem.  Does Compiz on either Gnome or KDE have the same results?
Comment 8 Jens Schmidt 2009-07-22 15:28:35 UTC
It's really sad that no one attend to this bug. No information or statemant. Even no discussion about how to find the problem. I want help! But i dont know, how i can debugg this more precisely.

Still exists in KDE 4.3 RC2.

The whole Desktop is unuseable with AND without Compiz. Without because: if you switch to a Desktop with a Konsole (wich has a transparent background when compiz enabled) the switch takes 15 Secs or so.
Comment 9 Martin Flöser 2009-12-11 11:55:50 UTC
First of all:
 * glxgears is not a benchmark
 * OpenGL application will never have the same frame rate when compositing is enabled as when compositing is not enabled for technical limitations.

That's why we have a feature to unredirect full screen windows. So when running for example a fullscreen OpenGL game the game is excluded from compositing. KWin also has a selfcheck to disable Compositing completely if the performance is too bad.

So to me this is not a bug. As it is a known technical limitation that OpenGL applications can't have the same framerate with Compositing enabled I set to upstream as it can only be fixed in the driver (if at all).
Comment 10 Jelle Geerts 2009-12-11 14:00:01 UTC
If it's purely an upstream problem, sure, I'd agree.

However, in KDE3 (with compositing enabled) the performance of glxgears was (somehow) much better than in KDE4 (with compositing enabled).

Now of course I know glxgears is not a benchmark, I could as well have noticed the performance drop while playing e.g. a windowed game.

The point is, even if this is a driver issue, then why do the framerates differ *so* much between KDE3 and KDE4 (whilst using the same driver)?
Comment 11 Martin Flöser 2009-12-11 14:12:27 UTC
(In reply to comment #10)
> The point is, even if this is a driver issue, then why do the framerates differ
> *so* much between KDE3 and KDE4 (whilst using the same driver)?

As mentioned in comment #4 kwin in KDE 3 used XRender, while KWin in KDE 4 uses OpenGL. These are two different techniques, so it is uncomparable.
Comment 12 Jelle Geerts 2009-12-11 14:16:28 UTC
Ah, all right, my apologies for the fuss.