我的机器似乎自动从挂起状态唤醒,不定期。导致电源耗尽,机器关闭。
当机器放在我的箱子里时,它会被唤醒,这真是太烦人了。我想,这也相当不健康。它也会在半夜醒来,这就是为什么我必须记得接上电源,否则早上我的电池就会没电了。
该机器是搭载 Ubuntu 14.04 的联想 X1 Carbon。我在工作时将它与 OneLink 基座一起使用,但在家里只使用电源和显示端口显示器。
现在,以下是我目前所做的工作。我已将其暂停,大约 3 小时后,它唤醒了,如下面的日志所示:
从pm_suspend
:
Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.
Thu Jul 24 17:18:26 CEST 2014: performing suspend
Thu Jul 24 20:17:04 CEST 2014: Awake.
Thu Jul 24 20:17:04 CEST 2014: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.
从syslog
:
$ grep -B 5 "20:17:0" /var/log/syslog.1
Jul 24 17:18:25 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 24 17:18:25 lobners-biq dbus[548]: [system] Activating service name='org.freedesktop.systemd1' (using servicehelper)
Jul 24 17:18:25 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.systemd1'
Jul 24 17:18:25 lobners-biq anacron[11164]: Anacron 2.3 started on 2014-07-24
Jul 24 17:18:25 lobners-biq anacron[11164]: Normal exit (0 jobs run)
Jul 24 20:17:04 lobners-biq kernel: [ 7351.710460] PM: Syncing filesystems ... done.
Jul 24 20:17:04 lobners-biq kernel: [ 7351.720943] PM: Preparing system for mem sleep
Jul 24 20:17:04 lobners-biq kernel: [ 7351.721161] Freezing user space processes ... (elapsed 0.002 seconds) done.
Jul 24 20:17:04 lobners-biq kernel: [ 7351.723370] Freezing remaining freezable tasks ... (elapsed 0.047 seconds) done.
Jul 24 20:17:04 lobners-biq kernel: [ 7351.770482] PM: Entering mem sleep
Jul 24 20:17:04 lobners-biq kernel: [ 7351.770544] Suspending console(s) (use no_console_suspend to debug)
Jul 24 20:17:04 lobners-biq kernel: [ 7351.897854] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Jul 24 20:17:04 lobners-biq kernel: [ 7351.901194] sd 0:0:0:0: [sda] Stopping disk
Jul 24 20:17:04 lobners-biq kernel: [ 7352.149522] PM: suspend of devices complete after 378.694 msecs
Jul 24 20:17:04 lobners-biq kernel: [ 7352.165538] PM: late suspend of devices complete after 16.005 msecs
Jul 24 20:17:04 lobners-biq kernel: [ 7352.181723] ehci-pci 0000:00:1d.0: System wakeup enabled by ACPI
Jul 24 20:17:04 lobners-biq kernel: [ 7352.197584] e1000e 0000:00:19.0: System wakeup enabled by ACPI
Jul 24 20:17:04 lobners-biq kernel: [ 7352.229549] xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
Jul 24 20:17:04 lobners-biq kernel: [ 7352.245757] PM: noirq suspend of devices complete after 80.176 msecs
Jul 24 20:17:04 lobners-biq kernel: [ 7352.246048] ACPI: Preparing to enter system sleep state S3
Jul 24 20:17:04 lobners-biq kernel: [ 7352.247624] PM: Saving platform NVS memory
Jul 24 20:17:04 lobners-biq kernel: [ 7352.248416] Disabling non-boot CPUs ...
Jul 24 20:17:04 lobners-biq kernel: [ 7352.249937] smpboot: CPU 1 is now offline
Jul 24 20:17:04 lobners-biq kernel: [ 7352.353589] smpboot: CPU 2 is now offline
Jul 24 20:17:04 lobners-biq kernel: [ 7352.457641] smpboot: CPU 3 is now offline
(clipped)
我知道我可以禁用允许唤醒它的硬件,但我不知道哪个硬件是罪魁祸首。我禁用了 LID(使用acpitool -W 1
),但它仍然被唤醒了。
$ acpitool -w
Device S-state Status Sysfs node
---------------------------------------
1. LID S4 *disabled
2. SLPB S3 *enabled
3. IGBE S4 *disabled pci:0000:00:19.0
4. EXP2 S4 *disabled pci:0000:00:1c.1
5. XHCI S3 *enabled pci:0000:00:14.0
6. EHC1 S3 *enabled pci:0000:00:1d.0
然后我禁用了两个 USB (5 和 6),但它仍然被唤醒。
$ acpitool -w
Device S-state Status Sysfs node
---------------------------------------
1. LID S4 *disabled
2. SLPB S3 *enabled
3. IGBE S4 *disabled pci:0000:00:19.0
4. EXP2 S4 *disabled pci:0000:00:1c.1
5. XHCI S3 *disabled pci:0000:00:14.0
6. EHC1 S3 *disabled pci:0000:00:1d.0
再次:
从pm_suspend
:
Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.
Thu Jul 24 23:11:59 CEST 2014: performing suspend
Fri Jul 25 01:58:01 CEST 2014: Awake.
Fri Jul 25 01:58:01 CEST 2014: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.
从syslog
:
$ grep -B 5 "01:58:" /var/log/syslog.1
Jul 24 23:11:58 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 24 23:11:58 lobners-biq dbus[548]: [system] Activating service name='org.freedesktop.systemd1' (using servicehelper)
Jul 24 23:11:58 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.systemd1'
Jul 24 23:11:58 lobners-biq anacron[16204]: Anacron 2.3 started on 2014-07-24
Jul 24 23:11:58 lobners-biq anacron[16204]: Normal exit (0 jobs run)
Jul 25 01:58:01 lobners-biq kernel: [17846.114837] PM: Syncing filesystems ... done.
Jul 25 01:58:01 lobners-biq kernel: [17846.147640] PM: Preparing system for mem sleep
Jul 25 01:58:01 lobners-biq kernel: [17846.147832] Freezing user space processes ... (elapsed 0.002 seconds) done.
Jul 25 01:58:01 lobners-biq kernel: [17846.149916] Freezing remaining freezable tasks ... (elapsed 0.090 seconds) done.
Jul 25 01:58:01 lobners-biq kernel: [17846.240249] PM: Entering mem sleep
Jul 25 01:58:01 lobners-biq kernel: [17846.240309] Suspending console(s) (use no_console_suspend to debug)
Jul 25 01:58:01 lobners-biq kernel: [17846.370439] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Jul 25 01:58:01 lobners-biq kernel: [17846.373919] sd 0:0:0:0: [sda] Stopping disk
Jul 25 01:58:01 lobners-biq kernel: [17846.618053] PM: suspend of devices complete after 377.454 msecs
Jul 25 01:58:01 lobners-biq kernel: [17846.634086] PM: late suspend of devices complete after 16.022 msecs
Jul 25 01:58:01 lobners-biq kernel: [17846.666119] e1000e 0000:00:19.0: System wakeup enabled by ACPI
Jul 25 01:58:01 lobners-biq kernel: [17846.714324] PM: noirq suspend of devices complete after 80.194 msecs
Jul 25 01:58:01 lobners-biq kernel: [17846.714615] ACPI: Preparing to enter system sleep state S3
Jul 25 01:58:01 lobners-biq kernel: [17846.716223] PM: Saving platform NVS memory
Jul 25 01:58:01 lobners-biq kernel: [17846.717020] Disabling non-boot CPUs ...
Jul 25 01:58:01 lobners-biq kernel: [17846.718527] smpboot: CPU 1 is now offline
Jul 25 01:58:01 lobners-biq kernel: [17846.822120] smpboot: CPU 2 is now offline
Jul 25 01:58:01 lobners-biq kernel: [17846.822517] Broke affinity for irq 23
Jul 25 01:58:01 lobners-biq kernel: [17846.822519] Broke affinity for irq 57
Jul 25 01:58:01 lobners-biq kernel: [17846.926171] smpboot: CPU 3 is now offline
Jul 25 01:58:01 lobners-biq kernel: [17846.927621] ACPI: Low-level resume complete
Jul 25 01:58:01 lobners-biq kernel: [17846.927675] PM: Restoring platform NVS memory
Jul 25 01:58:01 lobners-biq kernel: [17846.928186] Enabling non-boot CPUs ...
Jul 25 01:58:01 lobners-biq kernel: [17846.928215] x86: Booting SMP configuration:
Jul 25 01:58:01 lobners-biq kernel: [17846.928216] smpboot: Booting Node 0 Processor 1 APIC 0x1
Jul 25 01:58:01 lobners-biq kernel: [17846.942510] CPU1 is up
Jul 25 01:58:01 lobners-biq kernel: [17846.942524] smpboot: Booting Node 0 Processor 2 APIC 0x2
Jul 25 01:58:01 lobners-biq kernel: [17846.956793] CPU2 is up
Jul 25 01:58:01 lobners-biq kernel: [17846.956806] smpboot: Booting Node 0 Processor 3 APIC 0x3
Jul 25 01:58:01 lobners-biq kernel: [17846.971073] CPU3 is up
Jul 25 01:58:01 lobners-biq kernel: [17846.974855] ACPI: Waking up from system sleep state S3
(clipped)
虽然pm_suspend
日志类似,但文件存在一些差异syslog
。我不知道该怎么做?
有人知道这可能是什么吗?
笔记:类似的问题“Ubuntu 12.04 - 自行从挂起状态唤醒“不是重复的。答案中的脚本似乎没有任何效果,我的问题也不是无法挂起或唤醒。它无法保持挂起状态。这也是问题所涉及的东西,但在我的例子中,ethtool 中的局域网唤醒选项也是“d”。
答案1
只是为了完成解决方案:
要在 X1 的 BIOS 中禁用深度睡眠,
- 重启你的X1
- 启动后立即按下F12进入 BIOS
- 按下Tab选择“应用程序菜单”
- 按下Enter进入“设置”
- 按下→选择“配置”
- 一直按↓,直到到达“Power”,然后按 ENTER
- 一直按↓,直到看到“Intel (R) Rapid Start Technology”
- 按下Enter可将其切换为“已禁用”
- 最后,点击F10保存并退出
答案2
解决方案!
我发现有人描述了相似的东西。这是因为机器在 3 小时后就会进入“深度睡眠”模式。
虽然它有时会这样做,对此我很高兴,但有时它却无法正确地进入“深度睡眠”。
我在 BIOS 中完全禁用了此功能,初步经验分析表明它是有效的:)
至于英特尔休眠方案,正如您所指出的,它需要 SSD 上的专用分区,不能用于任何其他目的。Windows 中唯一的设置位于 Lenovo Settings 应用程序的 Power 部分中。联想将此功能称为“30 天待机”。您唯一能做的就是将其打开或关闭。以下是“30 天待机”的工作原理:
当您合上盖子或以其他方式使系统进入睡眠模式时,系统将睡眠 3 小时。
3 小时后系统会唤醒并检查一些事项,例如未连接 AC、未启用 LAN 唤醒、未连接 USB 设备等。如果条件允许,系统将进入 30 天待机状态(例如深度睡眠)。否则系统将返回正常睡眠模式。
深度睡眠意味着将内存内容写入 SSD 上的特殊休眠分区。它与传统休眠非常相似,只是它使用 BIOS 方法而不是 Windows 方法,因此速度更快。但它远不如正常睡眠/恢复快。
当打开盖子或按下电源按钮时,系统就会退出深度睡眠模式。
您找到了 BIOS 设置,但实际上,只要在系统上安装 Lenovo Settings(和 Lenovo Settings 依赖包),这些设置就会被忽略。我真的不知道为什么要做出这样的设计选择。
我个人认为 30 天待机时间没什么价值,至少没有价值到让我愿意放弃 8GB 的昂贵 SSD。我只使用睡眠/恢复模式。电池可以使用几天。如果我要长时间离开电脑,我会直接关机。
答案3
我在我的 pm_suspend.log 中看到这一点:
运行钩子 /etc/pm/sleep.d/10_unattended-upgrades-hibernate 恢复挂起:/etc/pm/sleep.d/10_unattended-upgrades-hibernate 恢复挂起:成功。
这是非常太不酷了。我的 Windows 机器以前总是自动唤醒,我永远也搞不清楚为什么。每次我寻找罪魁祸首时,我都快疯了。我发现它很难配置,很烦人。
在 Ubuntu 上,请将其设置为非常可见的并且易于配置的选项。当我看到我的电脑在没有我的允许。
正要用湿面条抽它 30 下时,我发现这很可能是由于这个“无人值守升级”的小精灵造成的。
在文件 /etc/apt/apt.conf.d/10periodic 中,我首先尝试将 APT::Periodic::Unattended-Upgrade 从“1”设置为“0”。然后,不到一天,我的电脑就自动唤醒了。
因此,我尝试将 /etc/apt/apt.conf.d/10periodic 中的所有四个值都设置为“0”
APT::Periodic::更新包列表“0”; APT::Periodic::下载可升级包“0”; APT::周期::自动清洁间隔“0”; APT::定期::无人值守升级“0”;
到目前为止,已经过去了几天,我还没有遇到过计算机自发唤醒的情况。
吉诺