Bug 99439 - High cpu usage during trackpoint scrolling.
Summary: High cpu usage during trackpoint scrolling.
Status: RESOLVED NOTOURBUG
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: 1.2.x
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-17 14:43 UTC by dnord
Modified: 2017-03-29 22:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description dnord 2017-01-17 14:43:28 UTC
When I use scrolling with trackpoint+3 mouse in Telegram (version 1.0) messaging application with libinput driver, cpu goes as high as 70%-80% during small movements. It only happens with trackpoint+3 mouse, but not with touchpad while both use smooth scrolling.
To my understanding cpu usage for touchpad and trackpoint smooth scrolling should be approximately the same for similar movements. So I suspect driver issue. Also with evdev+synaptics driver cpu usage is also significantly less (around 20%) for both devices. Only two of my applications use smooth scrolling intensively: chromium and telegram, but I have problems only with telegram.

Distro: Ubuntu 16.04
DE: Xfce 4.12
Graphical server: Xorg 1.18
libinput 1.2.3
xserver-xorg-input-libinput 0.18.0
Comment 1 Peter Hutterer 2017-01-19 03:26:58 UTC
hmm, this sounds more like a telegram bug then. If it was libinput, it would be high everywhere and I can't reproduce this here (tested on two different touchpads too). Not 100% sure though why it would be different for the touchpad. Also, libinput 1.2 is quite out of date now, please try 1.5 or the 16rc, thanks.
Comment 2 Peter Hutterer 2017-01-19 03:28:05 UTC
oh, and you're using xserver 1.18 which still does select on the fd, better to try 1.19 with the input threads, that may distributed some of the work during rendering better.
Comment 3 dnord 2017-01-19 06:18:47 UTC
Ok, I'll try updated libinput and xorg when I'll have time.
>tested on two different touchpads too
Bug arises with Thinkpad's trackpoint+3 mouse scroll only (also known as "Wheel emulation"), not on touchpads.
Comment 4 Peter Hutterer 2017-01-19 06:48:20 UTC
sorry, wasn't clear: i tested on two different touchpad+trackpoint combos, a T440s where the middle button is actually on the touchpad and a T450p where the middle button is a physical button.
Comment 5 dnord 2017-01-19 10:00:52 UTC
I just booted Fedora 25 with Xorg session of GNOME with:
xorg-x11-server-Xorg: 1.19.1-2.fc25
xorg-x11-drv-libinput: 0.23.0-2.fc25
libinput: 1.5.901-1.fc25
And it looks like main problem has gone: now it is 10% cpu for touchpad scrolling and only 20% cpu for trackpoint scrolling for Telegram, so it was definitely not Telegram bug. But it still 2 times more CPU usage! Should it be considered a bug?
Comment 6 Peter Hutterer 2017-03-29 05:06:58 UTC
urgh, I didn't realise this was in telegram again, that's why I left it open.

do you see the bug anywhere else but in Telegram? I certainly don't see any cpu spikes when just testing with the debugging tools and the CPU required for generating scroll events is miniscule. I wonder if the issue is here the difference between the scroll sources or how often telegram re-renders.
Comment 7 dnord 2017-03-29 16:41:29 UTC
I no longer have abnormal cpu-eating (like mentioned 80%) or difference between drivers after update. I just noticed, that sometimes trackpoint scrolling eats twice more cpu than touchpad scrolling (in Atom and Chromium, for example), but it can be due to more re-redering (or difference in a speed and way of scrolling movements are done) so nothing can be done about that. If it is not a problem, than bug can be closed.
Comment 8 Peter Hutterer 2017-03-29 22:46:53 UTC
ok, I think we can close the bug then, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.