Bug 217493 - Touchpad not working on Asus TUF617XS / FA617XS
Summary: Touchpad not working on Asus TUF617XS / FA617XS
Status: RESOLVED DUPLICATE of bug 217336
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-27 12:35 UTC by drich
Modified: 2023-06-02 04:09 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (100.47 KB, text/plain)
2023-05-27 12:35 UTC, drich
Details
inxi -SMa (529 bytes, text/plain)
2023-05-27 12:36 UTC, drich
Details
acpidump summary (3.36 KB, text/plain)
2023-05-27 17:20 UTC, drich
Details
acpidump binaries (112.47 KB, application/zip)
2023-05-27 17:20 UTC, drich
Details

Description drich 2023-05-27 12:35:03 UTC
Created attachment 304333 [details]
dmesg

Hello,

Both keyboard and touchpad did not work when I first booted Linux on this new laptop, keyboard was fixed using this patch https://lore.kernel.org/linux-acpi/20230518183920.93472-1-mario.limonciello@amd.com/ (see also https://bugzilla.kernel.org/show_bug.cgi?id=217336).

But this patch left touchpad undetected, I actually don't know if it's connected to a PCI, internal USB, I2C or other bus. dmesg does not help much as it says nothing about any input device expect keyboard / audio / hardware switches.

Seeing other people dmesgs the touchpad should be reported by `/sys/devices/platform/AMDI0010:**/i2c-*/i2c-ASUP1205:00`, but I don't have any "ASUP" in devices tree, I would suspect a bad reporting from ACPI.
Comment 1 drich 2023-05-27 12:36:00 UTC
Created attachment 304334 [details]
inxi -SMa
Comment 2 Mario Limonciello (AMD) 2023-05-27 14:39:55 UTC
Does your kernel config have CONFIG_I2C_HID_ACPI and CONFIG_PINCTRL_AMD set?
Comment 3 drich 2023-05-27 16:50:36 UTC
Well I was so dumb not to look for this kind of config.

CONFIG_I2C_HID_ACPI was indeed missing (why is it disabled by default on Debian's kernel config ?) and makes the touchpad correctly detected by the kernel... but breaks the keyboard : pressing any key takes several seconds to show the character on screen and sometimes repeat it dozens of time. Seems like the press/release events are sent with lag / not sent at all. This also affects hotkeys (which happen to use a different bus, as they were working since the very beginning with default config and no kernel patches applied).

Seems like i8042.nomux=1 solves this, don't know why.

Another problem : after enabling CONFIG_I2C_HID and CONFIG_I2C_HID_ACPI the touchpad did work only once, after reboot it doesn't work anymore and dmesg shows the following :

[   11.766106] i2c_hid_acpi i2c-ITE5570:00: failed to reset device: -61
[   11.766146] i2c_hid_acpi i2c-ASUF1204:00: failed to reset device: -61
[   17.908913] i2c_hid_acpi i2c-ITE5570:00: failed to reset device: -61
[   17.908913] i2c_hid_acpi i2c-ASUF1204:00: failed to reset device: -61
[   24.052910] i2c_hid_acpi i2c-ASUF1204:00: failed to reset device: -61
[   24.052910] i2c_hid_acpi i2c-ITE5570:00: failed to reset device: -61
[   30.196913] i2c_hid_acpi i2c-ITE5570:00: failed to reset device: -61
[   30.196922] i2c_hid_acpi i2c-ASUF1204:00: failed to reset device: -61
[   31.220910] i2c_hid_acpi i2c-ITE5570:00: can't add hid device: -61
[   31.220909] i2c_hid_acpi i2c-ASUF1204:00: can't add hid device: -61
Comment 4 drich 2023-05-27 16:56:36 UTC
Nevermind, I was messing around with the ACPI patch mentioned in the first post. Enabling CONFIG_I2C_HID_ACPI does fix the problem.

So, I'm wondering why defaults debian kconfig disables it by default.

Thank you for your help !
Comment 5 Mario Limonciello (AMD) 2023-05-27 16:57:52 UTC
Great. File a bug against the debian kernel please.
Comment 6 drich 2023-05-27 17:10:22 UTC
Well, said nothing. i8042.nomux=1 does not solve the new keyboard issue.
At the exact moment i2c_hid_acpi starts, keyboard events become totally erratic.

But i found a workaround : 
echo "AMDI0010:00" > /sys/bus/platform/drivers/i2c_designware/unbind

The only device attached to AMDI0010:00 is ITE5570:00, it's recognized as a generic HID device :
[  157.385890] input: ITE5570:00 048D:8051 as /devices/platform/AMDI0010:01/i2c-1/i2c-ITE5570:00/0018:048D:8051.0006/input/input27
[  157.385955] hid-generic 0018:048D:8051.0006: input,hidraw0: I2C HID v1.00 Device [ITE5570:00 048D:8051] on i2c-ITE5570:00


libinput sees it as a keyboard :
Device:           ITE5570:00 048D:8051
Kernel:           /dev/input/event18
Group:            8
Seat:             seat0, default
Capabilities:     keyboard

In the patch referenced in my first post I can see a "AMDI0007" override, could this AMDI0010 also needs an IRQ override ?
Comment 7 Mario Limonciello (AMD) 2023-05-27 17:12:15 UTC
I need to see an acpidump to understand what's happening with the keyboard.
Comment 8 drich 2023-05-27 17:20:13 UTC
Created attachment 304335 [details]
acpidump summary
Comment 9 drich 2023-05-27 17:20:44 UTC
Created attachment 304336 [details]
acpidump binaries
Comment 10 drich 2023-05-27 17:28:16 UTC
Binaries are fine or would the raw acpidump output be more useful ?

Don't know if it was a typo or if the device enumeration is dynamic, but I actually have to unbind AMDI0010:01, not AMDI0010:00
Comment 11 Mario Limonciello (AMD) 2023-05-31 16:44:41 UTC
Do you have Windows on this machine by chance (as a dual boot)?

Can you please cross reference whether the keyboard shows up as an I2C device on Windows in device manager?

> In the patch referenced in my first post I can see a "AMDI0007" override,
> could this AMDI0010 also needs an IRQ override ?

No; AMDI0007 is used as a heuristic in this case, not an actual device.

> dmesg

Can I please see a full dmesg with the correct kernel configuration?

> acpidump binaries

I do see _HID of ITE5570 connected to I2CB (the second I2C endpoint).  This device is called SMKB ("Smart" keyboard?).  I do see it configured for GPIO 0.

What happens if you take out the linked patch (https://lore.kernel.org/linux-acpi/20230518183920.93472-1-mario.limonciello@amd.com/) but let the i2c-hid-acpi driver handle things.  Does it work properly?
Comment 12 Mario Limonciello (AMD) 2023-05-31 16:44:59 UTC
Sorry GPIO "7"
Comment 13 Mario Limonciello (AMD) 2023-06-02 04:09:04 UTC
The touchpad problem is sorted by kernel config.  The i2c-hid storm has a potential fix in https://bugzilla.kernel.org/show_bug.cgi?id=217336.  I think we should close this one and let that be tracked there.

*** This bug has been marked as a duplicate of bug 217336 ***

Note You need to log in before you can comment on or make changes to this bug.