Tuesday 28 October 2014

Wake-on-Lan issues with Intel PRO Series NIC

Over the last few months I was experimenting with setting up my ham-radio station for completely remote operation, so once the rare DX comes on air I can work it regardless of where I am at the time.

The idea seems simple but this means that for a start I need to be able to remotely turn on and off all of the devices. Leaving the design itself for another post, the core element of my remote control concept is rather old ThinkPad x60s laptop. This one comes with Intel PRO/1000 Ethernet NIC and I want to use WoL to boot it up remotely.

What is WoL?
It's a simple way to turn on a machine connected to the network by sending it a single ethernet packet. Very useful if you want to boot up a machine for out-of-hours maintenance run or something similar - like in my case.

WoL works great but only once, so after you shut down the OS there's no way to do remote start again. This is something that many have encountered judging by the amount of forum posts and questions asked about the same issue.

Once I wasted more time than I should on trying to figure out what's going on, the fix turned out to be "trivial". Lesson learned for sure.

When I say WoL works only once, I mean it works for the first time since the laptop has a power supply connected to it (WoL is not available at all if power supply is disconnected). The WoL packet is sent from the firewall, machine boots up into Windows 7, I connect to it and do what needs to be done, then shut it down remotely... and WoL no longer works - very annoying!

Some people reported it happens also if the machine goes to sleep for longer than certain amount of time, so clearly that would be related to power management and sleep modes, however WoL should still work... in theory.

Of course WoL has to be enabled in BIOS. Then the OS has to support it as well, because OS can change the configuration of the device once it boots up. This OS (mis)configuration is of course a plausible reason for WoL to stop working after OS booted up and can also explain why only removing power supply restores it back to working state (electrical power-down of the NIC controller).

Browsing the net for possible solutions I came across this forum post that brings up an interesting tool called powercfg. Two most useful flags in our case are wake_programmable and wake_armed.

More digging found me this PDF detailing advanced settings of Intel PRO Series NICs. As it turned out, all that's actually needed is to change two options and WoL starts working just fine.

Go to the Device Manager and display properties of the network adapter, go to the Advanced tab and change Enable PME and Wake on Settings options. Please see the PDF for detailed information on what they mean.


That's all - worked for me :-)
Good luck!

No comments:

Post a Comment