Bug 1090161

Summary: Missing ButtonPress event on some boots with hid-rmi driver
Product: [Fedora] Fedora Reporter: Abrahm Scully <abrahm.scully>
Component: kernelAssignee: Benjamin Tissoires <btissoir>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: abrahm.scully, btissoir, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-3.14.4-100.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-10 03:20:01 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
dmesg of problem boot with i2c_hid.debug=1
none
hid-recorder output
none
evemu-record output
none
Xorg.0.log with clicks broken
none
Xorg.0.log with clicks working
none
dmesg with buttons working and i2c_hid.debug=1
none
0001-HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch
none
evemu-record output with working buttons with 3.14.1-200.bz1090161 none

Description Abrahm Scully 2014-04-22 19:10:24 UTC
Created attachment 888631 [details]
dmesg of problem boot with i2c_hid.debug=1

Description of problem:
On some boots, ButtonPress and ButtonRelease events are missing with Synaptic touchpad on a Dell XPS 13 after recent hid-rmi driver.

Version-Release number of selected component (if applicable):
kernel 3.14.1-200.1.fc20.x86_64 (Kernel from koji built with V1 of patch for bug 1089583).

How reproducible:
Every two to six boots.

Steps to Reproduce:
1. Reboot until clicks don't register.

Actual results:
Clicks don't work. xinput test-xi2 doesn't mention ButtonPress/ButtonRelease events.

Expected results:
Clicks should work.

Additional info:

Comment 1 Abrahm Scully 2014-04-22 19:12:49 UTC
Created attachment 888632 [details]
hid-recorder output

hid-recorder output of a single click while the clicks aren't working.

Comment 2 Abrahm Scully 2014-04-22 19:14:09 UTC
Created attachment 888633 [details]
evemu-record output

evemu-record output of a single click while clicks aren't working.

Comment 3 Abrahm Scully 2014-04-22 19:26:00 UTC
Created attachment 888648 [details]
Xorg.0.log with clicks broken

Comment 4 Abrahm Scully 2014-04-22 19:26:37 UTC
Created attachment 888649 [details]
Xorg.0.log with clicks working

Comment 5 Abrahm Scully 2014-04-22 19:35:24 UTC
The touchpad appears to be detected twice. Once as "DLL060A:00 06CB:2734", which appears to be the hid-rmi interface, and once as "SynPS/2 Synaptics TouchPad".

In Xorg.0.log, the line:

"(II) synaptics: DLL060A:00 06CB:2734: found clickpad property"

only appears when clicking works.

Comment 6 Benjamin Tissoires 2014-04-23 15:01:29 UTC
Abrahm, it looks like the driver does not detect the buttons and so it does not set the clickpad property.
I am wondering if this is a hardware problem. Unfortunately, the prototype I have here sends different data when probing it, so I'd like you to also post a dmesg with i2c_hid.debug=1 when the touchpad is working fine.

This way, I should be able to spot if the device sends sometimes the feature or not, or if it is a bad driver implementation.

Comment 7 Abrahm Scully 2014-04-23 17:29:06 UTC
Created attachment 889049 [details]
dmesg with buttons working and i2c_hid.debug=1

Comment 8 Benjamin Tissoires 2014-04-23 18:23:58 UTC
Thanks, I have now located the problem:

after filtering and cleaning, the working version shows:

- Read 0x14 from register 0x0045
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 0a 00 45 00 14 ...
- Received 14 bytes
i2c_hid i2c-DLL060A:00: input: 20 00 0b 14 78 00 19 19 00 10 e6 0f a8 09 ...

- Write page 0x01
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 09 01 ff 00 01 ...

*unexpected incoming report of size 4*
i2c_hid i2c-DLL060A:00: input: 20 00 0b 04 05 2f 4f 09 00 00 00 00 00 00 ...
hid-rmi 0018:06CB:2734.0002: no read request pending

* normal process of query f30 *
- Read 2 bytes from register 0x0182
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 0a 00 82 01 02 ...
- Received 2 bytes
i2c_hid i2c-DLL060A:00: input: 20 00 0b 02 28 03 19 19 00 10 e6 0f a8 09 ... 
- Read 2 bytes from register 0x016e
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 0a 00 6e 01 02 ... 
- Received 2 bytes
i2c_hid i2c-DLL060A:00: input: 20 00 0b 02 00 04 19 19 00 10 e6 0f a8 09 ...




While the non-working version assumes the unexpected report to be the answer to the query:

- Read 0x14 from register 0x0045
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 0a 00 45 00 14 ...
- Received 14 bytes
i2c_hid i2c-DLL060A:00: input: 20 00 0b 14 78 00 19 19 00 10 e6 0f a8 09 ...

- Write page 0x01
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 09 01 ff 00 01 ...

* normal process of query f30 *
- Read 2 bytes from register 0x0182
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 0a 00 82 01 02 ...
*unexpected incoming report of size 4* -> wrong answer
i2c_hid i2c-DLL060A:00: input: 20 00 0b 04 05 2f 4f 09 00 00 00 00 00 00 ...

- Read 4 bytes from register 0x016f
i2c_hid i2c-DLL060A:00: __i2c_hid_command: cmd=25 00 17 00 0a 00 6f 01 04 00 ...
- Received 4 bytes
i2c_hid i2c-DLL060A:00: input: 20 00 0b 04 04 00 00 0c 00 10 e6 0f a8 09 ...




I will check with Synaptics to understand why the unexpected report comes here and how we can discard it.

Comment 9 Benjamin Tissoires 2014-04-23 21:54:03 UTC
Created attachment 889103 [details]
0001-HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch

I got the answer from Synaptics, and it is a FW bug. We can go around it quite easily and I attached a patch for it.

I just launched a build, and I would be grateful if you could tell us if this works now.

http://koji.fedoraproject.org/koji/taskinfo?taskID=6771661

Also, the possible side effect would be that the reported maximums for X and Y have been modified. It is very unlikely, but having the evemu-record of the device before the patch and after would help to check if nothing has changed on your device.

Comment 10 Abrahm Scully 2014-04-24 15:58:25 UTC
Created attachment 889344 [details]
evemu-record output with working buttons with 3.14.1-200.bz1090161

Comment 11 Abrahm Scully 2014-04-24 16:34:18 UTC
The touchpad buttons have been detected reliably with the 3.14.1-200.bz1090161.fc20.x86_64 kernel. I have only booted a handful of times.

Comment 12 Benjamin Tissoires 2014-04-24 22:29:42 UTC
I checked on your log and and the reported maximums for X and Y did not changed with the new patch.

Patch sent upstream:
https://patchwork.kernel.org/patch/4055781/

Comment 13 Abrahm Scully 2014-05-02 22:22:08 UTC
Where is the correct place to request that this patch be integrated into the official Fedora kernels that have the backported hid-rmi driver?

I have had no issues with 3.14.1-200.bz1090161.fc20.x86_64, but I'd prefer to run an official Fedora kernel.

Comment 14 Benjamin Tissoires 2014-05-02 22:37:16 UTC
My bad. I sent this and thought I would ping the Fedora kernel maintainers once it will land upstream. Unfortunately, I did not got any reply from the HID maintainer, and I forgot to ask Fedora. I am on it.

Comment 15 Josh Boyer 2014-05-03 02:02:23 UTC
I should have seen this as well.  I'll get to it soon.

Comment 16 Josh Boyer 2014-05-03 13:11:44 UTC
Patch added to Fedora git.  It will be in the next builds on the various releases.

Comment 17 Fedora Update System 2014-05-07 20:53:13 UTC
kernel-3.14.3-200.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/kernel-3.14.3-200.fc20

Comment 18 Fedora Update System 2014-05-08 10:11:20 UTC
Package kernel-3.14.3-200.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.14.3-200.fc20'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6122/kernel-3.14.3-200.fc20
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2014-05-08 17:17:23 UTC
kernel-3.14.3-100.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/kernel-3.14.3-100.fc19

Comment 20 Abrahm Scully 2014-05-09 23:42:05 UTC
This kernel seems to work well.

Comment 21 Fedora Update System 2014-05-10 03:20:01 UTC
kernel-3.14.3-200.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2014-05-13 22:11:36 UTC
kernel-3.14.4-100.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/kernel-3.14.4-100.fc19

Comment 23 Fedora Update System 2014-05-21 23:21:11 UTC
kernel-3.14.4-100.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.