1

I am having an issue with my Windows desktop PC, which uses a wired internet connection. Windows 10 and Windows 11 both have this same issue: After recovering from sleep mode, the internet adapter has simply turned off, and will not turn on again until Windows Network Diagnostics has given it a wake up slap. Below is the window that seems to be the consistent result from running the troubleshooter:

Issue with internet adapter

Since this issue occurs literally every single time, it's not much of a mystery anymore that this might occur, so ideally I'd just automatically have this issue resolve itself, instead of having to go to the troubleshooting interface every single time. I'd like to tell the network adapter to simply never go to sleep, or to wake up along with the rest of the OS (the latter being preferred). From what I can tell after some googling with the issues I'm having, the solution would be to go to device manager, select the 'power management' tab in the network adapter's properties, and disable turning off on sleep. However, as you can see in the following image, this is not available on my network adapter's driver:

No network adapter power management

Ideally, of course, the network adapter does turn off when the computer is sleeping, but then turns back on when the PC wakes up again.

So my question is: How can I make my network adapter automatically turn back on after sleep, or otherwise, how can I prevent my network adapter from going to sleep in the first place, if there is no power management option in the adapter interface?

joeytje50
  • 320

2 Answers2

1

Work-around: Try restarting the network adapter using PowerShell.

  • Use Get-NetAdapter to list the network adapters.

  • Note the Ethernet adapter name.

  • Use Restart-NetAdapter to restart the adapter (must be run as Administrator).

    E.G. If the adapter name is Ethernet 1, then the command is,

    Restart-NetAdapter -Name "Ethernet 1"

That PowerShell script could be run manually with a shortcut to the PS1 script, set to run as Administrator (easy, but a nuisance to do each time), or create a Window Scheduled Task on wake.

0

The way I solved it was based on the accepted answer, but to provide more detail and easier reproducability I'll provide some more info here.

In Task Scheduler, I clicked Create task, and in the General tab, I set it to run as myself (click Change User or Group, if needed), and I checked the following security options:

  • Run whether user is logged on or not
  • Do not store password. The task will only have access to local computer resources.
  • Run with highest privileges

Then in the Triggers tab, I set it to trigger On workstation unlock, and On an event:

  • Select Basic event
  • Log: System
  • Source: Power-Troubleshooter
  • Event ID: 1
  • Ensure Enabled is checked.

In the Actions tab, enter Start a program, and fill in the following program:

  • Program/script: powershell
  • Add arguments (optional): -NonInteractive -ExecutionPolicy Bypass -command C:\fixinternet.ps1

Then create the C:\fixinternet.ps1 file, containing just a single line:

Restart-NetAdapter -Name "Ethernet 3"

Here the name should be the name of the network adapter that appears in your Network Troubleshooter whenever your internet is down. I have tried some things getting this to work without some single-line file, but I didn't manage to get anything to work that way.

Other than that, I don't think I changed anything about the other three tabs in the task's properties interface, and I also don't think those settings matter for proper functioning.

Here is a link to a pastebin containing a slightly censored version of the export of the task I generated. Importing this might work, although I haven't tested it (also, you'd have to change the selected user to run it as, because I censored that).

Hope this helps!

joeytje50
  • 320