Bug 478081 - With high refresh rate screen, sidebar scrolling framerate is lower before opening Colors & Themes group
Summary: With high refresh rate screen, sidebar scrolling framerate is lower before op...
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: sidebarview (show other bugs)
Version: 5.90.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 459680 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-04 21:06 UTC by dominickator122102
Modified: 2024-05-20 16:27 UTC (History)
4 users (show)

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


Attachments
Though it may be hard to tell since OBS records at 60 FPS, before I open the "Colors and Themes" menu, the scrolling appears very choppy, but after going in and out of the menu it is buttery smooth. (2.02 MB, video/mp4)
2023-12-04 21:06 UTC, dominickator122102
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dominickator122102 2023-12-04 21:06:24 UTC
Created attachment 163870 [details]
Though it may be hard to tell since OBS records at 60 FPS, before I open the "Colors and Themes" menu, the scrolling appears very choppy, but after going in and out of the menu it is buttery smooth.

In the KDE Plasma System Settings application, the main sidebar exhibits laggy scrolling behavior with a notably low frame rate, not matching the native refresh rate of 165Hz. This issue is initially present upon opening the System Settings. However, navigating to the "Colors and Themes" section and then returning to the main sidebar rectifies the issue, resulting in smooth scrolling consistent with the expected 165Hz refresh rate.

STEPS TO REPRODUCE
1. Open the system settings application
2. Scroll up and down on the main sidebar with a high refresh rate monitor

OBSERVED RESULT
Choppy scrolling not consistent with other applications where the scrolling is buttery smooth.

EXPECTED RESULT
The smooth scrolling should be at 165hz.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.90
KDE Frameworks Version: 5.246.0 
Qt Version: 6.6.1

ADDITIONAL INFORMATION
    Mesa Version: 23.2.1
    OpenGL Version: 4.6
    GPU: AMD RX 6700XT
    Operating System: Arch Linux
    KDE Plasma Version: 5.90, running under a Wayland session
    CPU: Ryzen 5 3600
    RAM: 32GB
Comment 1 Nate Graham 2023-12-13 16:42:23 UTC
Yeah the screen recording doesn't really show it to me, sorry. I'm a pleb with a 60hz screen here and it looks fine. :)
Comment 2 dominickator122102 2023-12-13 20:38:04 UTC
(In reply to Nate Graham from comment #1)
> Yeah the screen recording doesn't really show it to me, sorry. I'm a pleb
> with a 60hz screen here and it looks fine. :)

Yeah I'm not sure how to show it to you, but when on a higher refresh rate screen, the scrolling is indeed very jarring to the point where I had thought I was using a lower refresh rate but when I clicked on the colors and themes button, the scrolling became buttery smooth.
Comment 3 Nate Graham 2023-12-13 21:23:14 UTC
I totally believe you, but without a high refresh rate screen to test on, I'm afraid there's no way for me to reproduce the bug. I suspect a general lightening up of the list item code might help, but I can't be sure.
Comment 4 dominickator122102 2023-12-14 06:29:47 UTC
(In reply to Nate Graham from comment #3)
> I totally believe you, but without a high refresh rate screen to test on,
> I'm afraid there's no way for me to reproduce the bug. I suspect a general
> lightening up of the list item code might help, but I can't be sure.

Yeah. It really only seems to be the system settings that it happens in, everything else seems fine. So I’m definitely on board with your general lightening of the code theory! Thanks for putting in the effort!
Comment 5 Nate Graham 2023-12-14 17:14:51 UTC
Porting from Kirigami.IconTitleSubtitle to a raw icon and label item would lighten the delegates a bit by removing the unused subtitle label. Not sure how much it would really help though.

Can you test a patch? Apply this to CategoryItem.qml, either in your source checkout (if you're able to build System Settings from source) or else wherever that file lives on disk:

diff --git app/sidebar/qml/CategoryItem.qml app/sidebar/qml/CategoryItem.qml
index e8f2f471..5942dcc0 100644
--- app/sidebar/qml/CategoryItem.qml
+++ app/sidebar/qml/CategoryItem.qml
@@ -27,13 +27,18 @@ ItemDelegate {
     contentItem: RowLayout {
         spacing: Kirigami.Units.smallSpacing
 
-        Kirigami.IconTitleSubtitle {
-            Layout.fillWidth: true
+        Kirigami.Icon {
             Layout.leftMargin: delegate.leadingPadding
-            icon: icon.fromControlsIcon(delegate.icon)
-            title: delegate.text
+            implicitWidth: Kirigami.Units.iconSizes.smallMedium
+            implicitHeight: Kirigami.Units.iconSizes.smallMedium
+            source: delegate.icon.name
             selected: delegate.selected
         }
+        Label {
+            Layout.fillWidth: true
+            text: delegate.text
+            elide: Text.ElideRight
+        }
 
         Rectangle {
             Layout.alignment: Qt.AlignVCenter


Let me know if it helps at all.
Comment 6 dominickator122102 2023-12-15 23:11:36 UTC
(In reply to Nate Graham from comment #5)
> Porting from Kirigami.IconTitleSubtitle to a raw icon and label item would
> lighten the delegates a bit by removing the unused subtitle label. Not sure
> how much it would really help though.
> 
> Can you test a patch? Apply this to CategoryItem.qml, either in your source
> checkout (if you're able to build System Settings from source) or else
> wherever that file lives on disk:
> 
> diff --git app/sidebar/qml/CategoryItem.qml app/sidebar/qml/CategoryItem.qml
> index e8f2f471..5942dcc0 100644
> --- app/sidebar/qml/CategoryItem.qml
> +++ app/sidebar/qml/CategoryItem.qml
> @@ -27,13 +27,18 @@ ItemDelegate {
>      contentItem: RowLayout {
>          spacing: Kirigami.Units.smallSpacing
>  
> -        Kirigami.IconTitleSubtitle {
> -            Layout.fillWidth: true
> +        Kirigami.Icon {
>              Layout.leftMargin: delegate.leadingPadding
> -            icon: icon.fromControlsIcon(delegate.icon)
> -            title: delegate.text
> +            implicitWidth: Kirigami.Units.iconSizes.smallMedium
> +            implicitHeight: Kirigami.Units.iconSizes.smallMedium
> +            source: delegate.icon.name
>              selected: delegate.selected
>          }
> +        Label {
> +            Layout.fillWidth: true
> +            text: delegate.text
> +            elide: Text.ElideRight
> +        }
>  
>          Rectangle {
>              Layout.alignment: Qt.AlignVCenter
> 
> 
> Let me know if it helps at all.



I do not notice any difference after building systemsettings from source with the patch applied.
Comment 7 Nate Graham 2023-12-16 05:32:31 UTC
Darn. Then this will need deeper investigation from someone smarter than me.
Comment 8 Nate Graham 2024-05-20 16:27:03 UTC
*** Bug 459680 has been marked as a duplicate of this bug. ***