Touchpad not working since update (Archlinux)

Just finished testing: sadly, it does not fix it.

Well that’s too bad to hear; what a bizarre issue. You might need to bring this to the linux-input M/L for discussion with the maintainers on their ideas.

Would it be appropriate to give the go-ahead for the mkinitcpio devs to temporarily revert their change (as in, the inclusion of the i2c-hid modules)? So that users don’t have to wonder why the touchpad is not working while this gets figured out.

Also, I have no idea how the LKML works or who is the correct maintainer for this specific issue, as I have never gotten involved with kernel developers before. Do you have any relevant pointers? Thank you, by the way.

Also, I just re-tested 6.6.0, and it turns out, it also doesn’t work.

Apparently, I got lucky and it just happened to work 5/5 times.

So, for the record: the only thing that I can confirm fixes it consistently is reverting mkinitcpio.

As an experiment can you try compiling it into your kernel instead of as a module? That might be illustrative of what’s going on. If that fails (which I expect it should), you should be able to more easily try older kernels to see when it starts failing without having to guess and get lucky.

As for posting to linux-input ML, just send an email to linux-input@vger.kernel.org. Make sure it’s a plain text email. Explain the problem, logs and analysis you’ve done, and ask for any advice.

1 Like

Quickly glanced through the discussion and I haven’t notice anyone checking on this log line:

framework kernel: i2c_hid_acpi i2c-FRMW0003:00: failed to reset device: -121

The log likely origins from here: i2c-hid-core.c - drivers/hid/i2c-hid/i2c-hid-core.c - Linux source code (v6.8.9) - Bootlin . Failed reset results in putting the HID device in I2C_HID_PWR_SLEEP.

Errno 121 seems to be Remote I/O Error what indicates issues with the transmission. If I was about to speculate what’s happening here is that early load of the HID i2c modules, and thus early communication, either meets busy bus (I’d assume that the kernel is serializing the access, but I don’t know the details) or another longshot idea - maybe this is a SCL frequency issue? In the provided log the kernel switched to TSC clocksource just after the i2c reset failure. IDK what kind of clocksource it uses before but, hypothetically, if it’s unstable I could imagine situation when the generated clock doesn’t meet the spec.

One way or another it looks racey to me. Without having FW16 in my hands, may I suggest posting more dmesg/journalctl outputs of successful/failed enumeration so we can check on the order of events?

Hi, not sure if it helps but I’ve noticed the trackpad problem since ~1 month ago and my solution is to unplug everything and do a cold boot. I’ve noticed that trying to reboot, or booting with any device connected to a port will prevent the trackpad from correctly being initialised (the expansion card themselves can stay plugged in, they seems to stay off while nothing is plugged in them).
I don’t know if I got lucky but it always worked when doing that. I do know now, it was just luck. :sweat_smile:

My guess is you’re getting lucky. If I just continuously reboot, doing nothing other than test if the tracpad works, it works nearly exactly 50% of the time. It was consistent enough that for a while I thought it was every other boot that it would/wouldn’t work… until it finally did it twice in a row.

Yep, you’re correct, I got a unresponsive trackpad this morning while starting from cold boot and nothing plugged in.

To make sure this is caused by the i2c-hid-acpi module, could someone try reverting this change: install/keyboard: add more HID modules (27039f7a) · Commits · Arch Linux / Mkinitcpio / mkinitcpio · GitLab ?

Can be easily done with sed:

sudo sed -i.backup 's/(hid|\.+-hid\/)/hid/' /usr/lib/initcpio/install/keyboard 

Run mkinitcpio -p linux after the change to regenerate the ramdisk image.

keyboard.backup file will be generated if one wishes to restore the original file after the test

$ diff /usr/lib/initcpio/install/keyboard*
<     map add_checked_modules '/hid/hid' '/input/(serio|keyboard)'
---
>     map add_checked_modules '/hid/(hid|.+-hid/)' '/input/(serio|keyboard)'

This exact change is responsible for selecting and loading i2c-hid modules (along with few others). Assuming this is the culprit it should help (effectively cause late modules load).

I tried it, seems to work. Before running mkinitcpio with the change I had 2 out 5 reboot with an unresponsive touchpad, now after updating the init image I’m at my 6th reboot with touchpad always active.

I’ll keep an eye on my updates if I do some in the next few days to be sure not to revert the revert and I’ll post here if the touchpad stops working.

Already did that; I was instructed to do that by nl6720 over at the mkinitcpio gitlab. I can confirm that it does, in fact, fix the issue consistently.

2 Likes

I don’t want to make overly bold statements without being able to test them, but it seems that too early loading of i2c-hid-acpi thus enumerating the i2c devices is failing either due to i2c subsystem issue or kind of a race condition on the i2c line.

It’s unclear to me what’s the result as I don’t have full dmesg logs, but basing on the ones from the above either the kernel puts the device into sleep/low power mode (gives up on the enumeration) or device itself doesn’t come up as it wasn’t properly reset (the log snippets seem to differ in the amount of enumerated devices or even USB controllers).

That said, this is definitely a buggy behavior that should be fixed, but for now there’s a solid workaround we can apply on the ramdisk.

I agree with you - that’s why I think it’s worth experimenting with it not as a module. I expect it should expose the same race condition and be easier to debug without the element of timing of the module load.

Just a thought. What order are your HOOKS in /etc/mkinitcpio.conf? Order can matter.

I have not experienced this issue at all on my Arch install. My HOOKS are below:

HOOKS=(base udev keyboard autodetect microcode modconf kms block encrypt filesystems fsck grub-btrfs-overlayfs)

These are my hooks:
HOOKS=(base udev autodetect modconf keyboard keymap consolefont block filesystems resume fsck)
I get the issue on 50% of boots

One thing I’m noticing in the arch documentation regarding the keyboard hook:

Adds the necessary modules for keyboard devices. Use this if you have a USB or serial keyboard and need it in early userspace (either for entering encryption passphrases or for use in an interactive shell). As a side effect, modules for some non-keyboard input devices might be added too, but this should not be relied on.

Note: For systems that are booted with different hardware configurations (e.g. laptops with external keyboard vs. internal keyboard or headless systems), this hook needs to be placed before autodetect in order to be able to use the keyboard at boot time, for example to unlock an encrypted device when using the encrypt hook.

I wonder if the tracpad is one of those “non-keyboard” devices this is grabbing, as our HOOKS have autodetect and keyboard swapped.


Update: I tested putting keyboard before autodetect, and while it didn’t make the issue go away, it did make it reproducible 100% of the time (according to 4 reboot tests).

Here is my order:

HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)

You possibly load the modules earlier and thus hitting the busy i2c bus every time you boot. Try moving it pass consolefont or block (and keep keymap after keyboard, I’m guessing those are bound together).

I have been experiencing this issue since the release of mkinitcpio 39. This issue seems to appear whenever the “PIXA3845” i2c device is not recognized by the kernel.

Successful boot:

May 11 15:51:30 archlinux kernel: input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4f/PNP0C09:00/PNP0C0D:00/input/input0
May 11 15:51:30 archlinux kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
May 11 15:51:30 archlinux kernel: input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1a/LNXVIDEO:00/input/input2
May 11 15:51:31 archlinux kernel: input: PIXA3854:00 093A:0274 Mouse as /devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/0018:093A:0274.0001/input/input3
May 11 15:51:31 archlinux kernel: input: PIXA3854:00 093A:0274 Touchpad as /devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/0018:093A:0274.0001/input/input4
May 11 15:51:31 archlinux kernel: hid-generic 0018:093A:0274.0001: input,hidraw0: I2C HID v1.00 Mouse [PIXA3854:00 093A:0274] on i2c-PIXA3854:00
May 11 15:51:31 archlinux kernel: hid-generic 0018:32AC:001B.0002: hidraw1: I2C HID v1.00 Device [FRMW0003:00 32AC:001B] on i2c-FRMW0003:00
May 11 15:51:31 archlinux kernel: hid-sensor-hub 0018:32AC:001B.0002: hidraw1: I2C HID v1.00 Device [FRMW0003:00 32AC:001B] on i2c-FRMW0003:00
May 11 15:51:31 archlinux kernel: input: PIXA3854:00 093A:0274 Mouse as /devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/0018:093A:0274.0001/input/input5
May 11 15:51:31 archlinux kernel: input: PIXA3854:00 093A:0274 Touchpad as /devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/0018:093A:0274.0001/input/input6
May 11 15:51:31 archlinux kernel: hid-multitouch 0018:093A:0274.0001: input,hidraw0: I2C HID v1.00 Mouse [PIXA3854:00 093A:0274] on i2c-PIXA3854:00
May 11 15:51:31 archlinux kernel: Modules linked in: dm_mod crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel sha512_ssse3 sha256_ssse3 nvme sha1_ssse3 aesni_intel hid_sensor_hub hid_multitouch nvme_core crypto_simd xhci_pci hid_generic cryptd ccp amdgpu(+) nvme_auth xhci_pci_renesas i2c_hid_acpi i2c_hid video wmi amdxcp i2c_algo_bit drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper drm_buddy drm_display_helper cec
May 11 15:51:33 archlinux kernel: input: Framework Laptop 16 Numpad Module as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.0/0003:32AC:0014.0003/input/input7
May 11 15:51:33 archlinux kernel: hid-generic 0003:32AC:0014.0003: input,hidraw2: USB HID v1.11 Keyboard [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input0
May 11 15:51:33 archlinux kernel: hid-generic 0003:32AC:0014.0004: hiddev96,hidraw3: USB HID v1.11 Device [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input1
May 11 15:51:33 archlinux kernel: input: Framework Laptop 16 Numpad Module System Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0005/input/input8
May 11 15:51:33 archlinux kernel: input: Framework Laptop 16 Numpad Module Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0005/input/input9
May 11 15:51:33 archlinux kernel: input: Framework Laptop 16 Numpad Module Wireless Radio Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0005/input/input10
May 11 15:51:33 archlinux kernel: input: Framework Laptop 16 Numpad Module Keyboard as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0005/input/input11
May 11 15:51:33 archlinux kernel: hid-generic 0003:32AC:0014.0005: input,hidraw4: USB HID v1.11 Keyboard [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input2
May 11 15:51:33 archlinux kernel: hid-generic 0003:32AC:0014.0006: hiddev97,hidraw5: USB HID v1.11 Device [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input3
May 11 15:51:33 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.0/0003:32AC:0012.0007/input/input12
May 11 15:51:33 archlinux kernel: hid-generic 0003:32AC:0012.0007: input,hidraw6: USB HID v1.11 Keyboard [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input0
May 11 15:51:33 archlinux kernel: hid-generic 0003:32AC:0012.0008: hiddev98,hidraw7: USB HID v1.11 Device [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input1
May 11 15:51:34 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI System Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0009/input/input13
May 11 15:51:34 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0009/input/input14
May 11 15:51:34 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI Wireless Radio Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0009/input/input15
May 11 15:51:34 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI Keyboard as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0009/input/input16
May 11 15:51:34 archlinux kernel: hid-generic 0003:32AC:0012.0009: input,hidraw8: USB HID v1.11 Keyboard [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input2
May 11 15:51:34 archlinux kernel: hid-generic 0003:32AC:0012.000A: hiddev99,hidraw9: USB HID v1.11 Device [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input3
May 11 15:51:37 artemis kernel: i2c_dev: i2c /dev entries driver
May 11 15:51:37 artemis systemd-modules-load[425]: Inserted module 'i2c_dev'

Unsuccessful (bugged) boot:

May 11 09:04:42 archlinux kernel: input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4f/PNP0C09:00/PNP0C0D:00/input/input0
May 11 09:04:42 archlinux kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
May 11 09:04:42 archlinux kernel: input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1a/LNXVIDEO:00/input/input2
May 11 09:04:43 archlinux kernel: hid-generic 0018:32AC:001B.0001: hidraw0: I2C HID v1.00 Device [FRMW0003:00 32AC:001B] on i2c-FRMW0003:00
May 11 09:04:43 archlinux kernel: hid-sensor-hub 0018:32AC:001B.0001: hidraw0: I2C HID v1.00 Device [FRMW0003:00 32AC:001B] on i2c-FRMW0003:00
May 11 09:04:43 archlinux kernel: Modules linked in: dm_mod crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel sha512_ssse3 sha256_ssse3 nvme sha1_ssse3 aesni_intel hid_sensor_hub nvme_core xhci_pci crypto_simd hid_generic cryptd ccp xhci_pci_renesas nvme_auth amdgpu(+) i2c_hid_acpi i2c_hid video wmi amdxcp i2c_algo_bit drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper drm_buddy drm_display_helper cec
May 11 09:04:45 archlinux kernel: input: Framework Laptop 16 Numpad Module as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.0/0003:32AC:0014.0002/input/input3
May 11 09:04:45 archlinux kernel: hid-generic 0003:32AC:0014.0002: input,hidraw1: USB HID v1.11 Keyboard [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input0
May 11 09:04:45 archlinux kernel: hid-generic 0003:32AC:0014.0003: hiddev96,hidraw2: USB HID v1.11 Device [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input1
May 11 09:04:45 archlinux kernel: input: Framework Laptop 16 Numpad Module System Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0004/input/input4
May 11 09:04:45 archlinux kernel: input: Framework Laptop 16 Numpad Module Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0004/input/input5
May 11 09:04:45 archlinux kernel: input: Framework Laptop 16 Numpad Module Wireless Radio Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0004/input/input6
May 11 09:04:45 archlinux kernel: input: Framework Laptop 16 Numpad Module Keyboard as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-3/1-3.2/1-3.2:1.2/0003:32AC:0014.0004/input/input7
May 11 09:04:45 archlinux kernel: hid-generic 0003:32AC:0014.0004: input,hidraw3: USB HID v1.11 Keyboard [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input2
May 11 09:04:45 archlinux kernel: hid-generic 0003:32AC:0014.0005: hiddev97,hidraw4: USB HID v1.11 Device [Framework Laptop 16 Numpad Module] on usb-0000:c4:00.3-3.2/input3
May 11 09:04:45 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.0/0003:32AC:0012.0006/input/input8
May 11 09:04:46 archlinux kernel: hid-generic 0003:32AC:0012.0006: input,hidraw5: USB HID v1.11 Keyboard [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input0
May 11 09:04:46 archlinux kernel: hid-generic 0003:32AC:0012.0007: hiddev98,hidraw6: USB HID v1.11 Device [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input1
May 11 09:04:46 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI System Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0008/input/input9
May 11 09:04:46 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0008/input/input10
May 11 09:04:46 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI Wireless Radio Control as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0008/input/input11
May 11 09:04:46 archlinux kernel: input: Framework Laptop 16 Keyboard Module - ANSI Keyboard as /devices/pci0000:00/0000:00:08.1/0000:c4:00.3/usb1/1-4/1-4.2/1-4.2:1.2/0003:32AC:0012.0008/input/input12
May 11 09:04:46 archlinux kernel: hid-generic 0003:32AC:0012.0008: input,hidraw7: USB HID v1.11 Keyboard [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input2
May 11 09:04:46 archlinux kernel: hid-generic 0003:32AC:0012.0009: hiddev99,hidraw8: USB HID v1.11 Device [Framework Laptop 16 Keyboard Module - ANSI] on usb-0000:c4:00.3-4.2/input3
May 11 09:04:49 artemis kernel: i2c_dev: i2c /dev entries driver
May 11 09:04:49 artemis systemd-modules-load[432]: Inserted module 'i2c_dev'

Also potentially related, KDE’s “kwin” process does not like the input coming in from the touch pad. I continually get messages in the log such as:

May 10 11:46:48 artemis kwin_wayland[1143]: kwin_libinput: Libinput: event4  - PIXA3854:00 093A:0274 Touchpad: kernel bug: Touch jump detected and discarded.
May 10 11:46:48 artemis kwin_wayland[1143]: kwin_libinput: Libinput: event4  - PIXA3854:00 093A:0274 Touchpad: kernel bug: Touch jump detected and discarded.
May 10 11:46:48 artemis kwin_wayland[1143]: kwin_libinput: Libinput: event4  - PIXA3854:00 093A:0274 Touchpad: kernel bug: Touch jump detected and discarded.
May 10 11:46:49 artemis kwin_wayland[1143]: kwin_libinput: Libinput: event4  - PIXA3854:00 093A:0274 Touchpad: kernel bug: Touch jump detected and discarded.
May 10 11:46:49 artemis kwin_wayland[1143]: kwin_libinput: Libinput: event4  - PIXA3854:00 093A:0274 Touchpad: kernel bug: Touch jump detected and discarded.
May 10 11:46:49 artemis kwin_wayland[1143]: kwin_libinput: Libinput: event4  - PIXA3854:00 093A:0274 Touchpad: WARNING: log rate limit exceeded (5 msgs per 24h). Discarding future messages.

Kernel version tested: 6.8.9-arch1-2
mkinitcpio.conf hooks section: HOOKS=(base systemd keyboard plymouth autodetect microcode modconf sd-vconsole block sd-encrypt filesystems fsck)