Bug 219101

Summary: Lenovo touchpad intermittently stops working with i2c_designware errors
Product: Drivers Reporter: Josh Rosenberg (launchpad)
Component: I2CAssignee: Drivers/I2C virtual user (drivers-i2c)
Status: RESOLVED UNREPRODUCIBLE    
Severity: normal CC: beamflash, i, mario.limonciello, patrakov
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Josh Rosenberg 2024-07-28 04:25:49 UTC
Hi. When using my Yoga 6 13ALC6 laptop, I frequently experience the touchpad suddenly cease working. Sometimes there's a few seconds' warning with reduced responsiveness, and sometimes it's completely sudden. I reported this to Ubuntu, and they instructed me to report it upstream here.

Output from kern.log when it happens often looks like this:

2024-07-09T21:31:51.573862-04:00 machinename kernel: i2c_designware AMDI0010:00: controller timed out
2024-07-09T21:31:51.577113-04:00 machinename kernel: i2c_designware AMDI0010:00: timeout in disabling adapter
2024-07-09T21:31:51.596828-04:00 machinename kernel: i2c_designware AMDI0010:00: timeout waiting for bus ready
2024-07-09T21:32:45.928870-04:00 machinename kernel: message repeated 2652 times: [ i2c_designware AMDI0010:00: timeout waiting for bus ready]

The only workaround I've found is to sleep/hibernate or shut down the laptop; it always works again on reboot.

You can see dmesg output and other relevant logs and information in the original Ubuntu bug at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2072612 .
Comment 1 Mario Limonciello (AMD) 2024-08-21 17:39:06 UTC
This is most likely to be a BIOS bug.  Is your BIOS up to date?
Comment 2 Josh Rosenberg 2024-08-21 17:52:59 UTC
(In reply to Mario Limonciello (AMD) from comment #1)
> This is most likely to be a BIOS bug.  Is your BIOS up to date?

Yes, it is. From DMI:

dmi.bios.date: 03/26/2024
dmi.bios.release: 1.22
dmi.bios.vendor: LENOVO
dmi.bios.version: H6CN22WW(V1.15)

Per https://support.lenovo.com/us/en/downloads/ds549424-bios-update-for-windows-10-64-bit-yoga-6-13alc6 , H6CN22WW is the most recent version, released April 16 of this year. (I don't know why that date is later than the one reported by DMI.)
Comment 3 Mario Limonciello (AMD) 2024-08-21 17:57:32 UTC
What AGESA version is it?  "# dmidecode | grep AGESA"
Comment 4 Josh Rosenberg 2024-08-21 18:14:45 UTC
(In reply to Mario Limonciello (AMD) from comment #3)
> What AGESA version is it?  "# dmidecode | grep AGESA"

That string doesn't appear in my dmidecode output. I also didn't see anything called AGESA when I booted into UEFI and looked around.
Comment 5 Mario Limonciello (AMD) 2024-08-21 18:25:44 UTC
Ah too bad; then I guess Lenovo isn't exporting it on this system (most OEMs do).

In any case, this timeout is something that comes from the hardware.  The method that is timing out did have a rework recently (commit 197ecadad8428 ("i2c: designware: Implement generic polling mode code for Wangxun 10Gb NIC")) but I don't think it's likely to change your scenario.

I use I2C touchpads all the time on AMD systems both reference and OEM systems.
This hasn't happened to me, but this to me looks like a BIOS issue, and I think you should raise it with Lenovo.
Comment 6 Erina Hoshikawa 2024-11-11 17:55:56 UTC
I am also experiencing the same issue on my Thinkbook 14p G2 ACH laptop. I also have my touchpad first become somewhat unresponsive for a few seconds and then completely lost input. Running `rmmod i2c_hid_acpi i2c_hid` before suspend, and running `modprobe i2c_hid_acpi` after resume usually resolves the issue.

My dmesg of a touchpad failure looks like this:
```
[20963.423965] i2c_hid_acpi i2c-ELAN06FA:00: i2c_hid_get_input: incomplete report (14/65280)
[21054.169840] i2c_hid_acpi i2c-ELAN06FA:00: i2c_hid_get_input: incomplete report (14/65280)
[21075.908772] i2c_designware AMDI0010:03: controller timed out
[21075.912734] i2c_designware AMDI0010:03: timeout in disabling adapter
[21075.933075] i2c_designware AMDI0010:03: timeout waiting for bus ready
[21075.953175] i2c_designware AMDI0010:03: timeout waiting for bus ready
[21075.973515] i2c_designware AMDI0010:03: timeout waiting for bus ready
[21075.993702] i2c_designware AMDI0010:03: timeout waiting for bus ready
[21076.013951] i2c_designware AMDI0010:03: timeout waiting for bus ready
```
My BIOS version is GWCN47WW (up to date, released on 2024/04/01), and my `amd_pmc` firmware version is 64.72.0 (hope this can help find the corresponding AGESA version). Kernel is `6.11.5-300.fc41.x86_64`.
Comment 7 Alexander Patrakov 2024-11-17 14:17:36 UTC
Same issue on Dell Inspiron 7415 2-in-1. I have already upgraded the BIOS to 1.24.0.
Comment 8 Andrei Gaponenko 2024-11-25 21:47:20 UTC
Hi,

Here is another system with a similar problem: the touchpad randomly stops responding.  This is Dell Precision 5470.  I saw the issue with the 6.11 kernel series and BIOS 1.24. Now it is updated to

Dell Inc. Precision 5470/02RK6V, BIOS 1.26.0 09/12/2024

and Linux 6.12.1-1.el9.elrepo.x86_64, and the touchpad just broke again.

Some "designware" excerpts from dmesg

[    6.415270] input: WACF3233:00 056A:49BB Touchscreen as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-34/i2c-WACF3233:00/0018:056A:49BB.0004/input/input11
[    6.415443] input: WACF3233:00 056A:49BB as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-34/i2c-WACF3233:00/0018:056A:49BB.0004/input/input12
[    6.415467] input: WACF3233:00 056A:49BB Stylus as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-34/i2c-WACF3233:00/0018:056A:49BB.0004/input/input13
[    6.415505] input: WACF3233:00 056A:49BB as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-34/i2c-WACF3233:00/0018:056A:49BB.0004/input/input14
[    6.415537] input: WACF3233:00 056A:49BB Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-34/i2c-WACF3233:00/0018:056A:49BB.0004/input/input15
[    6.415584] hid-generic 0018:056A:49BB.0004: input,hidraw3: I2C HID v1.00 Mouse [WACF3233:00 056A:49BB] on i2c-WACF3233:00

.....

[    6.694777] input: VEN_0488:00 0488:1031 Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-35/i2c-VEN_0488:00/0018:0488:1031.0006/input/input16
[    6.694846] input: VEN_0488:00 0488:1031 Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-35/i2c-VEN_0488:00/0018:0488:1031.0006/input/input17
[    6.694904] hid-generic 0018:0488:1031.0006: input,hidraw5: I2C HID v1.00 Mouse [VEN_0488:00 0488:1031] on i2c-VEN_0488:00

...

[    6.825371] input: VEN_0488:00 0488:1031 Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-35/i2c-VEN_0488:00/0018:0488:1031.0006/input/input19

...

[    6.945810] input: VEN_0488:00 0488:1031 Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-35/i2c-VEN_0488:00/0018:0488:1031.0006/input/input20


And then

[66224.384540] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration
[66225.419130] i2c_designware i2c_designware.1: controller timed out


I see that this bug is in the NEEDINFO status.  What information would be useful to add?  There is a question in the thread above about AGESA version, but I don't see the AGESA string in the dmidecode output on my system.

Andrei
Comment 9 Mario Limonciello (AMD) 2024-12-04 19:14:56 UTC
> Dell Precision 5470

Isn't this an Intel platform?

> There is a question in the thread above about AGESA version, but I don't see
> the AGESA string in the dmidecode output on my system.

If it's an Intel system showing similar symptom then it shows this might not be an AMD specific issue.

> I see that this bug is in the NEEDINFO status.
> What information would be useful to add?  

I guess anything that could be a hint to others to help avoid the issue.  If you find that disabling cores, adjusting knobs in the BIOS, etc.
Comment 10 Josh Rosenberg 2024-12-04 19:24:01 UTC
Update: My original issue was likely faulty hardware. I replaced the trackpad and haven't been able to reproduce the problem since. (Though I won't feel totally confident for a few more weeks.) Thanks to all who looked into the kernel side of potential causes!
Comment 11 Mario Limonciello (AMD) 2024-12-04 19:25:00 UTC
Glad to hear, thanks for coming back.
Comment 12 Andrei Gaponenko 2024-12-04 19:47:43 UTC
(In reply to Mario Limonciello (AMD) from comment #9)
> > Dell Precision 5470
> 
> Isn't this an Intel platform?

Yes