![暂停功能不起作用 - 需要帮助进行调试](https://linux22.com/image/898032/%E6%9A%82%E5%81%9C%E5%8A%9F%E8%83%BD%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%20-%20%E9%9C%80%E8%A6%81%E5%B8%AE%E5%8A%A9%E8%BF%9B%E8%A1%8C%E8%B0%83%E8%AF%95.png)
从过去几天开始,每次我尝试挂起系统时,我的笔记本电脑都会立即从挂起状态恢复。我不确定具体错误是什么。
我还注意到,自从这个问题出现以来,还没有记录任何消息/var/log/pm-suspend.log
此外,我无法真正解读系统日志并找出问题所在。我已将系统日志的相关部分复制到下面(至少是我认为相关的部分。如果我还应该将其他内容添加到系统日志转储中,或者将任何其他日志文件添加到帖子中,请告诉我)。
Dec 19 19:43:42 rocket systemd[1]: Starting Suspend...
Dec 19 19:43:42 rocket systemd-sleep[14238]: Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory
Dec 19 19:43:42 rocket systemd-sleep[14245]: /lib/systemd/system-sleep/wpasupplicant failed with error code 255.
Dec 19 19:43:42 rocket systemd-sleep[14238]: Suspending system...
Dec 19 19:43:42 rocket kernel: [97753.657438] PM: suspend entry (deep)
Dec 19 19:43:49 rocket kernel: [97753.657440] PM: Syncing filesystems ... done.
Dec 19 19:43:49 rocket kernel: [97753.677370] Freezing user space processes ... (elapsed 0.002 seconds) done.
Dec 19 19:43:49 rocket kernel: [97753.679487] OOM killer disabled.
Dec 19 19:43:49 rocket kernel: [97753.679487] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Dec 19 19:43:49 rocket kernel: [97753.681041] Suspending console(s) (use no_console_suspend to debug)
Dec 19 19:43:49 rocket kernel: [97753.694559] e1000e: EEE TX LPI TIMER: 00000011
Dec 19 19:43:49 rocket kernel: [97754.015324] ACPI: Preparing to enter system sleep state S3
Dec 19 19:43:49 rocket kernel: [97754.058898] ACPI: EC: event blocked
Dec 19 19:43:49 rocket kernel: [97754.058899] ACPI: EC: EC stopped
Dec 19 19:43:49 rocket kernel: [97754.058901] PM: Saving platform NVS memory
Dec 19 19:43:49 rocket kernel: [97754.059053] Disabling non-boot CPUs ...
Dec 19 19:43:49 rocket kernel: [97754.075214] irq_migrate_all_off_this_cpu: 1 callbacks suppressed
Dec 19 19:43:49 rocket kernel: [97754.075217] IRQ 127: no longer affine to CPU1
Dec 19 19:43:49 rocket kernel: [97754.076265] smpboot: CPU 1 is now offline
Dec 19 19:43:49 rocket kernel: [97754.099125] IRQ 122: no longer affine to CPU2
Dec 19 19:43:49 rocket kernel: [97754.099135] IRQ 123: no longer affine to CPU2
Dec 19 19:43:49 rocket kernel: [97754.099152] IRQ 129: no longer affine to CPU2
Dec 19 19:43:49 rocket kernel: [97754.099161] IRQ 133: no longer affine to CPU2
Dec 19 19:43:49 rocket kernel: [97754.101239] smpboot: CPU 2 is now offline
Dec 19 19:43:49 rocket kernel: [97754.127042] IRQ 1: no longer affine to CPU3
Dec 19 19:43:49 rocket kernel: [97754.127053] IRQ 8: no longer affine to CPU3
Dec 19 19:43:49 rocket kernel: [97754.127061] IRQ 9: no longer affine to CPU3
Dec 19 19:43:49 rocket kernel: [97754.127070] IRQ 12: no longer affine to CPU3
Dec 19 19:43:49 rocket kernel: [97754.127092] IRQ 124: no longer affine to CPU3
Dec 19 19:43:49 rocket kernel: [97754.128146] smpboot: CPU 3 is now offline
Dec 19 19:43:49 rocket kernel: [97754.134445] ACPI: Low-level resume complete
Dec 19 19:43:49 rocket kernel: [97754.134553] ACPI: EC: EC started
Dec 19 19:43:49 rocket kernel: [97754.134554] PM: Restoring platform NVS memory
Dec 19 19:43:49 rocket kernel: [97754.136858] Enabling non-boot CPUs ...
Dec 19 19:43:49 rocket kernel: [97754.136960] x86: Booting SMP configuration:
Dec 19 19:43:49 rocket kernel: [97754.136961] smpboot: Booting Node 0 Processor 1 APIC 0x2
Dec 19 19:43:49 rocket kernel: [97754.138995] cache: parent cpu1 should not be sleeping
Dec 19 19:43:49 rocket kernel: [97754.139198] CPU1 is up
Dec 19 19:43:49 rocket kernel: [97754.139220] smpboot: Booting Node 0 Processor 2 APIC 0x1
Dec 19 19:43:49 rocket kernel: [97754.140866] cache: parent cpu2 should not be sleeping
Dec 19 19:43:49 rocket kernel: [97754.141062] CPU2 is up
Dec 19 19:43:49 rocket kernel: [97754.141089] smpboot: Booting Node 0 Processor 3 APIC 0x3
Dec 19 19:43:49 rocket kernel: [97754.142607] cache: parent cpu3 should not be sleeping
Dec 19 19:43:49 rocket kernel: [97754.142810] CPU3 is up
Dec 19 19:43:49 rocket kernel: [97754.145878] ACPI: Waking up from system sleep state S3
Dec 19 19:43:49 rocket kernel: [97754.840298] ACPI: EC: event unblocked
Dec 19 19:43:49 rocket kernel: [97755.373360] ata1: SATA link down (SStatus 4 SControl 300)
Dec 19 19:43:49 rocket kernel: [97755.373390] ata2: SATA link down (SStatus 0 SControl 300)
Dec 19 19:43:49 rocket kernel: [97755.394993] usb 1-2: reset high-speed USB device number 2 using xhci_hcd
Dec 19 19:43:49 rocket kernel: [97755.563924] restoring control 00000000-0000-0000-0000-000000000101/10/5
Dec 19 19:43:49 rocket kernel: [97755.563928] restoring control 00000000-0000-0000-0000-000000000101/12/11
Dec 19 19:43:49 rocket kernel: [97755.670949] usb 1-4: reset high-speed USB device number 37 using xhci_hcd
Dec 19 19:43:49 rocket kernel: [97756.115174] usb 1-4.1: reset full-speed USB device number 38 using xhci_hcd
Dec 19 19:43:49 rocket kernel: [97756.295223] usb 1-4.2: reset full-speed USB device number 39 using xhci_hcd
Dec 19 19:43:49 rocket kernel: [97756.471198] OOM killer enabled.
Dec 19 19:43:49 rocket systemd[1]: Time has been changed
Dec 19 19:43:49 rocket systemd[3214]: Time has been changed
Dec 19 19:43:49 rocket kernel: [97756.471201] Restarting tasks ...
Dec 19 19:43:49 rocket kernel: [97756.477635] [drm] RC6 on
Dec 19 19:43:49 rocket kernel: [97756.479382] done.
Dec 19 19:43:49 rocket kernel: [97756.509711] acpi PNP0401:00: Already enumerated
Dec 19 19:43:49 rocket compiz[3686]: WARN 2017-12-19 19:43:49 unity.glib.dbus.proxy GLibDBusProxy.cpp:487 Calling method "EmitEvent" on object path: "/com/ubuntu/Upstart" failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.Unity.Test.Upstart was not provided by any .service files
Dec 19 19:43:49 rocket systemd[1]: Reloading Laptop Mode Tools.
Dec 19 19:43:49 rocket kernel: [97756.599394] acpi PNP0501:00: Still not present
Dec 19 19:43:49 rocket laptop_mode[14272]: Laptop mode
Dec 19 19:43:49 rocket laptop_mode[14272]: enabled, not active [unchanged]
Dec 19 19:43:49 rocket systemd-sleep[14238]: System resumed.
Dec 19 19:43:49 rocket kernel: [97756.656991] PM: suspend exit
Dec 19 19:43:49 rocket systemd-sleep[14238]: Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory
Dec 19 19:43:49 rocket systemd-sleep[14317]: /lib/systemd/system-sleep/wpasupplicant failed with error code 255.
Dec 19 19:43:49 rocket systemd[1]: Started Suspend.
Dec 19 19:43:49 rocket systemd[1]: sleep.target: Unit not needed anymore. Stopping.
Dec 19 19:43:49 rocket systemd[1]: Stopped target Sleep.
Dec 19 19:43:49 rocket systemd[1]: Reached target Suspend.
Dec 19 19:43:49 rocket systemd[1]: suspend.target: Unit is bound to inactive unit systemd-suspend.service. Stopping, too.
Dec 19 19:43:49 rocket systemd[1]: Stopped target Suspend.
Dec 19 19:43:49 rocket systemd[1]: Started Run anacron jobs at resume.
我该如何修复此问题/进一步调试此问题?
我在 Dell Latitude E7470 上使用 17.04。
附言:如果我需要针对这个问题添加更多信息,请发表评论。
答案1
我按照上面链接中的线索,了解到该问题与连接到我的笔记本电脑的 USB 3.0 设备有关。
以下命令为我解决了这个问题。需要作为root
echo XHC > /proc/acpi/wakeup
该命令看起来确实像在写入文件,但其效果是切换 USB 设备以唤醒系统。
如果您不确定是 USB 唤醒了您的系统,请检查以下内容。
grep enabled /proc/acpi/wakeup | cut -f 1
如果其中一条输出线是XHC
,则意味着问题可能出在 USB 设备上。要测试是否是这种情况,请尝试在断开 USB 设备的情况下暂停。如果您的机器没有自动从暂停状态唤醒,那么问题可能与 USB 有关。