Bug 1030802

Summary: ETPS/2 Elantech Touchpad click problems
Product: [Fedora] Fedora Reporter: Victor Ion Munteanu <victor.munteanu>
Component: kernelAssignee: Josh Boyer <jwboyer>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: eldermarco, gansalmon, hdegoede, itamar, jonathan, kernel-maint, madhu.chinakonda, peter.hutterer, theo148, victor.munteanu
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-3.12.5-302.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-21 02:13:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
evemu recording
none
Dmesg output
none
PATCH: proper detect wether v3/v4 is a clickpad or not
none
PATCH: elantech: add support for IC body v8
none
PATCH v2: proper detect wether v3/v4 is a clickpad or not none

Description Victor Ion Munteanu 2013-11-15 07:32:58 UTC
Description of problem:
My laptop has an ETPS/2 Elantech Touchpad. Currently, it is working under Fedora 19 with a small hickup: the right click button is not working and the left click button is alternating between left and right click.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Use the touchpad
2.
3.

Actual results:
Right click not working, left click alternates between left and right click.

Expected results:
Both left and right click buttons work as intended.

Additional info:
Device 'ETPS/2 Elantech Touchpad':
	Device Enabled (140):	1
	Coordinate Transformation Matrix (142):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	Device Accel Profile (266):	1
	Device Accel Constant Deceleration (267):	2.500000
	Device Accel Adaptive Deceleration (268):	1.000000
	Device Accel Velocity Scaling (269):	12.500000
	Synaptics Edges (270):	143, 3448, 101, 1780
	Synaptics Finger (271):	1, 1, 0
	Synaptics Tap Time (272):	180
	Synaptics Tap Move (273):	178
	Synaptics Tap Durations (274):	180, 180, 100
	Synaptics ClickPad (275):	1
	Synaptics Middle Button Timeout (276):	0
	Synaptics Two-Finger Pressure (277):	282
	Synaptics Two-Finger Width (278):	7
	Synaptics Scrolling Distance (279):	81, 81
	Synaptics Edge Scrolling (280):	0, 0, 0
	Synaptics Two-Finger Scrolling (281):	1, 1
	Synaptics Move Speed (282):	1.000000, 1.750000, 0.049346, 0.000000
	Synaptics Off (283):	0
	Synaptics Locked Drags (284):	0
	Synaptics Locked Drags Timeout (285):	5000
	Synaptics Tap Action (286):	0, 0, 0, 0, 0, 0, 0
	Synaptics Click Action (287):	1, 3, 2
	Synaptics Circular Scrolling (288):	0
	Synaptics Circular Scrolling Distance (289):	0.100000
	Synaptics Circular Scrolling Trigger (290):	0
	Synaptics Palm Detection (291):	0
	Synaptics Palm Dimensions (292):	10, 200
	Synaptics Coasting Speed (293):	20.000000, 50.000000
	Synaptics Pressure Motion (294):	30, 160
	Synaptics Pressure Motion Factor (295):	1.000000, 1.000000
	Synaptics Grab Event Device (296):	1
	Synaptics Gestures (297):	1
	Synaptics Capabilities (298):	1, 0, 0, 1, 1, 1, 1
	Synaptics Pad Resolution (299):	32, 33
	Synaptics Area (300):	0, 0, 0, 0
	Synaptics Soft Button Areas (301):	1795, 0, 1542, 0, 0, 0, 0, 0
	Synaptics Noise Cancellation (302):	20, 20
	Device Product ID (259):	2, 14
	Device Node (260):	"/dev/input/event4"

Comment 1 Hans de Goede 2013-11-27 11:14:18 UTC
Hi Munteanu,

Does your touchpad have separate physical buttons for the "mouse" buttons, or is it a touchpad which you press-down until you feel a click to do a button press (a so called clickpad) ?

If it is a clickpad, have you tried different areas of the pad? Usually there is an area reserved for right clicks, and the rest registers as left clicks.

It would also help to know which model laptop you have.

If the problem is not solved by using certain areas of the touchpad to emulate specific button presses, we will need some recordings of the "raw" events generated by the touchpad to further debug this problem. In this case first of all do a "yum install evemu", and then follow the recording instructions here:
http://who-t.blogspot.nl/2013/11/evtest-is-dead-long-live-evemu.html

Note it is especially important that you also try playback and that the playback shows the problem. You can start xev in a terminal under X to make events visible.

When you attach the recording, please also describe which button presses should be seen, as well as which presses you're actually seeing on playback, ie add something like this:

