guidox / PC

Repair a Network Adapter That Disappears After Sleep

TL;DR

Disable **Allow the computer to turn off this device** on the adapter, update the driver, and check **Disable-NetAdapterPowerManagement**. Code 45 means the device is absent, not broken.

Before you start

Requirements

  • Admin rights
  • The affected machine
  • 20 minutes
Step by step

Instructions

01

Record the state before and after sleep

The adapter's presence changes with the power state. Capturing both states separates a driver problem from a hardware dropout.

Get-NetAdapter -IncludeHidden | Select-Object Name,InterfaceDescription,Status,LinkSpeed
Get-PnpDevice -Class Net | Select-Object FriendlyName,Status,Problem
Get-NetAdapterPowerManagement -Name 'Wi-Fi' -ErrorAction SilentlyContinue | Format-List
02

Reproduce it deliberately

A sleep cycle of 30 seconds is enough. After waking, the adapter that reports **Not Present** in Device Manager is the one to work on.

rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Start-Sleep -Seconds 20
Get-NetAdapter -IncludeHidden | Select-Object Name,Status,MediaConnectionState
Get-PnpDevice -Class Net | Select-Object FriendlyName,Status,Problem
03

Turn off the power saving on the device

**Disable-NetAdapterPowerManagement** removes the checkbox that allows Windows to switch the adapter off. The setting is per adapter and survives reboots.

Disable-NetAdapterPowerManagement -Name 'Wi-Fi' -NoRestart
Get-NetAdapterPowerManagement -Name 'Wi-Fi' | Select-Object AllowComputerToTurnOffDevice
Get-NetAdapterAdvancedProperty -Name 'Wi-Fi' | Where-Object DisplayName -match 'Power|Wake' | Select-Object DisplayName,DisplayValue
04

Fix the PCI power policy for the slot

On some laptops the adapter is switched off at the PCIe link level, below the driver. **SelectiveSuspend** and the per-device power settings control that layer.

Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\*' -ErrorAction SilentlyContinue | Select-Object PSChildName,PnPCapabilities
powercfg /devicequery wake_armed
powercfg /devicedisablewake 'Intel(R) Wi-Fi 6 AX201 160MHz' 2>$null
05

Replace the driver rather than restart it

A driver that fails to reinitialize after resume needs reinstalling, not disabling. Remove the device with its driver, then scan for hardware changes.

Get-NetAdapter -Name 'Wi-Fi' | Select-Object DriverVersion,DriverDate,DriverFileName
pnputil /enum-drivers | Select-String -Pattern 'netwtw|Netwtw' -Context 0,3
# Device Manager > adapter > Uninstall device > tick Delete the driver software > Scan for hardware changes
06

Prove the fix with three sleep cycles

One successful resume means little. Three cycles, each with a working connection and a valid address, is the evidence that the change held.

for ($i=1; $i -le 3; $i++) { rundll32.exe powrprof.dll,SetSuspendState 0,1,0; Start-Sleep -Seconds 25; Get-NetAdapter -Name 'Wi-Fi' | Select-Object Status,LinkSpeed; Get-NetIPAddress -InterfaceAlias 'Wi-Fi' -AddressFamily IPv4 | Select-Object IPAddress }
Troubleshooting

Common issues

Device Manager shows code 45

The device is not connected right now. That is expected for a USB adapter that was unplugged; for a built-in one it means the bus dropped it, usually power related.

The adapter is missing entirely after resume

The firmware or the PCIe link powered it down. Update the firmware and the chipset drivers before changing Windows settings.

Wi-Fi works but Ethernet does not after sleep

Check the Ethernet adapter's own power settings; the two devices have separate power management entries.

Disable-NetAdapterPowerManagement fails

The adapter driver does not expose the setting. Use the Device Manager power management tab or the vendor's own tool.

FAQ

Frequently asked

Does this increase battery drain?

Slightly, because the adapter stays powered during sleep. On a laptop that is a trade for a network that survives resume.

Is a driver reinstall risky?

Keep the current driver installer before you delete it. Windows can also reinstall from Windows Update if the vendor package is unavailable.

Could fast startup be the cause?

Yes. A full shutdown with fast startup is a hybrid resume; testing a real restart separates the two.

How to undo this

Re-enable the setting with Enable-NetAdapterPowerManagement -Name 'Wi-Fi' and reinstall the previous driver package if the new one caused the issue.

Changelog · 1 entry
  1. 2026-11-01
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress