Something's gone wrong!An error ocurred performing that action. Please try refreshing the page.

Wake on LAN revisited

By Katy Nicholson, posted on 15 August, 2020

If only it were as simple as a BIOS setting any more!

A couple of years ago I wrote about the pain of getting Wake on LAN to work on HP switches. While this got some of my machines to work, there was still quite a large proportion (about 60%) that weren't playing ball.

I've finally had a bit of time to look into this, so here's everything I've gone through to get a lot more of the PCs powering up on command. Of course there will always be some PCs which just refuse to work (we have some Gigabyte H81M based machines where they just don't Wake on LAN - whatever you do the LAN link drops when the power is turned off), and some older H61M based machines that are a bit hit and miss.

Wake on LAN works by sending a "magic packet" to either the broadcast (255.255.255.255) or subnet broadcast (e.g. 10.210.164.255) addresses. These packets contain the MAC address of the PC they are destined to wake - since they should be received by all devices the receiving device can filter out any requests for other PCs.

Enable Wake-on-LAN in the BIOS

Might be an obvious one but it needs enabling in the BIOS. Sometimes this is literally called "Wake on LAN", on our newer ASUS boards it's under Power Management settings and called "Power on by PCI-E". If there's a setting as to whether you want wake up events handled by the OS or the BIOS set this to BIOS.

If there's no settings for WoL or power on/resume from S5 by network/PCI-E devices then you've probably got one of the awkward PCs that just won't support it.

Disable fast startup

With Fast Startup enabled, Windows 10 doesn't shut down properly but goes into a sort of hibernation state (but not the same as Hibernate). If we turn this off, it powers down properly and Wake on LAN is more likely to work.

This is controlled via a registry setting:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power\HiberbootEnabled = 0

You can set this through group policy preferences or a Config Mgr Compliance Configuration item.

Allow the NIC to wake the computer

These three settings need to be enabled.

In the network interface properties, under Power Management, there are three settings - all these need to be ticked. You can force this through a Config Mgr Compliance Configuration item, I've exported it here. I can't remember where I got this from but if its original author gets in touch I will credit/link back.

Have a look for any other manufacturer specific settings

For my HP EliteDesks I had a search about on the Internet and discovered they also need the following registry setting:

HKLM\SYSTEM\CurrentControlSet\Services\NDIS\Parameters\AllowWakeFromS5 = 1

This is described as a "HP registry setting" so might only be relevant for HP (although the network cards onboard these PCs are actually Intel). I push this setting out with a Group Policy Preferences item, although you could use a Config Mgr Compliance Configuration item.

Check your switch configuration

If you have a large network with multiple subnets, VLANs etc you need to make sure your core switch/router is forwarding subnet broadcasts. I covered this previously for HP switches.

How do I know if it's the switch or the PC playing up?

Probably the quickest way is if you have a different make/model PC on the same switch which will wake on LAN without issue.

With my HP EliteDesks I ended up installing Network Monitor 3.4 on one of them, and running a capture with the filter udp.port == 9, and then sent Wake on LAN packets by using Recast's Right click Tools in Config Mgr. These were showing up as being sent to the subnet broadcast address, and being received by the PC - I sent packets to the other nearby PCs and these also showed up, proving that the subnet broadcast is working. If nothing was showing up it would prove that the fault lies somewhere with the switch/network.

Magic packets are showing up here - so why's it not powering up?

Make sure you're using the right network drivers

These last couple of settings are missing on the Microsoft version of the driver

Some of the drivers that Windows 10 automatically installs (those that say "Provided by: Microsoft" in the properties) are slightly cut-down versions that don't support Wake on LAN. I had this problem with a set of HP EliteDesk 800 G1 PCs which just refused to power up despite everything else being correct. Swapping for the official driver downloaded from HP and suddenly they were powering up on command.

Of course if you've got a room full of PCs that now need a different driver, and you've already re-imaged them, you need a scripted way to update the driver. Here the Powershell Scripts section of Config Mgr comes to the rescue - I put the required driver on a network share and set up a script:

pnputil -i -a \\path\to\network\driver.inf

Then ran this on all the HP EliteDesk PCs from Config Mgr and the drivers updated. Tested by shutting them down and then waking up through the Right Click Tools menu.

In this post

Support My Work

I hope you find my content useful. Please consider tipping to support the running costs of hosting, licensing etc on my Ko-fi page.

Support me on Ko-fi

Search