Bug 98835

Summary: Touchpad very sensitive
Product: Wayland Reporter: arjon.bujupi
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: arjon.bujupi, peter.hutterer
Version: 1.5.0   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 98535    
Attachments: scroll.evemu
first.evemu
second.evemu
third.evemu

Description arjon.bujupi 2016-11-23 19:47:56 UTC
Created attachment 128171 [details]
scroll.evemu

My laptop's touchpad is very sensitive. It's unusable.

1. Attached is scroll.evemu.
2. The output from udevadm info: 

[arjoni@fedora25 ~]$ udevadm info /sys/class/input/event4
P: /devices/platform/i8042/serio4/input/input11/event4
N: input/event4
E: DEVNAME=/dev/input/event4
E: DEVPATH=/devices/platform/i8042/serio4/input/input11/event4
E: EVDEV_ABS_00=::31
E: EVDEV_ABS_01=::30
E: EVDEV_ABS_35=::31
E: EVDEV_ABS_36=::30
E: ID_BUS=i8042
E: ID_INPUT=1
E: ID_INPUT_HEIGHT_MM=67
E: ID_INPUT_TOUCHPAD=1
E: ID_INPUT_TOUCHPAD_INTEGRATION=internal
E: ID_INPUT_WIDTH_MM=98
E: LIBINPUT_ATTR_RESOLUTION_HINT=31x31
E: LIBINPUT_DEVICE_GROUP=11/2/e/0:isa0060/serio4
E: LIBINPUT_MODEL_ELANTECH_TOUCHPAD=1
E: MAJOR=13
E: MINOR=68
E: SUBSYSTEM=input
E: USEC_INITIALIZED=17204389

3. The vendor model number of your laptop: Asus X550CC (https://www.asus.com/Notebooks/X550CC/)

4. The content of /sys/class/dmi/id/modalias:

[arjoni@fedora25 ~]$ cat /sys/class/dmi/id/modalias
dmi:bvnAmericanMegatrendsInc.:bvrX550CC.300:bd03/24/2014:svnASUSTeKCOMPUTERINC.:pnX550CC:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnX550CC:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:

5. Physical dimensions of touchpad: 105 mm and 73 mm.


Everything works fine except it's very sensitive. 
Sorry if I am doing something wrong but I am not a very advanced linux user.
Is there a workaround to make it work before receiving updates from Fedora 25? 

Thank you!
Comment 1 arjon.bujupi 2016-12-02 13:11:03 UTC
Is there any update for this issue?
Comment 2 Peter Hutterer 2016-12-05 03:58:50 UTC
can you run the touchpad-edge-detector tool please. once we know the dimensions are correct we can figure out the other issues.
Comment 3 arjon.bujupi 2016-12-05 09:59:00 UTC
I run 

> touchpad-edge-detector 105x73 /sys/class/input/event5

But it returns "Error fetching the device info: Inappropriate ioctl for device".
It's the same if it's run as root.

Am I doing it wrong?
Comment 4 arjon.bujupi 2016-12-05 10:03:11 UTC
Nevermind my last post. here is the result:

sudo touchpad-edge-detector 105x73 /dev/input/event5
Touchpad ETPS/2 Elantech Touchpad on /dev/input/event5
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [0..3249], y [0..2223]
Touchpad sends:	x [0..3249], y [0..2223] -^C//

Touchpad size as listed by the kernel: 104x74mm
User-specified touchpad size: 105x73mm
Calculated ranges: 3249/2223

Suggested udev rule:
# <Laptop model description goes here>
evdev:name:ETPS/2 Elantech Touchpad:dmi:bvnAmericanMegatrendsInc.:bvrX550CC.300:bd03/24/2014:svnASUSTeKCOMPUTERINC.:pnX550CC:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnX550CC:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:*
 EVDEV_ABS_00=0:3249:31
 EVDEV_ABS_01=0:2223:30
 EVDEV_ABS_35=0:3249:31
 EVDEV_ABS_36=0:2223:30
Comment 5 Peter Hutterer 2016-12-06 07:16:22 UTC
ok, so the axis ranges appear to be correct. that's good (because it's correct) and bad (because the acceleration is difficult to fix). I need some evemu recordings from you, all with "normal" pressure, i.e. as you would otherwise use the touchpad. Separate files please:

