For fun I decided to try to use suspend-to-RAM + Wake-on-LAN to minimize power usage to get this beefy x86 to use less power than the old ARM NAS (which could not unsuspend successfully).
By default WOL is a pain. The eye-fi card uploads photos when the SLR camera is on. Android phone is configured to rsync stuff when it is plugged while connected to home wifi. It’s not convenient to navigate some UI to send a WOL packet (or push a power button) every time I need to perform a backup. Manually deciding when to suspend the machine is also no fun.
In an ideal world WOL would support waking up on IP traffic directed at the machine in question. Typically WOL either wakes up in response to WOL magic packets or ANY ethernet traffic(ugh!). Update: Turns out my nic supports directed wakeups, but the e1000e driver on Linux does not implement them.
who has x.x.x.x queries are broadcast to whole network segment. So my Tomato router can help.
This works as follows:
1 2 3
I wrote an arpwol program for this, I run it via
It listens for arp looking for 192.168.1.149 and fires of a WOL.
It takes 5 seconds for an ssh roundtrip to a sleeping server.
Once the server is awake, it is annoying to have to put it to sleep manually. I wrote a script to monitor
/var/log/auth.log and auto-suspend when active ssh-session count reaches 0.
It great to have an x86 box idle at 1W while unused. Suspend to disk introduces extra latency without saving much more power (due to keeping WOL on).
Please checkout the code on github. WOL magic happens in
arpwake.c and auto-suspend in