Bug 205745

Summary: i2c_hid i2c-SYNA7DB5:01: failed to reset device.
Product: Drivers Reporter: Giancarlo Razzolini (grazzolini)
Component: I2CAssignee: Drivers/I2C virtual user (drivers-i2c)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alyx, david, efreed09, george.abraham.ro, i.reg, ian.brown9475, jan.steffens, juliocampagnolo, kailash.sudhakar, leon.cyliax, lilydjwg, lorelei.lvnh, memantere, raymond.zhao, Strikingwolf2012, tom.smeding
Priority: P1    
Hardware: All   
OS: Linux   
See Also: https://bugzilla.kernel.org/show_bug.cgi?id=205793
Kernel Version: 5.4.1-arch1-1 Subsystem:
Regression: No Bisected commit-id:
Attachments: pinctrl: sunrisepoint: Add missing Interrupt Status register offset
attachment-2173-0.html

Description Giancarlo Razzolini 2019-12-03 01:01:49 UTC
Hi,

Ever since kernel 5.4 (5.4.1 included), my touchpad does not work anymore.

Here are the relevant dmesg lines:

kernel: i2c_hid i2c-SYNA7DB5:01: i2c-SYNA7DB5:01 supply vdd not found, using dummy regulator
kernel: i2c_hid i2c-SYNA7DB5:01: i2c-SYNA7DB5:01 supply vddl not found, using dummy regulator
kernel: i2c_hid i2c-SYNA7DB5:01: failed to reset device.
kernel: i2c_hid i2c-SYNA7DB5:01: can't add hid device: -61
kernel: i2c_hid: probe of i2c-SYNA7DB5:01 failed with error -61

This is my device, as reported by libinput list-devices:

Device:           SYNA7DB5:01 06CB:7DB7 Touchpad
Kernel:           /dev/input/event10
Group:            9
Seat:             seat0, default
Size:             103x75mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    *button-areas clickfinger 
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a


Downgrading to 5.3.13-arch1 solves the issue. It looks like a few i2c_hid power management changes were introduced with 5.4 that broke this. I tried to bisect the exact issue, but due to time constraints, I was not able to complete it. Please, let me know if this will be necessary, so I can prepare.
Comment 1 Sinan Tan 2019-12-03 15:15:21 UTC
Similar issue here, the only difference is that my message is
"i2c-ETD0651:00: failed to reset device."
Comment 2 Giancarlo Razzolini 2019-12-03 18:17:17 UTC
@Sinan,

Do you also get the error -61? Just make sure the messages are the same.
Comment 3 Kailash 2019-12-05 13:26:07 UTC
I have this same issue.

Dec 05 16:40:39 Kailash-PC kernel: i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vdd not found, using dummy regulator
Dec 05 16:40:39 Kailash-PC kernel: i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vddl not found, using dummy regulator
Dec 05 16:40:45 Kailash-PC kernel: i2c_hid i2c-ELAN1010:00: failed to reset device.
Dec 05 16:40:51 Kailash-PC kernel: i2c_hid i2c-ELAN1010:00: failed to reset device.
Dec 05 16:40:57 Kailash-PC kernel: i2c_hid i2c-ELAN1010:00: failed to reset device.
Dec 05 16:41:03 Kailash-PC kernel: i2c_hid i2c-ELAN1010:00: failed to reset device.
Dec 05 16:41:04 Kailash-PC kernel: i2c_hid i2c-ELAN1010:00: can't add hid device: -61
Dec 05 16:41:04 Kailash-PC kernel: i2c_hid: probe of i2c-ELAN1010:00 failed with error -61
Comment 4 Sinan Tan 2019-12-05 15:20:47 UTC
@Giancarlo
Yes.
Comment 5 Sinan Tan 2019-12-07 01:54:23 UTC
This issue is still not fixed for kernel 5.4.2 (5.4.2-arch1-1).
Comment 6 Giancarlo Razzolini 2019-12-09 01:23:11 UTC
I can confirm the issue is still present on 5.4.2. I'm working on a patch alongside the lines of: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-5.4/upstream-fixes&id=fd70466d37bf3fe0118d18c56ddde85b428f86cf

To see if it helps with my own SYN device. Let's see.
Comment 7 Julio Cesar Neves Campagnolo 2019-12-11 00:11:46 UTC
Same problem here.

[    3.022387] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vdd not found, using dummy regulator
[    3.022433] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vddl not found, using dummy regulator
[    8.136661] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   14.323462] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   20.510108] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   26.696594] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   27.710002] i2c_hid i2c-ELAN1010:00: can't add hid device: -61
[   27.710402] i2c_hid: probe of i2c-ELAN1010:00 failed with error -61

Same bug of #205793
Comment 8 Giancarlo Razzolini 2019-12-11 00:28:27 UTC
Indeed, it looks like bug 205793 is a duplicate/related to this one.
Comment 9 George 2019-12-14 14:42:23 UTC
ELAN touchpad still not working on Dell 7559 laptop, with kernel 5.4.3.
Touchpad works wine with kernel 4.19.89.

[    0.000000] Linux version 5.4.3-arch1-1 (linux@archlinux) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Fri, 13 Dec 2019 09:39:02 +0000
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=6f1cd6b8-885a-461c-9ff7-a1122ee30c5d rw loglevel=3 quiet mitigations=off selinux=0 "acpi_osi=!Windows 2015"
[    0.000000] DMI: Dell Inc. Inspiron 7559/0H0CC0, BIOS 1.2.7 12/13/2017

[    2.639095] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vdd not found, using dummy regulator
[    2.639105] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vddl not found, using dummy regulator
[    3.279478] psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x4d5f02)
[    3.291333] psmouse serio1: elantech: Synaptics capabilities query result 0x00, 0x15, 0x10.
[    3.303089] psmouse serio1: elantech: Elan sample query result 0c, 02, 75
[    3.365526] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input8
[    7.742335] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   13.929048] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   14.947127] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Comment 10 George 2019-12-14 14:48:45 UTC
More logs
[   26.302499] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   27.315795] i2c_hid i2c-ELAN1010:00: can't add hid device: -61
[   27.316206] i2c_hid: probe of i2c-ELAN1010:00 failed with error -61
Comment 11 Lorelei Penn 2019-12-19 20:14:05 UTC
Tried again with kernel linux-zen 5.4.4 and it is still not working. Same errors as before.
Comment 12 Giancarlo Razzolini 2019-12-19 20:18:44 UTC
It is still not working on kernel 5.4.5. I did not see any I2C patches for this yet. I'm not even sure this bug report is triaged yet.
Comment 13 Sinan Tan 2019-12-22 08:57:19 UTC
I tried to build the i2c_hid driver out of the source tree with the drivers/hid/i2c-hid/i2c-hid-core.c provided by kernel v5.3, however the bug is not fixed. Yet this is almost the only change for kernel v5.4. (See https://github.com/torvalds/linux/commits/v5.4/drivers/hid/i2c-hid)

I'm not sure if I'm doing every step properly... Anyone else tried this?
Comment 14 Sinan Tan 2019-12-22 09:08:15 UTC
If I'm building the i2c_hid module in the right way...Then it's not likely to be a bug with the i2c_hid module. Maybe the i2c module?
Comment 15 Giancarlo Razzolini 2019-12-23 01:07:51 UTC
Have you tried instead just adding a quirk for your device like here?:

https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-5.4/upstream-fixes&id=fd70466d37bf3fe0118d18c56ddde85b428f86cf
Comment 16 Julio Cesar Neves Campagnolo 2019-12-23 20:32:16 UTC
Just to update: still not working on 5.4.6

[julio@Dell7995 ~]$ uname -a
Linux Dell7995 5.4.6-arch1-1 #1 SMP PREEMPT Sat, 21 Dec 2019 16:34:41 +0000 x86_64 GNU/Linux
[julio@Dell7995 ~]$ sudo dmesg | grep i2c
[    3.003816] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vdd not found, using dummy regulator
[    3.003829] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vddl not found, using dummy regulator
[    8.140147] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   14.326952] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   20.513509] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   26.700196] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   27.713619] i2c_hid i2c-ELAN1010:00: can't add hid device: -61
[   27.717089] i2c_hid: probe of i2c-ELAN1010:00 failed with error -61
Comment 17 Giancarlo Razzolini 2019-12-23 20:34:56 UTC
Given this bug was not triaged nor picked up, no surprise there. I have tried using the quirks for my touchpad with no success. I think more needs to be done there.
Comment 18 Tom Smeding 2019-12-24 21:09:36 UTC
This also happens for me on 5.4.6, first seen in 5.4.1. Last good that I know of is 5.3.11, but there may definitely be a later kernel that works fine.

'xinput list' does not list my touchpad, while on 5.3.11 it lists 'ELAN0511:01 04F3:303F Touchpad', which seems to work.

On 5.4.6, I set the 'debug' flag of the i2c_hid module to true using 'options i2c_hid debug=1' in /etc/modprobe.d/i2c_hid.conf, and got the following logs after boot:

    $ dmesg | grep -i i2c
    [    0.168256] DMAR: ANDD device: 1 name: \_SB.PCI0.I2C0
    [    0.168256] DMAR: ANDD device: 2 name: \_SB.PCI0.I2C1
    [    3.131341] i2c_hid i2c-ELAN0511:01: i2c-ELAN0511:01 supply vdd not found, using dummy regulator
    [    3.131350] i2c_hid i2c-ELAN0511:01: i2c-ELAN0511:01 supply vddl not found, using dummy regulator
    [    3.131558] i2c_hid i2c-ELAN0511:01: Fetching the HID descriptor
    [    3.131559] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=01 00
    [    3.132676] i2c_hid i2c-ELAN0511:01: HID Descriptor: 1e 00 00 01 71 01 02 00 03 00 0e 00 04 00 00 00 05 00 06 00 f3 04 3f 30 02 00 00 00 00 00
    [    3.132750] i2c_hid i2c-ELAN0511:01: entering i2c_hid_parse
    [    3.132751] i2c_hid i2c-ELAN0511:01: i2c_hid_hwreset
    [    3.132752] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [    3.132753] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 08
    [    3.134965] i2c_hid i2c-ELAN0511:01: resetting...
    [    3.134966] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 01
    [    3.135232] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: waiting...
    [    8.324993] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: finished.
    [    8.324998] i2c_hid i2c-ELAN0511:01: failed to reset device.
    [    8.325042] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [    8.325043] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 01 08
    [    9.338301] i2c_hid i2c-ELAN0511:01: i2c_hid_hwreset
    [    9.338305] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [    9.338306] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 08
    [    9.341636] i2c_hid i2c-ELAN0511:01: resetting...
    [    9.341637] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 01
    [    9.341946] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: waiting...
    [   14.512051] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: finished.
    [   14.512056] i2c_hid i2c-ELAN0511:01: failed to reset device.
    [   14.512142] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [   14.512146] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 01 08
    [   15.525389] i2c_hid i2c-ELAN0511:01: i2c_hid_hwreset
    [   15.525394] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [   15.525399] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 08
    [   15.528727] i2c_hid i2c-ELAN0511:01: resetting...
    [   15.528734] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 01
    [   15.529055] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: waiting...
    [   20.698725] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: finished.
    [   20.698730] i2c_hid i2c-ELAN0511:01: failed to reset device.
    [   20.702172] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [   20.702178] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 01 08
    [   21.712065] i2c_hid i2c-ELAN0511:01: i2c_hid_hwreset
    [   21.712070] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [   21.712075] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 08
    [   21.715379] i2c_hid i2c-ELAN0511:01: resetting...
    [   21.715387] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 00 01
    [   21.715690] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: waiting...
    [   26.885389] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: finished.
    [   26.885395] i2c_hid i2c-ELAN0511:01: failed to reset device.
    [   26.888895] i2c_hid i2c-ELAN0511:01: i2c_hid_set_power
    [   26.888901] i2c_hid i2c-ELAN0511:01: __i2c_hid_command: cmd=05 00 01 08
    [   27.898903] i2c_hid i2c-ELAN0511:01: can't add hid device: -61
    [   27.901746] i2c_hid: probe of i2c-ELAN0511:01 failed with error -61

It seems like this is the same issue as has been reported above in this bug. I hope this can be of help.
Comment 19 Lorelei Penn 2019-12-25 01:25:13 UTC
For me using `options i2c_hid debug=1` as tom.smeding@gmail.com mentioned, I get a very similar output of `dmesg`:

[   10.355174] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vdd not found, using dummy regulator
[   10.355204] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vddl not found, using dummy regulator
[   10.355409] i2c_hid i2c-ELAN1010:00: Fetching the HID descriptor
[   10.355413] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=01 00
[   10.356553] i2c_hid i2c-ELAN1010:00: HID Descriptor: 1e 00 00 01 71 01 02 00 03 00 0e 00 04 00 00 00 05 00 06 00 f3 04 12 30 02 00 00 00 00 00
[   10.356695] i2c_hid i2c-ELAN1010:00: entering i2c_hid_parse
[   10.356699] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[   10.356702] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   10.356705] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[   10.360963] i2c_hid i2c-ELAN1010:00: resetting...
[   10.360966] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[   10.361242] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[   15.592992] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[   15.592994] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   15.592995] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   15.593014] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[   16.617013] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[   16.617015] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   16.617016] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[   16.622299] i2c_hid i2c-ELAN1010:00: resetting...
[   16.622301] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[   16.622661] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[   21.736967] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[   21.736971] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   21.736975] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   21.736978] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[   22.761082] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[   22.761090] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   22.761091] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[   22.766432] i2c_hid i2c-ELAN1010:00: resetting...
[   22.766434] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[   22.766659] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[   27.880967] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[   27.880969] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   27.880970] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   27.880971] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[   28.905053] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[   28.905055] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   28.905056] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[   28.909977] i2c_hid i2c-ELAN1010:00: resetting...
[   28.909979] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[   28.910310] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[   34.024998] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[   34.025016] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   34.025018] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   34.025019] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[   35.048967] i2c_hid i2c-ELAN1010:00: can't add hid device: -61
[   35.049201] i2c_hid: probe of i2c-ELAN1010:00 failed with error -61

The only differences are the enumeration of the elan device (1010:00 for me), and `HID Descriptor: 1e 00 00 01 71 01 02 00 03 00 0e 00 04 00 00 00 05 00 06 00 f3 04 12 30 02 00 00 00 00 00`.
Comment 20 Julio Cesar Neves Campagnolo 2019-12-25 11:36:57 UTC
Exactly the same here with debug flag enabled.

[    2.730916] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vdd not found, using dummy regulator
[    2.730933] i2c_hid i2c-ELAN1010:00: i2c-ELAN1010:00 supply vddl not found, using dummy regulator
[    2.731191] i2c_hid i2c-ELAN1010:00: Fetching the HID descriptor
[    2.731193] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=01 00
[    2.732292] i2c_hid i2c-ELAN1010:00: HID Descriptor: 1e 00 00 01 71 01 02 00 03 00 0e 00 04 00 00 00 05 00 06 00 f3 04 12 30 02 00 00 00 00 00
[    2.733577] i2c_hid i2c-ELAN1010:00: entering i2c_hid_parse
[    2.733585] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[    2.733587] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[    2.733588] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[    2.737238] i2c_hid i2c-ELAN1010:00: resetting...
[    2.737242] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[    2.737471] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[    7.923965] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[    7.923967] i2c_hid i2c-ELAN1010:00: failed to reset device.
[    7.923967] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[    7.923969] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[    8.937297] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[    8.937299] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[    8.937313] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[    8.940625] i2c_hid i2c-ELAN1010:00: resetting...
[    8.940626] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[    8.940918] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[   14.110635] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[   14.110642] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   14.110646] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   14.110649] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[   15.124092] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[   15.124097] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   15.124101] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[   15.127410] i2c_hid i2c-ELAN1010:00: resetting...
[   15.127416] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[   15.127771] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[   20.297326] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[   20.297331] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   20.297334] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   20.297338] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[   21.310623] i2c_hid i2c-ELAN1010:00: i2c_hid_hwreset
[   21.310625] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   21.310626] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 08
[   21.313936] i2c_hid i2c-ELAN1010:00: resetting...
[   21.313938] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 00 01
[   21.314134] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: waiting...
[   26.483938] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: finished.
[   26.483940] i2c_hid i2c-ELAN1010:00: failed to reset device.
[   26.483941] i2c_hid i2c-ELAN1010:00: i2c_hid_set_power
[   26.483943] i2c_hid i2c-ELAN1010:00: __i2c_hid_command: cmd=05 00 01 08
[   27.497335] i2c_hid i2c-ELAN1010:00: can't add hid device: -61
[   27.500858] i2c_hid: probe of i2c-ELAN1010:00 failed with error -61
Comment 21 leon.cyliax 2019-12-25 12:22:08 UTC
Same issue here, still broken in 5.4.6-arch3-1
Comment 22 Julio Cesar Neves Campagnolo 2019-12-28 11:37:55 UTC
Searching the kernel mailing lists, this bug looks very close to one reported for kernel 4.8 in 2016! https://www.spinics.net/lists/linux-input/msg46728.html
Comment 23 Eric Freed 2019-12-30 04:04:57 UTC
Julio Cesar Neves Campagnolo may be correct in being related, as I also had issues with the same touchpad during that era, though it had resolved itself shortly after with an update (was around the time I first installed Arch on that machine).
Comment 24 Sinan Tan 2019-12-31 15:27:11 UTC
I think we might have reported the bug to a wrong place. Actually this bug might be introduced by the Intel GPIO driver. I executed the command `cat /proc/interrupts` on my laptop with kernel 5.3:
$ cat /proc/interrupts 
            CPU0       CPU1       CPU2       CPU3       
   0:          6          0          0          0  IR-IO-APIC    2-edge      timer
   1:          0          0       1638          0  IR-IO-APIC    1-edge      i8042
   8:          0          0          0          1  IR-IO-APIC    8-edge      rtc0
   9:          0        185          0          0  IR-IO-APIC    9-fasteoi   acpi
  14:          0          0      35379          0  IR-IO-APIC   14-fasteoi   INT345D:00
  16:          0     442602          0          0  IR-IO-APIC   16-fasteoi   idma64.0, i2c_designware.0, i801_smbus
  17:          0          0          0          0  IR-IO-APIC   17-fasteoi   idma64.1, i2c_designware.1

When I move my touchpad, those numbers on INT14 AND INT16 will increase, indicating that the touchpad need 2 interrupts to properly function. I have no idea what exactly the INT14 is, but when I upgraded to linux-mainline 5.5-rc4 (where the bug is still not resolved), I found that INT14 is disabled due to problems in Intel GPIO module.
Comment 25 Sinan Tan 2019-12-31 15:32:36 UTC
Here's the complete error log on my laptop:
Dec 31 22:55:40 kernel: irq 14: nobody cared (try booting with the "irqpoll" option)
Dec 31 22:55:40 kernel: CPU: 2 PID: 0 Comm: swapper/2 Tainted: G           OE     5.5.0-rc4-1-mainline #1
Dec 31 22:55:40 kernel: Call Trace:
Dec 31 22:55:40 kernel:  <IRQ>
Dec 31 22:55:40 kernel:  dump_stack+0x66/0x90
Dec 31 22:55:40 kernel:  __report_bad_irq+0x35/0xaa
Dec 31 22:55:40 kernel:  note_interrupt.cold+0xb/0x69
Dec 31 22:55:40 kernel:  handle_irq_event_percpu+0x6f/0x80
Dec 31 22:55:40 kernel:  handle_irq_event+0x37/0x54
Dec 31 22:55:40 kernel:  handle_fasteoi_irq+0xb5/0x160
Dec 31 22:55:40 kernel:  do_IRQ+0x84/0x140
Dec 31 22:55:40 kernel:  common_interrupt+0xf/0xf
Dec 31 22:55:40 kernel:  </IRQ>
Dec 31 22:55:40 kernel: RIP: 0010:cpuidle_enter_state+0xc9/0x410
Dec 31 22:55:40 kernel: Code: e8 5c 7f 98 ff 80 7c 24 0f 00 74 17 9c 58 0f 1f 44 00 00 f6 c4 02 0f 85 1c 03 00 00 31 ff e8 8e e9 9e ff fb 66 0f 1f 44 00 00 <45> 85 ed 0f 88 72 02 00 00 49 63 d5 4c 2b 64 24 10 48 8d 04 52 48
Dec 31 22:55:40 kernel: RSP: 0018:ffffaa0b80113e68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffde
Dec 31 22:55:40 kernel: RAX: ffff99f40b700000 RBX: ffff99f40b737530 RCX: 000000000000001f
Dec 31 22:55:40 kernel: RDX: 0000000000000000 RSI: 0000000033483483 RDI: 0000000000000000
Dec 31 22:55:40 kernel: RBP: ffffffffa8ebe5e0 R08: 00000003576f36c2 R09: 00000003ae2c9c92
Dec 31 22:55:40 kernel: R10: 0000000000000008 R11: ffff99f40b72bbe4 R12: 00000003576f36c2
Dec 31 22:55:40 kernel: R13: 0000000000000008 R14: 0000000000000008 R15: ffff99f407ae1ec0
Dec 31 22:55:40 kernel:  ? cpuidle_enter_state+0xa4/0x410
Dec 31 22:55:40 kernel:  cpuidle_enter+0x29/0x40
Dec 31 22:55:40 kernel:  do_idle+0x1e6/0x270
Dec 31 22:55:40 kernel:  cpu_startup_entry+0x19/0x20
Dec 31 22:55:40 kernel:  start_secondary+0x186/0x1d0
Dec 31 22:55:40 kernel:  secondary_startup_64+0xb6/0xc0
Dec 31 22:55:40 kernel: handlers:
Dec 31 22:55:40 kernel: [<0000000044c92f26>] intel_gpio_irq
Dec 31 22:55:40 kernel: Disabling IRQ #14
Dec 31 22:55:40 kernel: i2c_hid i2c-ETD0651:00: failed to reset device.
Dec 31 22:55:40 systemd[1]: NetworkManager-dispatcher.service: Succeeded.
Dec 31 22:55:46 kernel: i2c_hid i2c-ETD0651:00: failed to reset device.
Dec 31 22:55:52 kernel: i2c_hid i2c-ETD0651:00: failed to reset device.
Dec 31 22:55:53 kernel: i2c_hid i2c-ETD0651:00: can't add hid device: -61
Dec 31 22:55:53 kernel: i2c_hid: probe of i2c-ETD0651:00 failed with error -61
Comment 26 Giancarlo Razzolini 2019-12-31 15:35:57 UTC
@Sinan

I have just rebooted into 5.4.6 and you're right. I don't see the interrupted used by my touchpad. Do you know the number of the GPIO bug, so I can add it to the See Also? And perhaps we should also report it there, that this is affecting touchpads as well.
Comment 27 Sinan Tan 2019-12-31 15:42:39 UTC
Not being a hardware developer, I don't really understand the relationship between i2c driver and intel GPIO, but seems some issues with the intel GPIO driver caused the kernel to strace the call stack, and disabled IRQ14, I highly suspect this is the cause of the bug.

@Razzolini
There is a quite similar bug report, with kernel 4.19
https://bugzilla.kernel.org/show_bug.cgi?id=201817

It's amd_gpio, affecting IRQ #7
Comment 28 Sinan Tan 2019-12-31 15:44:56 UTC
I haven't found any related existing bug reports with Intel GPIO though...
Comment 29 Sinan Tan 2019-12-31 15:58:46 UTC
https://github.com/torvalds/linux/commits/v5.4/drivers/pinctrl/intel

Indeed here are a bunch of changes from v5.3 to v5.4, involving "GPIO". Maybe first we can try to revert those changes.
Comment 30 Boyan Ding 2020-01-01 21:00:34 UTC
Created attachment 286563 [details]
pinctrl: sunrisepoint: Add missing Interrupt Status register offset