* one where you hold a finger still on the touchpad
* move the pointer to the left edge of the screen, then start the recording. put the finger down close to the left edge of the touchpad and flick the pointer towards the right screen with one fast motion, whatever feels natural. how far did the pointer go (in pixels, approximately)?
* select a small target, e.g. the close tab cross in firefox. Move to approximately 2x2 cm south-east of the target. start the recording, put your finger down, move to close the target. If you overshoot by a lot, stop the recording (attach it here with a note). if you overshoot only slightly, finish to position the cursor and lift your finger. No need to click.
Comment 6 arjon.bujupi 2016-12-06 17:27:32 UTC
* one where you hold a finger still on the touchpad

File: first.evemu

* move the pointer to the left edge of the screen, then start the recording. put the finger down close to the left edge of the touchpad and flick the pointer towards the right screen with one fast motion, whatever feels natural. how far did the pointer go (in pixels, approximately)?

File: second.evemu 

I noticed something strange. From the nearest place on the left, the cursor didn't move at all. Maybe a few ml on the right it does, and with the fast motion, it goes to the right edge of the screen. very fast. 


* select a small target, e.g. the close tab cross in firefox. Move to approximately 2x2 cm south-east of the target. start the recording, put your finger down, move to close the target. If you overshoot by a lot, stop the recording (attach it here with a note). if you overshoot only slightly, finish to position the cursor and lift your finger. No need to click.

File: third.evemu

It moves a little bit but it's still very annoying. 

Files will be added to the main issue because i didn't find a place to add them to this comment.
Comment 7 arjon.bujupi 2016-12-06 17:28:08 UTC
Created attachment 128358 [details]
first.evemu
Comment 8 arjon.bujupi 2016-12-06 17:28:30 UTC
Created attachment 128359 [details]
second.evemu
Comment 9 arjon.bujupi 2016-12-06 17:28:50 UTC
Created attachment 128360 [details]
third.evemu
Comment 10 Peter Hutterer 2016-12-14 03:36:25 UTC
(In reply to arjon.bujupi from comment #6)
> File: second.evemu 
> 
> I noticed something strange. From the nearest place on the left, the cursor
> didn't move at all. Maybe a few ml on the right it does, and with the fast
> motion, it goes to the right edge of the screen. very fast. 

that's palm detection kicking in if you leave the finger there for too long (200ms). See http://wayland.freedesktop.org/libinput/doc/latest/palm_detection.html 

> Files will be added to the main issue because i didn't find a place to add
> them to this comment.

That's fine. fwiw, what I usually do is when there's only one attachment is to just fill out the comment box in the attachment form, shows up as comment here and no need for separate comments then.
Comment 11 Peter Hutterer 2016-12-14 04:33:56 UTC
Note that the below is half archiving of my thoughts as well as a real comment :)

