xournalpp icon indicating copy to clipboard operation
xournalpp copied to clipboard

Touch scrolling velocity during lag spikes

Open cameronaw13 opened this issue 1 year ago • 1 comments

Operating System

Linux

(Linux only) Distribution

Fedora 38 Workstation

(Linux only) Desktop Environment

GNOME 44

(Linux Only) Display Server

Wayland

Installation Method

Flatpak & Fedora rpm

Xournal++ Version

1.2.2

libgtk Version

3.24.38

Bug Description

When annotating on very large documents Xournal++ is very laggy (a separate issue in itself). The issue I want to report here is regarding how touch-based scrolling is handled when using xournal++ with lag spikes.

This occurs with both gtk's intertial and xournal++'s non inertial scrolling, though it is somewhat harder to achieve without inertial scrolling. What's common between both touch scrolling implementations is that, with a big enough lag spike, you will unavoidably scroll to either the top or bottom of a document within a few seconds, even if it is thousands of pages long.

Expected Behaviour

In a perfect world, the program would only scroll through the document relative to how much you scroll on the touchscreen even if lag spikes occur. But, since functions that handle scrolling are likely to hang on a lag spike, there could be at least some sort of condition that detects if the user scrolls too fast and forces them to stop scrolling to prevent this issue.

Steps to Reproduce

  1. Open a large document (in my case over 1000 pages) that can cause large lag spikes when scrolling or zooming.
  2. Find a way to cause a large lag spike while scrolling with a touchscreen. Ways to encourage this are:
    1. moving to different unloaded pages throughout the document
    2. zooming with the touchscreen
    3. scrolling very fast.

Additional Context

Here is a recorded example of the bug with gtk inertial scroll: https://github.com/xournalpp/xournalpp/assets/113076756/ab3cd184-fde5-40c0-9400-7432f0f649f8

And here is a recorded example without gtk scroll: https://github.com/xournalpp/xournalpp/assets/113076756/fcefc867-643a-43fe-8005-1ed6c4cedbc6

Listed here are also links to the debug logs if needed: https://pastebin.com/RrxytR4t https://pastebin.com/VVNijjkd

Also my output of libinput list-devices

Device:           Power Button
Kernel:           /dev/input/event3
Group:            1
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Video Bus
Kernel:           /dev/input/event7
Group:            2
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Power Button
Kernel:           /dev/input/event0
Group:            3
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Lid Switch
Kernel:           /dev/input/event1
Group:            4
Seat:             seat0, default
Capabilities:     switch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Sleep Button
Kernel:           /dev/input/event2
Group:            5
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Wacom Pen and multitouch sensor Pen
Kernel:           /dev/input/event8
Group:            6
Seat:             seat0, default
Size:             294x165mm
Capabilities:     tablet 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      identity matrix
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   none
Rotation:         n/a

Device:           Wacom Pen and multitouch sensor Finger
Kernel:           /dev/input/event9
Group:            6
Seat:             seat0, default
Size:             294x165mm
Capabilities:     touch 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      identity matrix
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           AT Translated Set 2 keyboard
Kernel:           /dev/input/event4
Group:            7
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           ETPS/2 Elantech Touchpad
Kernel:           /dev/input/event6
Group:            8
Seat:             seat0, default
Size:             99x53mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    *button-areas clickfinger 
Disable-w-typing: enabled
Disable-w-trackpointing: enabled
Accel profiles:   flat *adaptive custom
Rotation:         n/a

Device:           ETPS/2 Elantech TrackPoint
Kernel:           /dev/input/event5
Group:            8
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation:         n/a

Device:           ThinkPad Extra Buttons
Kernel:           /dev/input/event11
Group:            9
Seat:             seat0, default
Capabilities:     keyboard switch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           input-remapper keyboard
Kernel:           /dev/input/event17
Group:            10
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           input-remapper ThinkPad Extra Buttons forwarded
Kernel:           /dev/input/event18
Group:            11
Seat:             seat0, default
Capabilities:     keyboard switch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

cameronaw13 avatar Oct 18 '23 22:10 cameronaw13

This issue affects me too. How could this be solved?

twoexem avatar Apr 25 '24 19:04 twoexem