Keeping Windows accessible for remote desktop

1

I have a Windows 10 PC that I would like to maintain accessible to remote desktop connections, at all times, no matter what. However, I can't seem to figure out the right combination of settings to achieve that.

Ideally, I would like the computer to be able to sleep, but make itself available on TCP/IP connections, magic packets over Ethernet, etc. I have both WiFi and Ethernet available to me as a means of connecting.

Here are the power management settings for the WiFi card. The device manager properties for the Ethernet has no corresponding "Power Management" tab (does that mean it's always on? no idea!).

Network power settings

  1. Allow the computer to turn this device to save power

    • I want this setting off. Under no circumstances would I like the WiFi card to ever be off, whether the PC is in sleep mode or not. Frankly, I don't understand why anybody would ever want it to be on, the WiFi card probably draws a single watt at max, it's not like there are real energy savings to be had here.
  2. Allow this device to wake the computer

    • I want this setting to be on. However, unchecking the first setting makes it inoperative and greys it out. I think the relationship here is inverted. If the PC is allowed to turn off the device, only then does it make sense to grey out the latter two settings (which couldn't work, because the device would be off.
  3. Only allow a magic packet to wake the computer

    • I would like magic packets to wake the computer, but ideally, I would like any TCP connection to also wake it. So I would like this setting to be off.

My desired setting of (off, on, off) isn't possible. Is there something I'm missing here?

More generally, what can I do to achieve my goal, to have an always-accessible headless PC, that never requires a person to physically turn on or wake up?

For context, I'm basically looking for the equivalent of this single check box on macOS:

It just works

Alexander - Reinstate Monica

Posted 2019-11-24T14:22:20.317

Reputation: 283

Answers

0

Wake on Wireless LAN (WoWLAN) seems to be very badly supported, so your problem may be with the wireless adapter rather than with Windows, meaning hardware rather than software. So let's trace it, both according to the sources and the Windows commands that you may also try out.

The Wikipedia term Wake-on-LAN says:

If the computer being awakened is communicating via Wi-Fi, a supplementary standard called Wake on Wireless LAN (WoWLAN) must be employed.[1]

The reference "[1]" that it points to is the article Wake on Wireless LAN. The Conclusions section at its end says this:

While technically feasible, Wake on Wireless LAN is saddled with severe limitations and lack of industry support. It is doubtful that most organizations could even consider a WoWLAN deployment unless running an environment composed entirely of Intel wireless adapters.

WoWLAN appears to have been a technology that missed wide adoption, but lives on through the learnings it provided. vPro stands ready to fill the gap, but requires newer hardware. I guess it's time to diligently update workstation requirements and purchase accordingly moving forward.

This is for reference checking. So now for some practice on Windows.

My wireless adapter behaves very similarly to yours, except that "Allow this device to wake the computer" is always grayed out in Device Manager.

Checking in the Details tab of the wireless adapter, in the property named "Power data", I can see the supported Power capabilities, where the only wake option is "PDCAP_WAKE_FROM_D0_SUPPORTED". Checking in Microsoft's article DevicePowerEnumDevices function, I find it defined as "The device supports waking from system power state D0". Going now to the article Device Power States I find that "D0 is the fully on state". Not a very useful capability.

My initial conclusion is that my wireless adapter does seem to support WoWLAN, in line with the information from the above article.

Further tests can be done using the powercfg command. The powercfg command can manipulate power settings, and in particular the sub-commands -deviceenablewake and -devicedisablewake can turn on and off "Allow this device to wake the computer".

Checking which devices are capable of doing this is with this command:

powercfg -devicequery wake_from_any

This command gave me a long list of devices, but my wireless adapter was not in it.

As a remark, to list devices that have the option currently enabled, use:

powercfg -devicequery wake_armed

As a last test, I started a Command Prompt run as Administrator and tried to enable the device:

powercfg -deviceenablewake "my wireless adapter"

and got the non-informative error message of:

You do not have permission to enable or disable device wake.

Conclusion: All attempts have failed, all indications are that my wireless adapter does not support WoWLAN. So for my adapter this is a lost cause.

harrymc

Posted 2019-11-24T14:22:20.317

Reputation: 306 093

It doesn't matter how potentially unreliable wireless Wake on LAN is as the OP states: "I have both WiFi and Ethernet available to me as a means of connecting." Why the focus on doing this wirelessly when a more reliable option is available? – Mr Ethernet – 2019-11-24T18:31:39.337

Hey Harry, thanks for your response! It's unfortuantely WoWLAN never took off, it's quite useful. Luckily, I don't necessary need my computer to support turning on from hibernate/fully off, because it's behind a UPS and has the bios configured to always turn on after power failure. I'm okay with having it on 24/7, ideally in sleep mode, so long as it's accessible. That's what I do with my iMac actually, where it can reliably wake up from sleep whether connected over ethernet or WiFi (it just can't turn on from off over WiFi, though) – Alexander - Reinstate Monica – 2019-11-24T19:00:18.560

@Alexander you have wired Ethernet so it doesn't matter how poorly wireless Wake on LAN may or not be supported - you would be using your more reliable wired option anyway. Not sure why he dismisses wireless but then makes no mention of your wired NIC. Regardless, the main problem is that Remote Desktop does not include support for Wake on LAN. You would need to wake your PC using a separate application that's capable of sending a Magic Packet before connecting. Wake on LAN itself works perfectly well when set up properly, which is not difficult to do. – Mr Ethernet – 2019-11-24T19:12:07.040

Deleted my comment here, responding to your answer instead – Alexander - Reinstate Monica – 2019-11-24T19:23:55.633

With no information about the wired adapter, it's impossible to analyze the problem of missing Power Management tab. I answered what was asked. – harrymc – 2019-11-24T19:44:55.930

I don't think the OP wanted to analyze the missing tab so much as just get Wake on LAN working. He was able to ignore the missing tab as the default setting is for WoL to be enabled anyway. Incidentally, the tab was only missing because of the NIC driver currently installed. WoL is working regardless of the missing option in the GUI. – Mr Ethernet – 2019-11-24T19:50:25.430

0

I have a Windows 10 PC that I would like to maintain accessible to remote desktop connections, at all times.

Ideally, I would like the computer to be able to sleep.

Ideally, I would like the computer to be able to sleep, but make itself available on TCP/IP connections, magic packets over Ethernet, etc. I have both WiFi and Ethernet available to me as a means of connecting.

Remote Desktop does not have any built-in remote wake-up capability.

You would need to first use Wake on Lan to wake up the sleeping computer before you could RDP to it.

A sleeping computer's RAM is active but its CPU is not, so Remote Desktop would not work until you first wake the PC from its sleep state.

If you are willing to have to first use a Wake-on-LAN utility to wake your PC remotely, then you must wake it from sleep before connecting via Remote Desktop.

If you want to use Wake on LAN:

1) Connect your target PC via Ethernet.

