Bug 306317 - KWin OpenGL compositing is very slow on Nouveau (GeForce 9500 GT), Arch Linux x86_64, KDE 4.9.1
Summary: KWin OpenGL compositing is very slow on Nouveau (GeForce 9500 GT), Arch Linux...
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: 4.9.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-05 23:21 UTC by Diego Viola
Modified: 2012-09-06 07:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: nouveau+


Attachments
qdbus org.kde.kwin /KWin supportInformation with xrender backend/fallback since the opengl one is too slow (5.84 KB, text/plain)
2012-09-06 05:53 UTC, Diego Viola
Details
glxinfo (28.00 KB, text/plain)
2012-09-06 06:49 UTC, Diego Viola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Viola 2012-09-05 23:21:42 UTC
KDE 4.9.1 landed on Arch Linux x86_64 today, so I've upgraded to it. After the upgrade I've noticed that kwin was using xrender instead of opengl backend, so I tried to switch to the opengl backend but it was extremely slow, blur didn't work, the alt+tab animation was extremely slow as well.

Also, after switching to opengl backend KWin would automatically switch back to xrender after a restart, etc.

KWin with OpenGL backend was working fine before (in KDE 4.9.0), it seems like something broke with 4.9.1.

I'm using the nouveau driver, my system is:

Arch Linux x86_64.
KDE 4.9.1
Linux 3.5.3-1-ARCH
GeForce 9500 GT

Reproducible: Always

Steps to Reproduce:
1. Upgrade to KDE 4.9.1
2. Start kwin with opengl compositing.
3. Notice that it becomes very slow.
Actual Results:  
KWin becomes extremely slow and it switches back to xrender after a restart.

Expected Results:  
Things should work smoothly like in KDE 4.9.0. OpenGL backend should work fine, and it shouldn't be slow.
Comment 1 Diego Viola 2012-09-06 05:17:15 UTC
I've tried building kwin from source by cloning and building form this repo: git://anongit.kde.org/kde-workspace.git

I built this by creating a "build" directory inside the repo, then from the build directory I did "cmake .." then I went into the kwin directory and ran "make -j4" in there.

The build was successful and I tried with 4.9.1 and 4.9.0 tags, however, I got segfaults and it just didn't work, perhaps I did something wrong, I don't know.

Any suggestions?
Comment 2 Martin Flöser 2012-09-06 05:42:06 UTC
for build issues the bug tracker is really unsuited, may I suggest to move that part to forum.kde.org and have the discussion here just about the performance issue?

First of all we would need some more information about your running KWin. Please do from a console:
qdbus org.kde.kwin /KWin supportInformation