Button pressed on touchpad;     Button seen by X:
Right                                            Right
Right                                            Left
Left                                              Right

Comment 2 Victor Ion Munteanu 2013-12-02 14:39:33 UTC
Hi Hans,

I'm sorry for the late reply. The laptop model is Asus G750JX. The touchpad has two separate distinct buttons.

I've tried the evemu (according to the guide) but I get:
"error: this device is grabbed and I cannot record events"

As for xev, when i left click I get:
ButtonPress event, serial 36, synthetic NO, window 0x2e00001,
    root 0x28a, subw 0x0, time 802957, (100,131), root:(102,254),
    state 0x10, button 1, same_screen YES

ButtonRelease event, serial 36, synthetic NO, window 0x2e00001,
    root 0x28a, subw 0x0, time 803154, (100,131), root:(102,254),
    state 0x110, button 1, same_screen YES

But when I right click, xev registers nothing.

I will try to see how to make xorg not grabb the device to get you the raw data.

Comment 3 Peter Hutterer 2013-12-04 21:49:46 UTC
You can just VT-switch away, or run xinput --disable "device name".
For something more permanent, drop this into your /etc/X11/xorg.conf.d
directory:

Section "InputClass"
	Identifier "Don't grab synaptics"
	MatchDriver "synaptics"
	Option "GrabEventDevice" "off"
EndSection

Comment 4 Hans de Goede 2013-12-05 09:04:45 UTC
Hi Munteanu,

To debug this further we really need some evemu recordings. As Peter said you can make them from a text console, this mean you won;t be able to look at xev at the same time, but that is not that important.

Can you please make a recording of a left and right button press on a text console and attach those here?

Thanks,

Hans

Comment 5 Victor Ion Munteanu 2013-12-05 09:25:12 UTC
Created attachment 833060 [details]
evemu recording

Comment 6 Victor Ion Munteanu 2013-12-05 09:28:45 UTC
Hi Hans and Peter,

I've disabled it and was able to record (as can be seen in the attachment). Unfortunately the recording never registers the right click, only the left one (as can be seen in the recording).

I'm not sure what to make of this, except that the driver support is flaky. Please note that it works fine under Windows.

Best,
Victor

Comment 7 Hans de Goede 2013-12-05 09:43:12 UTC
Thanks,

This looks like it may be a kernel bug. Can you please do "dmesg > dmesg.log" in a terminal and the attach dmesg.log here?

Regards,

Hans

Comment 8 Hans de Goede 2013-12-05 09:48:00 UTC
Note to self, likely cause of this is:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/input/mouse/elantech.c?id=e3dde4fba94e0ba5e1fd79ea9e5389eea1f0cfec

Need dmesg to confirm that this is a v4 model.

Comment 9 Hans de Goede 2013-12-05 11:03:43 UTC
I'm pretty sure I know how to fix this now, I don't need full dmesg, can you do:

dmesg | grep elan

In a terminal and paste the output here please ?

Comment 10 Victor Ion Munteanu 2013-12-05 14:12:47 UTC
Sorry for the late reply, was in meetings all day.

Output as follows:

[    2.611317] psmouse serio4: elantech: assuming hardware version 4 (with firmware version 0x360f00)
[    2.625765] psmouse serio4: elantech: Synaptics capabilities query result 0x00, 0x16, 0x0c.

Hope this helps.

Comment 11 Victor Ion Munteanu 2013-12-05 14:14:45 UTC
Created attachment 833171 [details]
Dmesg output

I've attached full dmesg just in case you need it.

