Jamie's Blog

Ruby developer. CTO. Swimmer. Always trying to write more

Wake up your PC to save energy

I occasionally need to access my work PC from home/elsewhere but my green sensibilities thinks it’s daft to have the PC on full power 24 hours a day for such an occasional requirements. I usually have it go to Standby after 15mins and hibernate after 30. Today I found some working “Wake-on-LAN” software and, after playing around for about 30mins, got my laptop to wake up my work PC. Basically, you need to have the network card setup, the BIOS option enabled, the firewall sorted to allow UDP packets on port 7, the right sort of network architecture and figure out your PC’s MAC address/subnet mask… and then you can use Wake-on-LAN. For me, the key discovery was that the laptop needs to use the VPN to appear on the same LAN as my work PC, rather than just the departmental wireless network. Basically, I can now use a simple GUI or cmd line like

wolcmd <MAC address> <IP address/domain name> <subnet mask> <port>
to wake up my office PC from home, and then VNC into once it has booted up.

Anyway, if Wake-on-LAN technology was deployed more widely I bet we could turn off many more of the office PC’s that are wasting energy in the middle of the night.

Edited to add: you’ll need to setup the network adapter so that it doesn’t wake up for any random thing that’s sent to it. This seems to do the trick for me: