Created attachment 304774 [details] output of `sudo journalctl --system -b` on the boot producing the error. Description: ------------ The touchpad doesn't function normally after resuming from suspend. Touch works most of the time so does the hardware click buttons. The things which don't work are touchpad multitouch gestures (2 fingers and 3 fingers) and cursor movement is also somewhat laggy. Workaround: ----------- removing the module i2c_hid_acpi just before suspend and adding it after resume seems to solve the problem. Script: (output of `cat /usr/lib/systemd/system-sleep/make-touchpad-work.sleep`) ----------------------------------------------------------------------------- #!/bin/sh case $1/$2 in pre/*) echo "Going to $2..." # Place your pre suspend commands here, or `exit 0` if no pre suspend action required echo "Removing i2c_hid_acpi module before suspend." modprobe -r i2c_hid_acpi ;; post/*) echo "Waking up from $2..." # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required sleep 2 echo "Adding i2c_hid_acpi module after suspend (before resuming)." modprobe i2c_hid_acpi ;; esac ----------------------------------------------------------------------------- When was it discovered? ------------------------- I had prior hardware issues with the touchpad so I didn't notice it for a very long time, each time such an issue appeared I thought it was a hardware issue. But the issue is still there even after fixing the hardware (loose ribbon cable). Before the hardware issue, there was an issue with resuming from suspend on my laptop (because of laptop begin particularly new AMD variant). So, if I remember correctly, the touchpad worked fine for particular duration between suspend issue being fixed and hardware issue appearing. GNU/Linux version: ------------------ Linux localhost.localdomain 6.5.0-rc4-1-default+ #1 SMP PREEMPT_DYNAMIC Thu Aug 3 20:15:04 +0545 2023 x86_64 x86_64 x86_64 GNU/Linux Touchpad information: ------------------------ PS/2 00.0: 10500 PS/2 Mouse [Created at input.249] Unique ID: AH6Q.rKa1+aijZtE Hardware Class: mouse Model: "DELL0A78:00 27C6:0D42 Touchpad" Vendor: 0x27c6 Device: 0x0d42 "DELL0A78:00 27C6:0D42 Touchpad" Compatible to: int 0x0210 0x0001 Device File: /dev/input/mice (/dev/input/mouse2) Device Files: /dev/input/mice, /dev/input/mouse2, /dev/input/event3, /dev/input/by-path/platform-AMDI0010:03-event-mouse, /dev/input/by-path/platform-AMDI0010:03-mouse Device Number: char 13:63 (char 13:34) Driver Info #0: Buttons: 1 Wheels: 0 XFree86 Protocol: explorerps/2 GPM Protocol: exps2 Config Status: cfg=no, avail=yes, need=no, active=unknown Prior to testing on mainline kernel, it was tested on opensuse tumbleweed and reported here: https://bugzilla.suse.com/show_bug.cgi?id=1212779
Created attachment 304775 [details] dmesg output of the same boot
Please note that you won't get much traction here when you choose ``Kernel`` component, because there is *literally* no kernel development mailing lists on Cc: list. I have forwarded this bug to linux-input list [1]. [1]: https://lore.kernel.org/linux-input/9a9f9bfe-d532-5814-e3cd-b53bfc4f7480@gmail.com/
Can you please run this script to capture some extra debugging data? https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
Created attachment 304823 [details] log produced by amd_s2idle.py
> 2023-08-12 06:36:02,334 DEBUG: 2023-08-12T06:35:15,957011+05:45 > amd_pmc AMDI0005:00: Last suspend didn't reach deepest state So your system flat out didn't suspend properly on the second attempt it looks like to me. Did the trackpad work after the first suspend? Or it didn't work after either? Or is the problem really just the multi-touch gestures fail? Can I please see an acpidump for your system as well? There's some things I would like to better understand about your log.
Created attachment 304826 [details] output of `sudo acpidump` Request if required in other formats.
(In reply to Mario Limonciello (AMD) from comment #6) > > 2023-08-12 06:36:02,334 DEBUG: 2023-08-12T06:35:15,957011+05:45 > > amd_pmc AMDI0005:00: Last suspend didn't reach deepest state > > > So your system flat out didn't suspend properly on the second attempt it > looks like to me. Did the trackpad work after the first suspend? Or it > didn't work after either? Or is the problem really just the multi-touch > gestures fail? I don't know if I requested multiple suspends, let me try with multiple suspends and a higher gap to test the touchpad in between the suspends.
Created attachment 304827 [details] log produced by amd_s2idle.py 3 suspend entries. Touchpad multitouch didn't work in between the suspends. Clarification: ------------- Touchpad always works but the multitouch gestures are broken. Also the touchpad movement is a bit sluggish and doesn't work properly from time to time (even simple movements).
Created attachment 304828 [details] output of `sudo acpidump -b`
Thanks for sharing the logs and report. My observations: - It appears your system doesn't have any notifications to the EC at suspend entry, which is unusual. - Your touchpad is on GPIO 9 and was the reason that the system woke up from suspend each time. Is that your doing? If not, then I would suspect the polarity or edge/level is programmed wrong by your BIOS ACPI tables. GpioInt (Level, ActiveLow, ExclusiveAndWake, PullNone, 0x0000, "\\_SB.GPIO", 0x00, ResourceConsumer, , ) { // Pin list 0x0009 } Is this a regression? If so; do you know when it worked last?
> It appears your system doesn't have any notifications to the EC at suspend > entry, which is unusual. I don't have enough knowledge to understand this. > Your touchpad is on GPIO 9 and was the reason that the system woke up from > suspend each time. Is that your doing? If not, then I would suspect the > polarity or edge/level is programmed wrong by your BIOS ACPI tables. The system failed to wakeup automatically and this was suggested: WARNING: Timer based wakeup doesn't work properly for your ASIC/firmware, please manually wake the system so, I manually woke the system using touchpad, and there wasn't a warning saying the system woke up prematurely. ( I've had those in different runs. )
Created attachment 304837 [details] screenshot containing instruction to wake the system manually.
> so, I manually woke the system using touchpad, and there wasn't a warning > saying the system woke up prematurely. ( I've had those in different runs. ) OK thanks. If you've woken it up manually by the touchpad, that explains the logs. One more thought. Can you please capture /sys/kernel/debug/gpio in these specific circumstances to compare: 1) Right at bootup 2) After suspending without removing i2c-hid (when you have your problem) 3) After suspending with removing i2c-hid and putting it back (when you don't have your problem)
Created attachment 304842 [details] content of /sys/kernel/debug/gpio right after boot without any changes.
Created attachment 304843 [details] content of /sys/kernel/debug/gpio after suspending without removing i2c_hid_acpi module
Created attachment 304844 [details] content of /sys/kernel/debug/gpio after suspending by removing i2c_hid_acpi module right before suspending and adding the module right after resume.
OK, I don't see anything different with the GPIO controller programming. As a different workaround; what happens if you unload/reload after suspend? Does that also help? If so, perhaps this touchpad needs a reset for some reason.
(In reply to Mario Limonciello (AMD) from comment #18) > As a different workaround; what happens if you unload/reload after suspend? > Does that also help? If I am correct you meant this: - Remove the script to unload i2c_hid_acpi before resume and load after resume. - Suspend the laptop - Check for touchpad issue (issue still present) - unload i2c_hid_acpi using modprobe -r i2c_hid_acpi - load i2c_hid_acpi using modprobe i2c_hid_acpi (fixes the issue) This fixes the issue. >If so, perhaps this touchpad needs a reset for some reason. Hardware itself needs resetting ? How would I do that? Or, the drivers?
Created attachment 304845 [details] possible patch v1 Have a try with this patch.
IIRC, I provided already a similar patch before this report opened, but the result at that time was negative. In anyway, I'll rebuild the kernel again with the patch again. The test kernel is being built in OBS home:tiwai;bsc1212779-3 repo now. The package will appear later at http://download.opensuse.org/repositories/home:/tiwai:/bsc1212779-3/standard/ Please give it a try later.
(In reply to Mario Limonciello (AMD) from comment #20) > Created attachment 304845 [details] > possible patch v1 > > Have a try with this patch. Same problem even with this patch.
Created attachment 304848 [details] log (kernel built by applying the patch p1) produced by amd_s2idle.py 3 suspend entries
I'm out of ideas on this one then; maybe some input maintainers might have more idea what's actually going on that rmmod/modprobe after suspend helps this problem.
Created attachment 304849 [details] Boot producing the touchpad bug even without suspending. Some reboots produce the touchpad bug right from the bootup (without suspending). The attached log is of one such boot.
Created attachment 304850 [details] the accompaining dmesg. dmesg of boot producing the touchpad bug from the start.
I just looked and saw there is a BIOS update for your system. I think it's worth trying this to see if it helps your issue. https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=w2wwc&oscode=wt64a&productcode=inspiron-15-5515-laptop
I tried the newer BIOS version, but the issue remains. Tested on 6.12.0-rc3-150500.55.68-default+ The output of `dmidecode -t bios -q` after the bios update: BIOS Information Vendor: Dell Inc. Version: 1.23.1 Release Date: 05/13/2024 Address: 0xE0000 Runtime Size: 128 kB ROM Size: 8 MB Characteristics: PCI is supported PNP is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported EDD is supported Japanese floppy for NEC 9800 1.2 MB is supported (int 13h) Japanese floppy for Toshiba 1.2 MB is supported (int 13h) 5.25"/360 kB floppy services are supported (int 13h) 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) 8042 keyboard services are supported (int 9h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported Smart battery is supported BIOS boot specification is supported Function key-initiated network boot is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 5.3 BIOS Language Information Language Description Format: Long Installable Languages: 4 en|US|iso8859-1 fr|FR|iso8859-1 ja|JP|unicode zh|TW|unicode Currently Installed Language: en|US|iso8859-1