我正在运行一个 Debian-Jessy 服务器,它在几个小时网络不活动后进入 S3 睡眠模式(我制作了一个小 bash 脚本,每两个小时使用 crontab 检查一次)。暂停几秒钟后,它再次唤醒。几个小时后,当我的脚本由于网络不活动而再次触发 pm-suspend 时,它会暂停并且不会再次唤醒。唤醒它的唯一方法应该是 WOL (wake-on-lan)。
我能做些什么?
编辑:这可能与 WOL 包有关,因为我发现有人报告同样的问题: https ://bbs.archlinux.org/viewtopic.php?id=173596
http://ubuntuforums.org/showthread.php?t=2233674
https://bugzilla.kernel.org/show_bug.cgi?id=46421
这是我的脚本的示例日志:
---------------------------------------
Sun Nov 23 02:00:01 CET 2014
No activity; Suspending now!
#######################################
Sun Nov 23 02:00:02 CET 2014
pm-suspend
#######################################
Sun Nov 23 02:00:15 CET 2014
pm-resume
---------------------------------------
Sun Nov 23 06:00:01 CET 2014
No activity; Suspending now!
#######################################
Sun Nov 23 06:00:01 CET 2014
pm-suspend
#######################################
Sun Nov 23 16:32:14 CET 2014
pm-resume
如您所见,它立即再次唤醒。但第二次,它成功挂起。
我禁用了 proc/acpi/wakeup 中的所有设备:
Device S-state Status Sysfs node
CIR S3 *disabled
PS2K S4 *disabled
PS2M S4 *disabled
UR11 S4 *disabled pnp:00:07
UR12 S4 *disabled pnp:00:08
USB1 S3 *disabled
RP01 S4 *disabled pci:0000:00:1c.0
BR11 S4 *disabled
RP02 S4 *disabled
RP03 S4 *disabled pci:0000:00:1c.2
RP04 S4 *disabled pci:0000:00:1c.3
RP05 S4 *disabled
RP06 S4 *disabled
RP07 S4 *disabled
RP08 S4 *disabled pci:0000:00:1c.7
GLAN S4 *disabled
EHC1 S4 *disabled pci:0000:00:1d.0
EHC2 S4 *disabled pci:0000:00:1a.0
XHC S4 *disabled pci:0000:00:14.0
HDEF S4 *disabled
PEG0 S4 *disabled
PEGP S4 *disabled
PEG1 S4 *disabled
PEG2 S4 *disabled
有没有办法确定是什么导致了唤醒?为什么服务器第二次挂起成功?
我在 pm-suspend 日志中启用了调试模式并查看了 syslog,但我找不到任何有趣的信息。
系统日志: http: //pastebin.com/U963DccX
带调试的 pm-suspend.log:
Sun Nov 23 02:00:02 CET 2014: performing suspend
+ sync
+ do_suspend
+ echo -n mem
+ date
+ log Sun Nov 23 02:00:15 CET 2014: Awake.
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ Sun Nov 23 02:00:15 CET 2014: Awake. = -n ]
+ printf %s\n Sun Nov 23 02:00:15 CET 2014: Awake.
Sun Nov 23 02:00:15 CET 2014: Awake.
+ date
+ log Sun Nov 23 02:00:15 CET 2014: Running hooks for resume
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ Sun Nov 23 02:00:15 CET 2014: Running hooks for resume = -n ]
+ printf %s\n Sun Nov 23 02:00:15 CET 2014: Running hooks for resume
Sun Nov 23 02:00:15 CET 2014: Running hooks for resume
感谢您的时间!