Comment 12 Hans de Goede 2013-12-05 15:46:09 UTC
(In reply to Munteanu Victor Ion from comment #10)
> Sorry for the late reply, was in meetings all day.
> 
> Output as follows:
> 
> [    2.611317] psmouse serio4: elantech: assuming hardware version 4 (with
> firmware version 0x360f00)
> [    2.625765] psmouse serio4: elantech: Synaptics capabilities query result
> 0x00, 0x16, 0x0c.
> 
> Hope this helps.

Excellent that confirms my suspicions and also matches wrt the undocumented bit I've found to differentiate between clickpads and devices with real hardware buttons.

I'll whip up a kernel patch for this and build a test kernel for you. I don't know when I'll have time for this. Monday at the latest but hopefully sooner.

Comment 13 Victor Ion Munteanu 2013-12-05 16:27:40 UTC
Thanks for the quick reply. Please also note that my left click is behaving most of the time as left click (80%) and the remainder as right click, and I'm not sure what triggers the change in behaviour.

Comment 14 Hans de Goede 2013-12-06 07:59:11 UTC
(In reply to Munteanu Victor Ion from comment #13)
> Thanks for the quick reply. Please also note that my left click is behaving
> most of the time as left click (80%) and the remainder as right click, and
> I'm not sure what triggers the change in behaviour.

This is likely caused by you having a finger on the right bottom area of the touchpad, and since the driver thinks it is a clickpad (with a single button underneath the pad) it interprets clicks on that single button (your left button) with a finger in the bottom right area as a right click.

The fix I've planned should also fix that.

Comment 15 Hans de Goede 2013-12-09 14:45:40 UTC
Created attachment 834347 [details]
PATCH: proper detect wether v3/v4 is a clickpad or not

Comment 16 Hans de Goede 2013-12-09 14:46:54 UTC
Created attachment 834349 [details]
PATCH: elantech: add support for IC body v8

While fixing the elantech driver anyways lets also add support for IC body v8 (trivial patch).

Comment 17 Hans de Goede 2013-12-09 19:17:33 UTC
Hi Munteanu,

I've done a test kernel-build with the 2 attached patches, which should fix your problem, you can download it here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=6272001

Please don't wait too long with downloading, as it is a test build the buildsystem will remove it in a couple of days.

Please let us know if this fixes your issue.

Thanks,

Hans

Comment 18 Victor Ion Munteanu 2013-12-10 08:19:57 UTC
Hi Hans,

I've downloaded and tested the kernel and it works. The right click works, left click doesn't right click when finger is on bottom area. It's great!

Thanks,
Victor

Comment 19 Hans de Goede 2013-12-10 10:02:46 UTC
Created attachment 834680 [details]
PATCH v2: proper detect wether v3/v4 is a clickpad or not

New version of the patch fixing this, with some minor changes based on upstream review.

Comment 20 Hans de Goede 2013-12-10 10:06:04 UTC
Josh,

Can you add the 2 patches I've attached here to the next Fedora kernel-builds, and make bodhi close this bug when they hit stable? 

I can do it myself, but I've the feeling I would only get in your way wrt creating updates in bodhi, etc.

Thanks & Regards,

Hans

Comment 21 Josh Boyer 2013-12-10 13:41:13 UTC
(In reply to Hans de Goede from comment #20)
> Josh,
> 
> Can you add the 2 patches I've attached here to the next Fedora
> kernel-builds, and make bodhi close this bug when they hit stable? 
> 
> I can do it myself, but I've the feeling I would only get in your way wrt
> creating updates in bodhi, etc.
> 
> Thanks & Regards,
> 
> Hans

Yes, but do you have a link to the upstream submission of them?  That way I can put it in the patches and we know where they're headed and have an idea of when they'll be in Linus' tree.

Comment 23 Josh Boyer 2013-12-10 15:45:46 UTC
Great.  Thanks Hans.  I'll get these in later today.

Comment 24 Josh Boyer 2013-12-11 13:51:26 UTC
Patches added.  Thanks again.

Comment 25 Victor Ion Munteanu 2013-12-11 13:57:49 UTC
Thank you both for the help. I wish you guys handled the wireless part also, would speed up my bug report there also :)

Comment 26 Fedora Update System 2013-12-15 17:01:40 UTC
kernel-3.12.5-301.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/kernel-3.12.5-301.fc20

Comment 27 Fedora Update System 2013-12-16 07:07:09 UTC
Package kernel-3.12.5-301.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.12.5-301.fc20'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23445/kernel-3.12.5-301.fc20
then log in and leave karma (feedback).

Comment 28 Fedora Update System 2013-12-18 04:51:31 UTC
kernel-3.12.5-200.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/kernel-3.12.5-200.fc19

Comment 29 Fedora Update System 2013-12-20 01:47:51 UTC
Package kernel-3.12.5-302.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.12.5-302.fc20'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23445/kernel-3.12.5-302.fc20
then log in and leave karma (feedback).

Comment 30 Fedora Update System 2013-12-21 02:13:40 UTC
kernel-3.12.5-200.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2013-12-21 02:23:31 UTC
kernel-3.12.5-302.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Elder Marco 2014-06-04 20:30:41 UTC
I think that there is an exception for Dell Vostro 5470. I opened a new bug here:

https://bugzilla.redhat.com/show_bug.cgi?id=1103528