Bugzilla – Bug 1222345
Laptop wakes from suspend once the user closes the lid
Last modified: 2024-05-02 12:31:53 UTC
I have a ThinkPad T14 Gen 4, which has an AMD Ryzen 7 PRO 7840U. With kernel-default 6.8.4-rc1, the computer can be suspended when the lid is open, but it wakes up as soon as the user closes the lid. The problem does not occur with kernel-default 5.14.21.
This didn't happen with 6.7.x, right? I guess it's a regression in the recent upstream.
I don't know; I didn't try 6.7.x. I tried only 5.14.21, which is the current stable kernel for Leap 15.5, and 6.8.4-rc1, which is the current kernel available in backports. (I wanted to upgrade from 5.14.21 because that version has a different suspend problem where, about 10% of the time, the computer locks up or reboots when waking from suspend.) I can try 6.7.x if you tell me where to find a Leap 15.5 package, or where to find the project on the build service so that I can build one myself. I found 6.8.4-rc1 in the repository <https://build.opensuse.org/package/show/Kernel:stable:Backport/kernel-source> but it has only one revision in the history.
You can find in my OBS repo, e.g. http://download.opensuse.org/repositories/home:/tiwai:/kernel:/6.7/backport/ Also, try Leap 15.6 kernel. http://download.opensuse.org/repositories/Kernel:/SLE15-SP6/pool/ This should work stably without surprises.
The problem is also reproducible with 6.7.9 from your repository and 6.4.0 from the 15.6 repository. But strangely, when I downgrade kernel-default back to 5.14.21, or even boot into a read-only snapshot with that kernel, the problem is still reproducible! I'm not sure what to make of this. In any event, it would be nice if I could use any kernel version that keeps the laptop suspended when I close the lid.
I found a kernel bug report for the same issue with another model of ThinkPad: https://bugzilla.kernel.org/show_bug.cgi?id=214855 That bug report indicates that the issue was fixed with 5.16. So I installed 5.16 from <http://download.opensuse.org/repositories/home:/tiwai:/kernel:/5.16/backport/x86_64/> was no longer able to reproduce the problem. I rebooted again, this time to 6.8.4-rc1, and I still can't reproduce the problem. Perhaps the bug is there in all the kernel versions I've tested, but is not always reproducible.
Yes, it looks so; it's likely a problem triggered by BIOS setup or such, which had been changed accidentally. Feel free to reopen if the issue is reproduced.
Yes, I've rebooted (still using 6.8.4-rc1) and the problem occurs again. I suspect that the kernel version may have nothing to do with this bug. Rather, each time the computer is rebooted, it somehow decides whether or not closing the lid will wake from suspend, and it maintains this behaviour at least until the next reboot.
Then some spurious interrupt must be waking up the machine. Please check the following: - Enable/disable LID ACPI: To check the status: % cat /proc/acpi/wakeup To toggle the status: % echo LID > /proc/acpi/wakeup If this doesn't influence, it's something else than ACPI wakeup. Then, you can try the direct suspend by echo mem > /sys/power/state Does it behave differently?
I tried toggling the lid wakeup as you suggested. No matter whether it shows as enabled or disabled in /proc/acpi/wakeup, and no matter whether I put the laptop to sleep using the KDE Plasma GUI or with "echo mem > /sys/power/state", the laptop wakes up once I close the lid. I don't see any settings in the BIOS menu that seem relevant. Is there anything else I can try?
The best would be to report your issue to the upstream devs, I suppose.
Do you mean the kernel maintainers, or the hardware manufacturer?
The former.
It is usually the touchpad. Was in my case (T14s and P14s) too. https://wiki.archlinux.org/title/Lenovo_ThinkPad_T14s_(AMD)_Gen_3#Disable_wakeup_from_sleep_on_touchpad_activity
(In reply to Jiri Slaby from comment #13) > It is usually the touchpad. Was in my case (T14s and P14s) too. > > https://wiki.archlinux.org/title/ > Lenovo_ThinkPad_T14s_(AMD)_Gen_3#Disable_wakeup_from_sleep_on_touchpad_activi > ty Do you mean that it can be touchpad that incorrectly wakes up at the lid close? My T14s gen 3 doesn't seem showing the problem by some reason.
(In reply to Takashi Iwai from comment #14) > (In reply to Jiri Slaby from comment #13) > > It is usually the touchpad. Was in my case (T14s and P14s) too. > > > > https://wiki.archlinux.org/title/ > > Lenovo_ThinkPad_T14s_(AMD)_Gen_3#Disable_wakeup_from_sleep_on_touchpad_activi > > ty > > Do you mean that it can be touchpad that incorrectly wakes up at the lid > close? Yes, the lid generates some "touches" when getting close to the touchpad.
Ah interesting. Tristan, could you check whether the workaround mentioned for Arch works for you, too?