Question

I have an ssh connection to a linux machine which is hibernated after some non-activity time.

I want to make it resume, how do I do that? (writing to /dev/mouse to simulate mouse movement didn't do the trick)

Was it helpful?

Solution

A machine that is hibernating cannot come out of sleep without pressing the power button, or sending a magic packet if the ethernet adaptor has Wake On Lan (WOL) capability and the motherboard supports that. WOL packets can only be generated on the local network, not remotely from other networks.

-Adam

OTHER TIPS

In addition to what Adam has stated, some motherboards support waking from various states when an interrupt is triggered.

The key here is which state you are referring to as hibernation; are you talking about an extremely low-power mode in hardware, or software hibernation where core memory is written to disk and the machine is turned off completely? If the latter, WOL is the only possibility; if the former, than you can tell your motherboard to watch for interrupts from various sources and you can use some other means to trigger a wake-up.

A good starting point for reading is the Wake-On-LAN article on Wikipedia.

To accomplish WOL you need a few things:

First, check the BIOS of the machine you're waking to see if it supports WOL. If it does, make sure it's turned on.

Then get a program that can send WOL packets:

  • In linux: sudo apt-get install wakeonlan
  • For windows just find one to download using google. There are probably 100 different apps that do it, I don't use Windows so I don't have one to reference.

If you want to receive WOL packets from outside of your local network. Configure your router to forward port 9 to 255.255.255.255 (IP Broadcast-To-All address).

For some really useful info on the WOL protocol as well as a sample capture file that can be loaded in wireshark, see this article.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top