Announcement

Collapse
No announcement yet.

Tweaking KDE's KWin For Linux Gaming Performance

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tweaking KDE's KWin For Linux Gaming Performance

    Phoronix: Tweaking KDE's KWin For Linux Gaming Performance

    After looking recently at the impact on performance and power consumption of various Linux desktop environments running under Ubuntu 12.04 (Unity, Unity 2D, GNOME Shell, KDE, Xfce, LXDE, and Openbox), there were requests by many Phoronix readers to look at the impact of KDE on 3D gaming. KDE's KWin compositing window manager offers several options that can be easily changed that have a direct result on the Linux system's performance for full-screen OpenGL games.

    http://www.phoronix.com/vr.php?view=17269

  • #2
    interesting, i'm surprised suspended effects was generally slower than xrender. things like this really confuse me sometimes.

    Comment


    • #3
      Originally posted by schmidtbag View Post
      interesting, i'm surprised suspended effects was generally slower than xrender. things like this really confuse me sometimes.
      KWin with compositing disabled runs purely on CPU, in contrast to OpenGL 2 accelerated compositing. This is actually quite a burden for CPU, especially when drawing to a big display.

      Comment


      • #4
        Originally posted by Hirager View Post
        KWin with compositing disabled runs purely on CPU, in contrast to OpenGL 2 accelerated compositing. This is actually quite a burden for CPU, especially when drawing to a big display.
        Right but so does xrender. Besides, other DEs such as XFCE and openbox aren't GPU accelerated (AFAIK) yet they perform very well.

        So, I guess this makes me wonder - how does KDE perform with openGL compositing enabled but with all special effects disabled?

        Comment


        • #5
          Originally posted by schmidtbag View Post
          Right but so does xrender. Besides, other DEs such as XFCE and openbox aren't GPU accelerated (AFAIK) yet they perform very well.

          So, I guess this makes me wonder - how does KDE perform with openGL compositing enabled but with all special effects disabled?
          I believe xrender is mixed CPU/GPU, so that's why it performs better. Also, only most primitive effects work in xrender - you can forget about all fancy stuff like blur.
          After recent remodelling of rendering in KWin, only "used" effects are actually rendered. Thanks to this, fulscreen applications actually run like there were no effects at all. Mind that more work is being done in order to deliver ever higher frame-rates in plasma desktop. As to why simple window managers are so light on CPU: they use only simplest of object to draw interfaces. If you take a look, you'll see that everything is built using rectangles and text. I'd love to use a hardware accelerated KDE window engine that uses such simple figures to draw interfaces. The combination would be killing all competition. I guess I'll have to write it myself someday.

          Comment


          • #6
            What does it matter is it uses CPU? When in fullscreen, the window manager is idle. It consumes 0% CPU. So why the different results?

            Comment


            • #7
              Originally posted by Hirager View Post
              I believe xrender is mixed CPU/GPU, so that's why it performs better. Also, only most primitive effects work in xrender - you can forget about all fancy stuff like blur.
              After recent remodelling of rendering in KWin, only "used" effects are actually rendered. Thanks to this, fulscreen applications actually run like there were no effects at all. Mind that more work is being done in order to deliver ever higher frame-rates in plasma desktop. As to why simple window managers are so light on CPU: they use only simplest of object to draw interfaces. If you take a look, you'll see that everything is built using rectangles and text. I'd love to use a hardware accelerated KDE window engine that uses such simple figures to draw interfaces. The combination would be killing all competition. I guess I'll have to write it myself someday.
              I'm 90% sure xrender is CPU only - KDE defaults to xrender when the GPU isn't functioning properly. I'm almost positive I have got xrender to operate with no functioning drivers, but I may be mistaken, hence my confusion.

              I don't think KDE needs the simplified graphics because it isn't focused on performance, but your idea would propose a good new DE. Perhaps that's the route XFCE should take - XFCE claims to be lightweight (which it isn't) but instead maybe it could be the maximum performance DE. Being lightweight like LXDE isn't always the best thing, because it lacks things like hardware acceleration; being lightweight just means that a very crappy computer can handle it. XFCE isn't light enough to work on the really crappy hardware but lacks the features of heavier DEs, so maybe it could focus purely on making modern machines run as fast as possible.

              Comment


              • #8
                XRender is GPU accelerated on most drivers.

                Comment


                • #9
                  From the xorg wiki (http://www.x.org/wiki/vmware/vmware3D):
                  Originally posted by Xorg Wiki;
                  XRender will usually not be accelerated unless operating on previously rendered 3D- or video surfaces. Therefore setups that use XRender for big operations, like XRender-enabled compositing managers, may consume a lot of CPU on large screens. The interactivity feeling when running, for example Kwin with Xrender effects enabled should be fairly good, particularly if your processor is fast.
                  So, xrender is GPU accelerated if there is a GPU to accelerate it, and as I've said before, is usually used when OpenGL is not an option.


                  Also jw but has the KDE in these tests been the one that's still using opengl 1.x? Because if so, I wonder if that has an affect on performance?

                  Comment


                  • #10
                    XRender is not accelerated on the VMware driver, but you won't be using that for gaming, will you?

                    XRender only accelerated 2D operation, and is vastly easier to implement than OpenGL, that's why it's used for compositing when OpenGL is not available on a given driver.

                    Comment


                    • #11
                      My results
                      HD6770
                      pcie_gen2=1
                      swapbufferswait=0
                      Lightsmark 1600x900 window
                      Xrender - 142
                      opengl1 - 148
                      opengl2 - 145
                      opengles2 - 144
                      suspend - 175
                      openbox - 175

                      Comment


                      • #12
                        If testing OpenGL, why not test using a driver that properly supports it (e.g. nvidia blob)?
                        Any way, it looks that even with compositing disabled, KDE is still the slowest of the bunch when it comes to gaming.

                        As a side node, using Kubuntu 12.04 beta here and the option to suspend compositing in full screen was enabled by default.

                        Comment


                        • #13
                          I would also be curious (in your next WM comparison) to see a couple benchmark graphs with a "no windows manager" column. It's not that I believe that there are gamers that use Ctrl-Alt-F# as a WM, it's just that I would like an rational baseline for comparison, and gain the ability to assign a cost to each WM.

                          I guess that the kiosk, showcase, and arcade guys would be interested as well.
                          Last edited by russofris; 04-20-2012, 12:16 AM.

                          Comment


                          • #14
                            after reading this article i chance my setting from openGL to xrender

                            Comment


                            • #15
                              Originally posted by Qaridarium View Post
                              after reading this article i chance my setting from openGL to xrender
                              No need... The whole comparison is moot. Look again at the results, Gallium3D "Suspend effects" is capped around 60 fps. That's why xrender seems faster.

                              Comment

                              Working...
                              X