我尝试将我的系统 (Arch Linux) 设置为在 LID 关闭时暂停,然后在 10 分钟后休眠。为此,我尝试使用 systemd suspend-and-hibernate
:我有
HandleLidSwitch=suspend-then-hibernate
HandleLidSwitchExternalPower=suspend-then-hibernate
在/etc/systemd/logind.conf
和
HibernateDelaySec=600
在/etc/systemd/sleep.conf
。
问题是系统每 5 分钟唤醒一次,因此它永远不会进入休眠阶段。在日志中我有类似的内容(您可以在此处查看完整的日志 -https://pastebin.com/kDL3WSwD):
Jun 08 15:57:54 vindy systemd-logind[492]: Lid closed.
Jun 08 15:57:54 vindy systemd-logind[492]: Suspending, then hibernating...
...
Jun 08 15:57:55 vindy systemd[1]: Starting User suspend actions...
Jun 08 15:57:55 vindy wpa_supplicant[641]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Jun 08 15:57:55 vindy wpa_supplicant[641]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
Jun 08 15:57:55 vindy wpa_supplicant[641]: nl80211: deinit ifname=wlo1 disabled_11b_rates=0
Jun 08 15:57:56 vindy systemd[1]: Started User suspend actions.
Jun 08 15:57:56 vindy audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=suspend@okapi comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 08 15:57:56 vindy systemd[1]: Reached target Sleep.
Jun 08 15:57:56 vindy systemd[1]: Starting Suspend; Hibernate if not used for a period of time...
Jun 08 15:57:56 vindy kernel: audit: type=1130 audit(1654693076.621:79): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=suspend@okapi comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 08 15:57:56 vindy systemd-sleep[2200]: Entering sleep state 'suspend'...
Jun 08 15:57:56 vindy kernel: PM: suspend entry (s2idle)
Jun 08 15:57:56 vindy kernel: Filesystems sync: 0.009 seconds
Jun 08 16:02:56 vindy kernel: Freezing user space processes ... (elapsed 0.039 seconds) done.
Jun 08 16:02:56 vindy kernel: OOM killer disabled.
Jun 08 16:02:56 vindy kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jun 08 16:02:56 vindy kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Jun 08 16:02:56 vindy kernel: ACPI: EC: interrupt blocked
Jun 08 16:02:56 vindy kernel: ACPI: EC: interrupt unblocked
...
Jun 08 16:08:27 vindy kernel: Freezing user space processes ... (elapsed 0.102 seconds) done.
Jun 08 16:08:27 vindy kernel: OOM killer disabled.
Jun 08 16:08:27 vindy kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jun 08 16:08:27 vindy kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Jun 08 16:08:27 vindy kernel: ACPI: EC: interrupt blocked
Jun 08 16:08:27 vindy kernel: ACPI: EC: interrupt unblocked
...
Jun 08 16:13:58 vindy kernel: Freezing user space processes ... (elapsed 0.097 seconds) done.
Jun 08 16:13:58 vindy kernel: OOM killer disabled.
Jun 08 16:13:58 vindy kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jun 08 16:13:58 vindy kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Jun 08 16:13:58 vindy kernel: ACPI: EC: interrupt blocked
Jun 08 16:13:58 vindy kernel: ACPI: EC: interrupt unblocked
造成这种情况的原因是什么以及如何解决?
答案1
我的笔记本电脑是 HP 845 G9 (Ryzen 6850HS)。
我通过将 Qualcomm FastConnect 6900 WiFi 卡替换为 Intel AX210 解决了这个问题。
我还在 BIOS 中禁用了 WWAN (Fibocom L860-GL Intel XMM 7560),因为它会中断挂起。