Announcement

Collapse
No announcement yet.

KWin ⩾ 5.26 uses software renderer instead of OpenGL in X11

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [PLASMA 5] KWin ⩾ 5.26 uses software renderer instead of OpenGL in X11

    By coincidence I came across a KWin bug that affects all Plasma versions ⩾ 5.26.
    That currently should include e.g. Kubuntu 22.10 with Kubuntu Backports and Plasma 5.27.x in Kubuntu 23.04, KDE neon, openSUSE Leap 15.5, openSUSE Tumbleweed, TUXEDO OS, Fedora 38, Debian 12 and Arch :
    https://bugs.kde.org/show_bug.cgi?id=460404

    The solution is to add
    Code:
    [QtQuickRendererSettings]
    SceneGraphBackend=opengl​
    to your $HOME/.config/kdeglobals

    Afterwards for me the speed has increased by about 35-50% !
    I could test this with Plasma 5.27.x in:
    Kubuntu 23.04, KDE neon, TUXEDO OS, openSUSE Tumbleweed KDE, openSUSE Leap 15.5 KDE, Debian 12 KDE and Garuda KDE Dr460nized
    so far.

    I don't know if this also affects a Wayland session, perhaps somebody would like to test it?
    Last edited by Schwarzer Kater; Jun 12, 2023, 03:17 PM.
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    #2
    I think this may be either graphics card or system dependent, maybe? I remember this bug report (or maybe a similar one), but I am not affected by it on any of my systems, not counting the Arm device that needs a semi-custom kernel build.

    Comment


      #3
      Did you test it, e.g. like people did in the bug report?

      All my tests were in X11 on x86-64.
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

      Comment


        #4
        How specifically are you determining that you are using software rendering?

        And I am going to assume this only effects plasma, Qt
        Last edited by claydoh; Jun 08, 2023, 05:53 PM.

        Comment


          #5
          I followed the method in the bug report repeatedly.
          Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
          Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

          get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
          install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

          Comment


            #6
            I see the time commands to compare, so the only way to tell if it is using opengl or software is by how long it takes here?


            Before bed:
            Code:
            $ time konsole -e
            konsole: Missing value after '-e'.
            
            real 0m0.060s
            user 0m0.040s
            sys 0m0.015s

            Config added
            Code:
            $ time konsole -e
            konsole: Missing value after '-e'.
            
            real 0m0.054s
            user 0m0.039s
            sys 0m0.012s

            x2
            Code:
            real 0m0.062s
            user 0m0.048s
            sys 0m0.012s

            Edit removed:
            Code:
            real 0m0.060s
            user 0m0.038s
            sys 0m0.020s​
            And it is slower in spots this morning
            Code:
            konsole: Missing value after '-e'.
            
            real 0m0.070s
            user 0m0.050s
            sys 0m0.018s
            ​And it is a bit variable:
            One last time just now:
            Code:
            real 0m0.061s
            user 0m0.045s
            sys 0m0.014s
            ​Back in wayland, the values are a tiny higher all around

            This is using a PPA for a current mesa, cuz gamez but that shouldn't have an effect on this config edit.
            Plasma 5.27.5 blah blah current blah
            i5-13400F and RX6650

            Differences, yes, but nowhere near the doubling that the bug reporter saw;

            So I just tested with 5.27.0, the performance regression persists:
            "time konsole -e" returns:

            With "SceneGraphBackend=opengl" in .config/kdeglobals:
            real 0m0,072s
            user 0m0,046s
            sys 0m0,023s

            Without "SceneGraphBackend=opengl" in .config/kdeglobals:
            real 0m0,125s
            user 0m0,065s
            sys 0m0,048s​
            I haven't tested on my much lower specc'ed laptops

            I suspect I am 'blessed' by the Linux gods again, sprites, and mages. The must be keeping some of the demons and orks at bay, until I wander back into Chromebook and Arm lands.

            Comment


              #7
              Originally posted by claydoh View Post
              I see the time commands to compare, so the only way to tell if it is using opengl or software is by how long it takes here?
              […]
              ​And it is a bit variable:
              […]
              I haven't tested on my much lower specc'ed laptops
              […]
              I have only used time like in the bug report so far (and I am too stupid to understand the underlying mechanisms regarding KWin to do it another way… ).

              Yes, there is variable - I have always tested it 5-10 times in the different distributions without the addition to $HOME/.config/kdeglobals and then 5-10 times with the addition to get some kind of average.

              I suspect on older machines the difference could be a bit higher (perhaps I will be able to test it this weekend on an Intel i3-3225 with openSUSE Leap 15.5 and Plasma 5.27 - will post the results when I did).


              In Plasma 5.24.7 it does not matter if you apply the addition - there is no difference at all between with and without the addition - the values are about the same as in Plasma 5.27 with the addition.
              So I will always test this in Plasma ⩾ 5.26 in the future - I think the addition to $HOME/.config/kdeglobals is beneficial if it lowers the numbers.


              PS:
              Originally posted by claydoh View Post
              […]
              Differences, yes, but nowhere near the doubling that the bug reporter saw;
              […]
              ​One man's 50% is the other man's doubling…

              On my desktop computer the differences are roughly about 35-45%.​
              And I just tested it in TUXEDO OS and it was exactly 50% for me there.
              Last edited by Schwarzer Kater; Jun 11, 2023, 07:49 AM. Reason: added PS
              Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
              Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

              get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
              install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

              Comment


                #8
                Here are my Wayland results (using an Intel IRIS Xe GPU)
                Before:
                Code:
                jerry@jerry-HP-Laptop-17-cn1xxx:~$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.042s
                user 0m0.034s
                sys 0m0.005s
                After change:
                Code:
                jerry@jerry-HP-Laptop-17-cn1xxx:~$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.044s
                user 0m0.036s
                sys 0m0.004s​
                However, doing the "time konsole=e" repeatedly produces results that vary as widely or more than those two results:
                Code:
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.044s
                user 0m0.036s
                sys 0m0.004s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.044s
                user 0m0.033s
                sys 0m0.007s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.042s
                user 0m0.024s
                sys 0m0.014s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.045s
                user 0m0.025s
                sys 0m0.018s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.043s
                user 0m0.030s
                sys 0m0.009s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.043s
                user 0m0.029s
                sys 0m0.010s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.045s
                user 0m0.035s
                sys 0m0.009s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.042s
                user 0m0.035s
                sys 0m0.005s
                jerry@jerry-HP-Laptop-17-cn1xxx$ time konsole -e
                konsole: Missing value after '-e'.
                
                real 0m0.042s
                user 0m0.026s
                sys 0m0.013s

                So on Wayland I'm given the "fix" a rating of zero impact.
                Last edited by GreyGeek; Jun 10, 2023, 03:26 PM.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Thank you very much!
                  Due to the bug report I already suspected that it could only concern X11
                  Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                  Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                  get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                  install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                  Comment


                    #10
                    Results with an older CPU (Intel i3-3225 with iGPU, openSUSE Leap 15.5, KDE Plasma 5.27, X11):

                    average of 10 without additional
                    [QtQuickRendererSettings]
                    SceneGraphBackend=opengl​​

                    in $HOME/.config/kdeglobals
                    Code:
                    real    0m0,160s
                    user    0m0,134s
                    sys     0m0,022s​


                    average of 10 with additional
                    [QtQuickRendererSettings]
                    SceneGraphBackend=opengl​​

                    in $HOME/.config/kdeglobals
                    Code:
                    real    0m0,108s
                    user    0m0,092s
                    sys     0m0,013s​
                    ​-> performance gain is about 35%

                    I suppose the more modern a (dedicated) GPU is (in combination with newer kernel etc.) the more performance could be gained.
                    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                    Comment


                      #11
                      I was tempted to switch to X11 and experiement, but at 82 my neurons take much more time to communicate than what your gain indicates, so I'll be staying with Wayland. In fact, I wouldn't switch for a 100% gain.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        I don't think that Wayland has this error in KWin because the bug report speaks of GLX only - I was just curious…
                        Stock Kwin in Wayland should be roughly as fast as Kwin in X11 with the addition to $HOME/.config/kdeglobals I would suppose - perhaps I will test this next week if nobody beats me to it.

                        PS and a tiny bit OT: I would like to test this with Wayland in KDE neon - do I have to install additional packages to use Wayland there or is a standard KDE neon installation sufficient?
                        Last edited by Schwarzer Kater; Jun 11, 2023, 02:07 PM.
                        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                        Comment


                          #13
                          Originally posted by Schwarzer Kater View Post
                          PS and a tiny bit OT: I would like to test this with Wayland in KDE neon - do I have to install additional packages to use Wayland there or is a standard KDE neon installation sufficient?
                          Nope, just log in to a Wayland session

                          Comment


                            #14
                            Wayland update!
                            I have moved back to X11.
                            The main reason was because, while using Dolphin, the right mouse function was extremely temperamental, with the top 3 options being chosen randomly and automatically. Thus, while trying to add the execute permission to an AppImage, a copy was created instead. When I tried to delete the copy a copy of the copy was made. I ended up with 3 copies of the original file. Group selecting the 3 copies I managed to delete them. I again tried to add the execute permission to the original file and instead Dolphin (or Wayland) decided to delete it.

                            Wayland is much better than it was last year but I'll wait another year before I try it again.
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment

                            Working...
                            X