2) Install a remote wake utility, such as this.

3) Use a remote wake utility to wake your target PC before initiating your Remote Desktop connection.

Wake on LAN works well and is easy to configure, just be sure to use it via Ethernet and not using the a wireless network adapter.

Mr Ethernet

Posted 2019-11-24T14:22:20.317

Reputation: 3 563

I got WoL working, I'm just not sure how reliable it would be. I.e. I tried using WoL a few minutes after sleeping, and it worked. However, I'm not sure if it'll stop working after a long period of time (because idk if there's some timeout before the ethernet card is also turned off). I've read in multiple places that windows can wake up in response to any TCP handshake (which sounds like a no-brainer sensible default, but I digress), but I haven't been able to find any information on setting that up – Alexander - Reinstate Monica – 2019-11-24T19:25:21.560

Good work! No need to worry too much about how reliable it is now; it won't randomly stop working after a period of time. Once you've got it up and running, that's pretty much it. You're good to go! You might want to see how resistant it is to power failures. Try shutting the target PC down then unplugging it for a few minutes to simulate a power failure. Then plug it back in and see if you can wake it remotely again, just to make sure. I recommend choosing "In event of power failure, turn PC on" if the option exists in your BIOS. – Mr Ethernet – 2019-11-24T19:26:20.663

Cool, I'll give that a shot. Luckily the PC is UPS protected, so it shouldn't end up off unless it blue-screens, or the power is off for a while. Have you had any luck in setting up TCP-based wake-ups? – Alexander - Reinstate Monica – 2019-11-24T19:30:02.297

No, not TCP-based wake ups. I only use Magic Packets or pattern match if necessary. The problem with TCP-based wake-ups is that your PC may wake up unexpectedly due to other network traffic. Magic Packets are a very specific type of data that is only sent intentionally by you and, as you can see, it works well! – Mr Ethernet – 2019-11-24T19:36:20.120

1"...because idk if there's some timeout before the ethernet card is also turned off" There's no timeout to worry about - that would defeat the whole point! Look at the LEDs on the back of your NIC: you'll notice that they stay illuminated even when the PC is shut down, which shows you that the network card is wide awake and continuously listening for Magic Packets. Feel free to mark this as the accepted answer if you find that it works reliably. – Mr Ethernet – 2019-11-24T19:54:17.753