我正在尝试让休眠功能在安装在 Razer Blade Advanced(2022 年初)上的 Ubuntu 22.04 LTS 上工作。我目前使用的内核版本是6.0.0
。以前我使用的5.17.15
是,我只能从 CLI 使休眠功能工作。
目前,我只能sudo systemctl hibernate
连续两次执行休眠(无论是通过合上盖子还是通过 CLI 运行)才能成功运行休眠。我想开始suspend-then-hibernate
工作以节省电池寿命。此命令目前根本没有成功完成。
在内核参数中打开pci=nomsi
可以解决 CLI 和 lid 实例化休眠的问题,但不幸的是,这会导致系统崩溃。
到目前为止我已经做了以下事情:
- 分配并指定一个
/swapfile
并更新内核参数以检查resume
和resume_offset
- 禁用所有唤醒设备(其中一个设备
PXSX
拒绝关闭) - 设置
button.lid_init_state=open
为防止与此笔记本电脑相关的挂起循环 - 尝试了
s2idle
mem_sleepdeep
类型 - 将 NVIDIA 驱动程序列入黑名单,禁止加载
这是每个命令排列的状态概述:
和 pci=nomsi
:
- 休眠(成功)
- 暂停然后休眠(成功)
没有 pci=nomsi
:
- 休眠->休眠(成功)
- 休眠 -> 暂停然后休眠(失败)
- 挂起然后休眠 -> 挂起然后休眠(失败)
- 暂停然后休眠 -> 休眠(成功)
可能相关的命令输出:
➜ ~ grep . /sys/bus/*/devices/*/power/wakeup
/sys/bus/acpi/devices/LNXPWRBN:00/power/wakeup:enabled
/sys/bus/acpi/devices/PNP0C0A:03/power/wakeup:enabled
/sys/bus/acpi/devices/PNP0C0C:00/power/wakeup:enabled
/sys/bus/acpi/devices/PNP0C0D:01/power/wakeup:enabled
/sys/bus/acpi/devices/PNP0C0E:00/power/wakeup:enabled
/sys/bus/i2c/devices/i2c-1A58201B:00/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:01.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:06.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:06.2/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:14.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:14.3/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:16.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:1c.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:1d.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:1f.3/power/wakeup:disabled
/sys/bus/pci/devices/0000:01:00.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:01:00.1/power/wakeup:disabled
/sys/bus/pci/devices/0000:02:00.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:03:00.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:04:00.0/power/wakeup:enabled
/sys/bus/pci/devices/0000:05:00.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:05:01.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:05:02.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:05:03.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:06:00.0/power/wakeup:enabled
/sys/bus/pci/devices/0000:3a:00.0/power/wakeup:enabled
/sys/bus/pci/devices/0000:6e:00.0/power/wakeup:disabled
/sys/bus/platform/devices/ACPI000E:00/power/wakeup:disabled
/sys/bus/platform/devices/alarmtimer.0.auto/power/wakeup:enabled
/sys/bus/platform/devices/INTC1070:00/power/wakeup:enabled
/sys/bus/platform/devices/rtc_cmos/power/wakeup:enabled
/sys/bus/thunderbolt/devices/0-0/power/wakeup:enabled
/sys/bus/thunderbolt/devices/domain0/power/wakeup:enabled
/sys/bus/usb/devices/1-10/power/wakeup:disabled
/sys/bus/usb/devices/1-8/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled
/sys/bus/usb/devices/usb4/power/wakeup:disabled
➜ ~ cat /proc/acpi/wakeup | grep enabled
PXSX S4 *enabled pci:0000:04:00.0
➜ ~ free
total used free shared buff/cache available
Mem: 16059020 1592612 11627868 966844 2838540 13180228
Swap: 20971516 0 20971516
日志
休眠 -> 休眠(成功)
sudo systemctl hibernate
(第一次运行-失败):
sudo systemctl hibernate
(第二次运行-成功):
休眠 -> 挂起然后休眠(失败)
sudo systemctl hibernate
(第一次运行 - 失败)
sudo systemctl suspend-then-hibernate
(第二次运行——失败)
和pci=nomsi
sudo systemctl suspend-then-hibernate
(成功)
https://pastebin.coclm/VqBqZsfh
sudo systemctl hibernate
(成功)
谢谢!我很乐意提供更多命令输出和/或日志。
答案1
我禁用了 BIOS 中的独立雷电支持,这似乎已经解决了该问题。