Please also have a look at http://userbase.kde.org/Desktop_Effects_Performance for general hints on how to improve the performance. Last but not least be aware that the nouveau driver is still very young, reverse engineered and not working for all hardware very good. It might be a better solution to use the proprietary driver.
Comment 3 Diego Viola 2012-09-06 05:47:31 UTC
(In reply to comment #2)
> for build issues the bug tracker is really unsuited, may I suggest to move
> that part to forum.kde.org and have the discussion here just about the
> performance issue?
> 
> First of all we would need some more information about your running KWin.
> Please do from a console:
> qdbus org.kde.kwin /KWin supportInformation
> 
> Please also have a look at
> http://userbase.kde.org/Desktop_Effects_Performance for general hints on how
> to improve the performance. Last but not least be aware that the nouveau
> driver is still very young, reverse engineered and not working for all
> hardware very good. It might be a better solution to use the proprietary
> driver.

I'm aware that nouveau is young and a reverse engineered project, but how do you explain the fact that I have been using nouveau with KDE for more than 6 months without any single issues?

I have been using KDE 4.9.0 and below without problems, did kwin changed in some way in the last 4.9.1?

The performance with nouveau and 4.9.1 is just terrible.

Thanks for your help though.
Comment 4 Diego Viola 2012-09-06 05:53:22 UTC
Created attachment 73695 [details]
qdbus org.kde.kwin /KWin supportInformation with xrender backend/fallback since the opengl one is too slow
Comment 5 Martin Flöser 2012-09-06 05:54:40 UTC
we need the output from the opengl - no matter whether it is slow. We can only see if something is going wrong if we get that information for the faulty system.
Comment 6 Diego Viola 2012-09-06 06:01:52 UTC
I tried to enable opengl compositing but kwin will automatically change to xrender again.

I tried running that command "qdbus org.kde.kwin /KWin supportInformation" and grab the output but it reports as "xrender" even though I changed to opengl.

Is there a way to force kwin to use opengl?
Comment 7 Martin Flöser 2012-09-06 06:16:33 UTC
environment variable KWIN_COMPOSE=O (it's an O as in OpenGL not a 0 as in zero)

but that sounds like your drivers not working at all.
Comment 8 Diego Viola 2012-09-06 06:23:40 UTC
(In reply to comment #7)
> environment variable KWIN_COMPOSE=O (it's an O as in OpenGL not a 0 as in
> zero)
> 
> but that sounds like your drivers not working at all.

I tried with that but it didn't work, kwin still falls back to xrender.

Thanks.
Comment 9 Diego Viola 2012-09-06 06:39:06 UTC
The last Linux kernel install on my system was:

Install Date   : Tue 28 Aug 2012 10:08:53 AM PYT

The last Mesa install on my system was:

Install Date   : Fri 31 Aug 2012 12:27:47 AM PYT

The last KDE install on my system was:

Install Date   : Wed 05 Sep 2012 05:16:10 PM PYT

So it's possible that the last nouveau update broke something?
Comment 10 Martin Flöser 2012-09-06 06:46:59 UTC
(In reply to comment #9)
> So it's possible that the last nouveau update broke something?
quite likely, please post output of glxinfo
Comment 11 Diego Viola 2012-09-06 06:49:01 UTC
Created attachment 73696 [details]
glxinfo
Comment 12 Martin Flöser 2012-09-06 06:56:15 UTC
I'm sorry, but you are using software rasterization:
OpenGL renderer string: Gallium 0.4 on llvmpipe

KWin does not yet support llvmpipe and therefore falls back to XRender as that is the better solution than burning CPU cycles.
Comment 13 Diego Viola 2012-09-06 06:59:26 UTC
(In reply to comment #12)
> I'm sorry, but you are using software rasterization:
> OpenGL renderer string: Gallium 0.4 on llvmpipe
> 
> KWin does not yet support llvmpipe and therefore falls back to XRender as
> that is the better solution than burning CPU cycles.

How do I stop using software rasterization? I wonder why this is even enabled by default?
Comment 14 Martin Flöser 2012-09-06 07:06:56 UTC
(In reply to comment #13)
> How do I stop using software rasterization? I wonder why this is even
> enabled by default?
sorry that is nothing where we can help you. This is a technical issue tracker and no support forum. Best check a distribution specific support forum to get help on setting up nouveau correctly.
Comment 15 Diego Viola 2012-09-06 07:16:09 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > How do I stop using software rasterization? I wonder why this is even
> > enabled by default?
> sorry that is nothing where we can help you. This is a technical issue
> tracker and no support forum. Best check a distribution specific support
> forum to get help on setting up nouveau correctly.

Ok thanks, I'll contact the Arch Linux maintainers.
Comment 16 Diego Viola 2012-09-06 07:39:27 UTC
Ok so I started a new bug report here in Arch Linux bug tracker, in case if someone is interested:

https://bugs.archlinux.org/index.php?do=details&action=details.addvote&task_id=31434
Comment 17 Diego Viola 2012-09-06 07:53:12 UTC
(In reply to comment #16)
> Ok so I started a new bug report here in Arch Linux bug tracker, in case if
> someone is interested:
> 
> https://bugs.archlinux.org/index.php?do=details&action=details.
> addvote&task_id=31434

Oops, I wasn't in the video group, I added myself to this group and now it's fast. Sorry.