(In reply to arjon.bujupi from comment #8)
> Created attachment 128359 [details]
> second.evemu

reminder: this was the fast left-right motion

slight no-motion at the beginning but then a curving motion to the right, so the finger movement is nicely visible. Almost all of that motion falls into the maximum acceleration, i.e. the area where we don't scale further but merely apply the maximum acceleration factor - that's true almost from the beginning of the motion onwards.

I guess if it goes that easily to the right edge of the screen, we need to adjust motion speed that the current max acceleration is triggered much later. In this recording you're reaching the max acceleration factor early despite going 4 times as fast later.


(In reply to arjon.bujupi from comment #9)
> Created attachment 128360 [details]
> third.evemu

reminder: this was the 2cm click motion. 

I can see by the motion vectors that you overshot a little. most of your movement falls into the 'acceleration' range, i.e. before we cap the maximum factor. The immediate first and last movements (i.e. the ones after the overshoot) were decelerated. Would you say that that cursor movement was still too fast when correcting for the overshoot (and moving slower)?

Is there a speed setting that makes your touchpad usable for this action? Most recent suggestion was -0.55 which apparently makes it like macos' touchpad movement. try with xinput "ETPS/2 Elantech Touchpad" "libinput Accel Speed" -0.55, and try some other values too please (anything between -1.0 and 0.0 slows down)
Comment 12 arjon.bujupi 2016-12-14 10:13:20 UTC
It was not too fast when correcting. 

The command you told me to run returns:

[arjoni@fedora25 ~]$ xinput "ETPS/2 Elantech Touchpad" "libinput Accel Speed" -0.55
usage :
	xinput get-feedbacks <device name>
	xinput set-ptr-feedback <device name> <threshold> <num> <denom>
	xinput set-integer-feedback <device name> <feedback id> <value>
	xinput get-button-map <device name>
	xinput set-button-map <device name> <map button 1> [<map button 2> [...]]
	xinput set-pointer <device name> [<x index> <y index>]
	xinput set-mode <device name> ABSOLUTE|RELATIVE
	xinput list [--short || --long || --name-only || --id-only] [<device name>...]
	xinput query-state <device name>
	xinput test [-proximity] <device name>
	xinput create-master <id> [<sendCore (dflt:1)>] [<enable (dflt:1)>]
	xinput remove-master <id> [Floating|AttachToMaster (dflt:Floating)] [<returnPointer>] [<returnKeyboard>]
	xinput reattach <id> <master>
	xinput float <id>
	xinput set-cp <window> <device>
	xinput test-xi2 [--root] <device>
	xinput map-to-output <device> <output name>
	xinput list-props <device> [<device> ...]
	xinput set-int-prop <device> <property> <format (8, 16, 32)> <val> [<val> ...]
	xinput set-float-prop <device> <property> <val> [<val> ...]
	xinput set-atom-prop <device> <property> <val> [<val> ...]
	xinput watch-props <device>
	xinput delete-prop <device> <property>
	xinput set-prop <device> [--type=atom|float|int] [--format=8|16|32] <property> <val> [<val> ...]
	xinput disable <device>
	xinput enable <device>



If run as root:

[arjoni@fedora25 ~]$ sudo xinput "ETPS/2 Elantech Touchpad" "libinput Accel Speed" -0.55
[sudo] password for arjoni: 
No protocol specified
Unable to connect to X server
Comment 13 arjon.bujupi 2016-12-14 10:13:58 UTC
Any other suggestion? Maybe I am not doing it as I should.
Comment 14 Peter Hutterer 2016-12-15 08:04:01 UTC
sorry, that should've been xinput set-prop ....

either way, I have something worth trying if you're willing to build from a git tree:
https://github.com/whot/libinput/tree/wip/touchpad-pointer-accel-v3
It's still WIP but tell me I'm at least going in the right direction.
Comment 15 arjon.bujupi 2016-12-15 15:28:21 UTC
No idea how to do that sorry...
Comment 16 Peter Hutterer 2016-12-21 03:20:46 UTC
See bug 98535, please try libinput master and report back whether this improves things. Thanks
Comment 17 arjon.bujupi 2016-12-22 20:53:25 UTC
Hello, can you please guide me to which repo you are talking about? Also I have to remove the current package and then compile libinput from source?
Comment 18 Peter Hutterer 2017-01-02 23:39:53 UTC
repository: http://cgit.freedesktop.org/wayland/libinput/

you don't have to remove the current package, you can just overwrite it by running ./configure --prefix=/usr --libdir=/usr/lib64 && make && sudo make install (the --libdir isn't needed on debian-based distributions). After testing, you can just sudo dnf reinstall libinput and you're good. [1]

there's a quirk though: master will currently install /usr/lib64/libinput.so.10.10.3 but the F25 package from the stable branch has /usr/lib64/libinput.so.10.10.4, with the symlinks pointing to it. so either remove the .4 file or fix the symlinks up so that it points to the .3 file. This sounds more complicated than it is :)


[1] you have to remove the /usr/lib64/libinput.la file manually
Comment 19 Peter Hutterer 2017-03-02 05:24:09 UTC
I'm closing this one as fixed because of the new touchpad accel method merged in 1.6 and no counter-argument has emerged since comment 16.

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.