这个问题涵盖了计算机在挂起后可能立即唤醒的一个原因: 如何防止从挂起和/或休眠状态立即唤醒?
我似乎有一个不同的。在 Ubuntu 11.04 - Natty Narwhal 上最近更新安全补丁后,机器在挂起后立即唤醒。相关日志行似乎是:
Oct 5 09:01:02 hardhat kernel: [585671.422973] PM: Syncing filesystems ... done.
Oct 5 09:01:02 hardhat kernel: [585671.475283] PM: Preparing system for mem sleep
Oct 5 09:01:02 hardhat kernel: [585671.475399] Freezing user space processes ... (elapsed 0.01 seconds) done.
Oct 5 09:01:02 hardhat kernel: [585671.490593] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Oct 5 09:01:02 hardhat kernel: [585671.510542] PM: Entering mem sleep
Oct 5 09:01:02 hardhat kernel: [585671.510558] Suspending console(s) (use no_console_suspend to debug)
Oct 5 09:01:02 hardhat kernel: [585671.511061] sd 1:0:1:0: [sdc] Synchronizing SCSI cache
Oct 5 09:01:02 hardhat kernel: [585671.511124] sd 0:0:1:0: [sdb] Synchronizing SCSI cache
Oct 5 09:01:02 hardhat kernel: [585671.511193] sd 0:0:1:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Oct 5 09:01:02 hardhat kernel: [585671.511200] pm_op(): scsi_bus_suspend+0x0/0x20 returns -5
Oct 5 09:01:02 hardhat kernel: [585671.511203] PM: Device 0:0:1:0 failed to suspend async: error -5
Oct 5 09:01:02 hardhat kernel: [585671.511296] sd 1:0:1:0: [sdc] Stopping disk
Oct 5 09:01:02 hardhat kernel: [585672.039397] PM: suspend of drv:sd dev:1:0:1:0 complete after 529.213 msecs
Oct 5 09:01:02 hardhat kernel: [585672.039486] PM: Some devices failed to suspend
Oct 5 09:01:02 hardhat kernel: [585672.039507] sd 0:0:0:0: [sda] Starting disk
Oct 5 09:01:02 hardhat kernel: [585672.039696] sd 0:0:1:0: [sdb] Starting disk
Oct 5 09:01:02 hardhat kernel: [585672.039776] sd 1:0:1:0: [sdc] Starting disk
Oct 5 09:01:02 hardhat kernel: [585672.039839] sd 0:0:1:0: [sdb] START_STOP FAILED
Oct 5 09:01:02 hardhat kernel: [585672.039843] sd 0:0:1:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Oct 5 09:01:02 hardhat kernel: [585672.039853] pm_op(): scsi_bus_resume_common+0x0/0x60 returns 262144
Oct 5 09:01:02 hardhat kernel: [585672.039861] PM: Device 0:0:1:0 failed to resume async: error 262144
Oct 5 09:01:02 hardhat kernel: [585673.533456] PM: resume of drv:sd dev:1:0:1:0 complete after 1496.158 msecs
Oct 5 09:01:02 hardhat kernel: [585673.533550] PM: resume of drv:scsi_device dev:1:0:1:0 complete after 1496.242 msecs
Oct 5 09:01:02 hardhat kernel: [585673.533557] PM: resume of drv:scsi_disk dev:1:0:1:0 complete after 1496.157 msecs
Oct 5 09:01:02 hardhat kernel: [585673.533645] PM: resume of devices complete after 1496.634 msecs
Oct 5 09:01:02 hardhat kernel: [585673.533782] PM: resume devices took 1.500 seconds
Oct 5 09:01:02 hardhat kernel: [585673.533801] PM: Finishing wakeup.
答案1
嗯,sd 0:0:1:0 很可能是不支持挂起的 USB 驱动器。不用时只需将其移除即可。