Bug 482035 - [6.0] Scrolling is done at a lower framerate than the monitor's
Summary: [6.0] Scrolling is done at a lower framerate than the monitor's
Status: CONFIRMED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.0.0
Platform: NixOS Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords: qt6, regression
Depends on:
Blocks:
 
Reported: 2024-02-29 14:45 UTC by Naxdy
Modified: 2024-03-27 17:47 UTC (History)
4 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 Naxdy 2024-02-29 14:45:11 UTC
SUMMARY
Not sure if this is the right place for this, but since 6.0, all scroll components in KDE apps scroll at a lower framerate than that of the monitor's. Note that this only applies to scrolling with the scroll wheel, manually dragging the scroll bar using the mouse cursor scrolls just fine at the monitor's frame rate.


STEPS TO REPRODUCE
1. Be on a 120Hz (or higher frame rate) monitor
2. Open System Settings
3. Resize the window such that the left panel becomes scrollable
4. Scroll the left panel using your mouse's scroll wheel

OBSERVED RESULT
The contents scroll at sub 120Hz

EXPECTED RESULT
The contents scroll at 120Hz

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: NixOS
(available in About System)
KDE Plasma Version: 6.0
KDE Frameworks Version: 6.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
-
Comment 1 ratijas 2024-03-11 10:08:05 UTC
That's quite unexpected. The new smooth scrolling behavior is backed by a QPropertyAnimation, which is supposed to integrate with QML scene's (and ultimately QWindow's-) refresh rate without any additional setup on our end. The only custom timer I see in this code is the one to force stop the animation after 400 ms.

https://invent.kde.org/frameworks/kirigami/-/blob/master/src/wheelhandler.cpp
Comment 2 Marco Martin 2024-03-14 08:42:13 UTC
did you use some tool to actually measure the exact framerate of the scrollview?
Comment 3 Naxdy 2024-03-15 08:47:22 UTC
Sadly I don't have a way to measure it, but I was able to capture the behavior on video. The file is too large to be uploaded here, so I've put it on my cloud: https://cloud.polskalemon.com/s/DkFnPSdPxT79Dk5

Note that, obviously, this only makes sense to watch on a 120Hz (or more) monitor.
Comment 4 ratijas 2024-03-16 20:27:45 UTC
> Note that, obviously, this only makes sense to watch on a 120Hz (or more) monitor.

not really necessary if you know how to use video editing software and navigate frame-by-frame…

Anyways, I have verified that your video shows subtle jitter / frame skips when scrolling with a mouse wheel but not with a scrollbar handle. Have not tried testing it on my 60Hz laptop though. FWIW it might even be a specific mouse wheel event of your hardware; but I'd assume it's a Kirigami.WheelHandler bug.

Mind posting here the mouse manufacturer & model, just in case?
Comment 5 Naxdy 2024-03-18 13:28:21 UTC
Here's my mouse output from lsusb:


Bus 003 Device 002: ID 046d:c08b Logitech, Inc. G502 SE HERO Gaming Mouse
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 [unknown]
  bDeviceSubClass         0 [unknown]
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc08b G502 SE HERO Gaming Mouse
  bcdDevice           27.03
  iManufacturer           1 Logitech
  iProduct                2 G502 HERO SE
  iSerial                 3 0A89324E3937
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x003b
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 U127.03_B0010           
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      67
          Report Descriptors: 
            ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 [unknown]
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     151
          Report Descriptors: 
            ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0014  1x 20 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)
Comment 6 Naxdy 2024-03-27 17:47:03 UTC
Interestingly, my wife (same mouse) doesn't have this issue, at least not to the same extent (it's still present, but weaker). Could be monitor related perhaps?

She's on a 2560x1080 monitor @144Hz, I'm on a 7680x2160 monitor @120Hz, both her and me are at 100% scaling.