Discussion:
[okular] [Bug 399208] New: Okular has an extemely high latency when scrolling with a wacom tablet
Keziolio
2018-09-29 11:22:58 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

Bug ID: 399208
Summary: Okular has an extemely high latency when scrolling
with a wacom tablet
Product: okular
Version: 1.5.1
Platform: Archlinux Packages
OS: Linux
Status: REPORTED
Severity: major
Priority: NOR
Component: general
Assignee: okular-***@kde.org
Reporter: ***@gmail.com
Target Milestone: ---

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


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
--
You are receiving this mail because:
You are the assignee for the bug.
Albert Astals Cid
2018-09-30 23:05:32 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

Albert Astals Cid <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@kde.org
Severity|major |normal

--- Comment #1 from Albert Astals Cid <***@kde.org> ---
Not major
--
You are receiving this mail because:
You are the assignee for the bug.
Christoph Feck
2018-10-11 14:42:35 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

--- Comment #2 from Christoph Feck <***@kde.org> ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
Keziolio
2018-10-12 19:35:05 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

--- Comment #3 from Keziolio <***@gmail.com> ---
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
--
You are receiving this mail because:
You are the assignee for the bug.
Keziolio
2018-10-13 16:53:21 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

--- Comment #4 from Keziolio <***@gmail.com> ---
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
--
You are receiving this mail because:
You are the assignee for the bug.
Keziolio
2018-10-29 17:37:11 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

Keziolio <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|okular-***@kde.org |***@gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
Albert Astals Cid
2018-10-29 17:54:11 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

Albert Astals Cid <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|***@gmail.com |okular-***@kde.org

--- Comment #5 from Albert Astals Cid <***@kde.org> ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
Keziolio
2018-10-29 17:57:26 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

--- Comment #6 from Keziolio <***@gmail.com> ---
sorry :C

I made a patch that fixes the issue, can you look into it?
--
You are receiving this mail because:
You are the assignee for the bug.
Keziolio
2018-10-29 17:57:40 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

--- Comment #7 from Keziolio <***@gmail.com> ---
Created attachment 115966
--> https://bugs.kde.org/attachment.cgi?id=115966&action=edit
path
--
You are receiving this mail because:
You are the assignee for the bug.
Albert Astals Cid
2018-10-29 18:10:38 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

--- Comment #8 from Albert Astals Cid <***@kde.org> ---
Please use Phabricator for patches

https://community.kde.org/Get_Involved/development#Submitting_your_first_patch
--
You are receiving this mail because:
You are the assignee for the bug.
Keziolio
2018-11-19 23:27:52 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399208

Keziolio <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|REPORTED |RESOLVED
Resolution|--- |UPSTREAM

--- Comment #9 from Keziolio <***@gmail.com> ---
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
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...