Turns out that the problem is indeed in intel's pinctrl driver. Here is the patch and it solves the problem on my machine. I have sent it to maintainers and I hope that it can get through soon.
Comment 31 Lorelei Penn 2020-01-01 21:07:23 UTC
(In reply to Boyan Ding from comment #30)
> Created attachment 286563 [details]
> pinctrl: sunrisepoint: Add missing Interrupt Status register offset
> 
> Turns out that the problem is indeed in intel's pinctrl driver. Here is the
> patch and it solves the problem on my machine. I have sent it to maintainers
> and I hope that it can get through soon.

That sounds so great. Thank you so much for taking your time into solving this issue. Let us hope the patch gets through soon. =)
Comment 32 Sinan Tan 2020-01-02 06:30:13 UTC
(In reply to Boyan Ding from comment #30)
> Created attachment 286563 [details]
> pinctrl: sunrisepoint: Add missing Interrupt Status register offset
> 
> Turns out that the problem is indeed in intel's pinctrl driver. Here is the
> patch and it solves the problem on my machine. I have sent it to maintainers
> and I hope that it can get through soon.

It works on my laptop! Really appreciate your work~
Hope it can be accepted into mainline kernel ASAP.
Comment 33 Giancarlo Razzolini 2020-01-03 00:52:27 UTC
@Sinan @Boyan

This patch seems to work for me too. I'm going to see I can get this patch applied on the Arch Linux kernel until it is (hopefully) applied to the kernel.
Comment 34 Boyan Ding 2020-01-03 02:42:19 UTC
(In reply to Giancarlo Razzolini from comment #33)
> @Sinan @Boyan
> 
> This patch seems to work for me too. I'm going to see I can get this patch
> applied on the Arch Linux kernel until it is (hopefully) applied to the
> kernel.

It would be great if this can be applied on Arch kernel, that will save me (and other affected Arch users) a lot of trouble. The review is in progress but I guess it might still take some time until it enters mainline, probably even more to reach stable 5.4 series, even though the patch is essentially a simple one-liner.
Comment 35 Lorelei Penn 2020-01-03 15:09:42 UTC
The patch is working for me as well. Just adding that 1 line made the trick. I patched a linux-zen-git kernel on Arch Linux.

Hope the patch arrives Arch Linux kernel and/or Linux Zen soon. Thank you for your help. =)
Comment 36 Julio Cesar Neves Campagnolo 2020-01-04 18:27:47 UTC
Patch confirmed working here.
Comment 37 Giancarlo Razzolini 2020-01-05 03:47:44 UTC
This patch is applied on Arch Linux kernel version 5.4.8.
Comment 38 Tom Smeding 2020-01-05 15:19:56 UTC
Can confirm that the Arch Linux kernel 5.4.8-arch1-1 (which is in the repositories since today) works for me. Thanks for the very quick turnaround!
Comment 39 George 2020-01-05 15:37:41 UTC
Created attachment 286637 [details]
attachment-2173-0.html

Was this patch merged in the mainline kernel as well?
It works on patched Arch kernel, but does this work on 5.4.8 from other
distros?

George ABRAHAM


On Sun, 5 Jan 2020 at 03:47, <bugzilla-daemon@bugzilla.kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=205745
>
> --- Comment #37 from Giancarlo Razzolini (grazzolini@archlinux.org) ---
> This patch is applied on Arch Linux kernel version 5.4.8.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 40 George 2020-01-05 16:02:27 UTC
The link for the proposed kernel patch is here
https://patchwork.ozlabs.org/patch/1216997/
Comment 41 Eric Freed 2020-01-05 21:54:53 UTC
Can also confirm that the 5.4.8 kernel fixes this on my Arch Linux system. A huge "thank you" to all involved who got this fixed so quickly.
Comment 42 Alyx 2020-01-06 11:52:40 UTC
Can confirm this patch fixed the problem on my end too!
Comment 43 George 2020-01-23 15:05:59 UTC
Can anyone confirm kernel 5.4.x is fixed upstream, in other distributions (Debian, Fedora, Ubuntu)?
Comment 44 Boyan Ding 2020-01-28 00:41:03 UTC
(In reply to George from comment #43)
> Can anyone confirm kernel 5.4.x is fixed upstream, in other distributions
> (Debian, Fedora, Ubuntu)?

The fix was just mainlined in the 5.5 release, and has been in the stable queue. It should appear in the next 5.4 series release.
Comment 45 Giancarlo Razzolini 2020-02-05 18:31:32 UTC
I guess it's safe to close this bug now. It has been merged to 5.5 and it's on backports to 5.4, which is the new LTS.
Comment 46 Wolfram Sang 2020-03-22 11:53:38 UTC
*** Bug 205793 has been marked as a duplicate of this bug. ***