SUMMARY When scrolling with a wacom tablet, the pages move slower than the input, accumulating up to dozens of seconds of latency, rendering the software unusable STEPS TO REPRODUCE 1. Attach a wacom tablet to the pc 2. Open a pdf document in okular 3. Scroll the document with the wacom tablet and notice the sluggishness OBSERVED RESULT I made a video https://youtu.be/BJEZYtXhhMI EXPECTED RESULT It should move the page without latency, I can mind low framerate since i'm with a 4k screen on intel graphics but this is bad IMPORTANT: It was working fine at the beginning of this year! So the regression is somewhat recent I tried with a new user and on another pc and the problem is confirmed SOFTWARE VERSIONS KDE Plasma Version: 5.13.5 KDE Frameworks Version: 5.50.0 Qt Version: 5.11.2 I'm using arch linux so it has always been recent and close to upstream ADDITIONAL INFORMATION Looking at ksysguard when okular is moving by itself, I see xorg hogging a cpu core at 100%, okular is using 2% of the cpu, so is kwin_x11 Wayland is not an option on my setup
Not major
Which update exactly broke it? You could git-bisect Okular changes, but since you mention 'xorg' process has 100%, it probably is a video driver issue.
I compiled okular 1.1.3 and 1.0.3 and the problem was still present, I'm pretty sure that the regression was more recent than that... So where should I look? I haven't noticed this kind of slowdown in other parts of the system, there's something that breaks okular in a specific way... I think the problem can be worked around by consuming the input as fast as possible and updating the page position once every screen refresh, I can mind a bad framerate but not 30+ seconds of latency, I think this is still an okular issue, but I was not even able to find the relevant file/function in the okular source code and it's not that well documented, if someone can help in that regard that'll be great This is the output of perf top when the latency is rolling: Samples: 347K of event 'cycles:ppp', 4000 Hz, Event count (approx.): 74074580252 Overhead Shared Object Symbol 34.75% [kernel] [k] copy_user_enhanced_fast_string 3.13% [kernel] [k] __check_object_size 1.64% libc-2.28.so [.] __memmove_avx_unaligned_erms 1.38% [kernel] [k] __radix_tree_lookup 1.03% perf [.] hpp__sort_overhead
I tried with the nvidia card in my hybrid graphics laptop, running okular with bumblebee, the problem is reproduced (it can still be an intel bug, idk) I tried in my tablet with a touchscreen (and intel soc), and the problem is reproduced, so it's not only the wacom tablet that causes the bug, but probably everything that works like a touchscreen
Why did you assign the bug to yourself? If you do that the rest of the world stops getting emails, so don't do that.
sorry :C I made a patch that fixes the issue, can you look into it?
Created attachment 115966 [details] path
Please use Phabricator for patches https://community.kde.org/Get_Involved/development#Submitting_your_first_patch
It seems that it's Qt's job to avoid this issue, or, at least, there's a difference in how Qt handles the mouse vs the touch thing I opened a Qt bug report for this issue: https://bugreports.qt.io/browse/QTBUG-71708 So I'm closing this for now
Git commit 5ef54e97ecd2e2a7557de9cb5e07c55a172b55e1 by Nate Graham, on behalf of Kezi Olio. Committed on 05/04/2019 at 16:34. Pushed by ngraham into branch 'Applications/19.04'. Set Qt::AA_CompressTabletEvents attribute to avoid latency when scrolling with a tablet Summary: See also: https://bugreports.qt.io/browse/QTBUG-71708 Enabling this option _vastly_ improves the user experience on wacom tablets and touchscreens Reviewers: #okular Subscribers: sander, aacid, okular-devel, #okular Tags: #okular Differential Revision: https://phabricator.kde.org/D16519 M +1 -0 shell/main.cpp https://commits.kde.org/okular/5ef54e97ecd2e2a7557de9cb5e07c55a172b55e1