All Network drives showing error after sleep


tony359

Active member
Local time
10:00 AM
Posts
29
OS
Windows 10
Hi all,

As in the subject, I have a number of network drives on my laptop. When I open the lid after some sleep (S0 unfortunately) ALL the previously open explorer windows which were showing a network drive show a connection error. I have to acknowledge all those dialogues before I can close those windows. If I access those drives from a new window, they work. So it seems that Windows doesn't handle sleeping very well: it doesn't seem to give the network a few seconds to reconnect when I open the lid before deeming the drives as "unavailable".

Is this by design or is there something I can do? It's quite frustrating.
Thanks a lot!
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    Ryzen 5800X
    Motherboard
    MSI B550 Tomahawk
    Memory
    32GB
    Graphics Card(s)
    RTX 3070
I don't believe there's a solution to your problem, but I have a technical explanation. File sharing (or SMB) is handled over TCP connections.

TCP is a stateful connection, and when your PC is sleeping too long, the other network device (PC or NAS) doesn't hear back and invalidates the session on their end. After waking up, a number of your previously opened TCP sessions (in general) will end up being disconnected.

Explorer has an option to reconnect network drives every time you logon, but this feature isn't extended to when your PC goes into sleep mode (you're still logged on while asleep).
 

My Computer

System One

  • OS
    Windows 7
Have you tried Group Policies:

Computer Configuration > Administrative Templates > System > Power Management > Sleep Settings > Allow network connectivity during connected-standby (on battery)

Computer Configuration > Administrative Templates > System > Power Management > Sleep Settings > Allow network connectivity during connected-standby (plugged in)

Set them both to Enabled

Also make sure your network adapters don’t get put to sleep via device manager
 

My Computer

System One

  • OS
    Windows 11 Pro
Thanks Garlin
I imagined something like that - it just feels weird that network drives are having those glitches in 2025. On my Desktop I have my Documents/Pictures/Music libraries on my NAS and a few apps still don't like that. I have an empty account on my PC without network drives to install apps which complain about that.
A notable one is icloud for windows: it just doesn't work as it refuses to use a "removable drive" and Apple didn't bother to allow the user to change the saving location. There is no solution for that besides giving up the network drives.

@dacrone
Thanks. Though that will make S0 even more "awake". I'm already super-annoyed by the laptop "sleeping" with the fans on and software notifications when closed. If I tell W11 to keep the network on while sleeping, at that point I could just keep the laptop on altogether! What I was hoping was a "try restoring network connections when waking up before immediately throw out an error!" option! :)

From what Garlin says, it sounds like the protocol needs an update to allow for this situation. Which I understand it's never going to happen or not quickly.

Thanks both.
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    Ryzen 5800X
    Motherboard
    MSI B550 Tomahawk
    Memory
    32GB
    Graphics Card(s)
    RTX 3070
I see the same issue with a NAS drive and usually all I need do is open a new File Explorer instance, also rather than reboot a computer I'll use Task Manager and Restart File Explorer.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
@dacrone
Thanks. Though that will make S0 even more "awake". I'm already super-annoyed by the laptop "sleeping" with the fans on and software notifications when closed. If I tell W11 to keep the network on while sleeping, at that point I could just keep the laptop on altogether! What I was hoping was a "try restoring network connections when waking up before immediately throw out an error!" option! :)
if your fans are running and you are getting notifications, then its not in 'sleep' anyways. but if all you want is to disable that error message, try:

Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider
DWORD = "NetworkProvider"
Value = "0"

log out and login again
 

My Computer

System One

  • OS
    Windows 11 Pro
From what Garlin says, it sounds like the protocol needs an update to allow for this situation. Which I understand it's never going to happen or not quickly.
It's more of a left hand/right hand issue.

Part of the Windows team is busily working on adding all sorts of new power "optimization" schemes, along with HW partners in the guise of green energy. When Windows wakes from sleep or hibernation, there are system event notifications created. The problem is the Explorer team isn't taking advantage (or working with the other teams) to use wake notifications to auto-refresh open network shares.

In the ideal world:
Wake from sleep -> notification -> reconnect network shares -> refresh Explorer view (because shares may changed since I was asleep)

Maybe one day a Windows PM might realize this...
 

My Computer

System One

  • OS
    Windows 7
I see the same issue with a NAS drive and usually all I need do is open a new File Explorer instance, also rather than reboot a computer I'll use Task Manager and Restart File Explorer.
I don't need to reboot - what I am saying is that if I close the lid with 5 Explorer windows open on a Network folder, when I wake up the laptop I'll have 5 dialogues informing me of the connection being lost and each one will need a click to go away.


if your fans are running and you are getting notifications, then its not in 'sleep' anyways. but if all you want is to disable that error message, try:

Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider
DWORD = "NetworkProvider"
Value = "0"

log out and login again
I've asked on this forum before and unfortunately it's how S0 works on my laptop. Windows/Lenovo decide how much to sleep but if the laptop is connected to power, I can hear Whatsapp notifications or USB devices being plugged/unplugged when the lid is closed and I often find the laptop with the fans on after 12 hours of "sleep". It's how S0 works on my laptop unfortunately. S3 is not available.

On battery, it's much more conservative and it actually goes to sleep! I wish there was an option to tell Windows to do that all the time.

Thanks for the registry hack - I believe I tried that already but I have a feeling that that only applies at sign-in, not after sleep. Thanks, I'll try again.


It's more of a left hand/right hand issue.

In the ideal world:
Wake from sleep -> notification -> reconnect network shares -> refresh Explorer view (because shares may changed since I was asleep)
Yes, that is what I would expect. I don't think it's too much in 2025 but hey :)
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    Ryzen 5800X
    Motherboard
    MSI B550 Tomahawk
    Memory
    32GB
    Graphics Card(s)
    RTX 3070
I don't need to reboot - what I am saying is that if I close the lid with 5 Explorer windows open on a Network folder, when I wake up the laptop I'll have 5 dialogues informing me of the connection being lost and each one will need a click to go away.

I've asked on this forum before and unfortunately it's how S0 works on my laptop. Windows/Lenovo decide how much to sleep but if the laptop is connected to power, I can hear Whatsapp notifications or USB devices being plugged/unplugged when the lid is closed and I often find the laptop with the fans on after 12 hours of "sleep". It's how S0 works on my laptop unfortunately. S3 is not available.

On battery, it's much more conservative and it actually goes to sleep! I wish there was an option to tell Windows to do that all the time.

Thanks for the registry hack - I believe I tried that already but I have a feeling that that only applies at sign-in, not after sleep. Thanks, I'll try again.
1742672644950.webp
you're referring to this dialog, correct?
2 easy solutions you could implement, if you really dont want to close those every time...

1) create a scheduled task to restart explorer at unlock
or
2) create a batch to disconnect and reconnect mapped drives and schedule it to run at unlock
 

My Computer

System One

  • OS
    Windows 11 Pro
I need to check, I'm not sure it says "the name is already in use", I think it just says that the connection was lost.

thanks for the suggestions. I was hoping there was a proper way in Windows to avoid that behaviour. Once I clear the errors, the already open windows do work - I don't need to close them or reconnect or reboot. So if there is no proper solution, I'll live with the error messages.
I hope MS one day stops investing money in adding lipstick to the OS and actually make it a bit better.
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    Ryzen 5800X
    Motherboard
    MSI B550 Tomahawk
    Memory
    32GB
    Graphics Card(s)
    RTX 3070
I need to check, I'm not sure it says "the name is already in use", I think it just says that the connection was lost.

thanks for the suggestions. I was hoping there was a proper way in Windows to avoid that behaviour. Once I clear the errors, the already open windows do work - I don't need to close them or reconnect or reboot. So if there is no proper solution, I'll live with the error messages.
I hope MS one day stops investing money in adding lipstick to the OS and actually make it a bit better.
i could write an autohotkey script that will run in your system tray and close those dialog popups by the title name...
 

My Computer

System One

  • OS
    Windows 11 Pro
Thanks. Though that will make S0 even more "awake". I'm already super-annoyed by the laptop "sleeping" with the fans on and software notifications when closed.
speaking of this, try this:
plug your lapto in, and run command prompt:
Code:
powerconfig /a
you should see "Standby (S0 Low Power Idle) Network Connected", correct?

then unplug your laptop and run command prompt:
Code:
powerconfig /a
you should see "Standby (S0 Low Power Idle) Network Disconnected", correct?

so, set your lid close action to Sleep. have your laptop plugged in. unplug the power from your laptop, give it a few seconds, then close the lid and see if it actually sleeps.
 

My Computer

System One

  • OS
    Windows 11 Pro
I'll try, thanks.
When on battery, it actually sleeps. I think it disables most things to preserve the battery. When plugged in, it thinks it can waste energy and do updates, keep everything running etc.

I'd love for Windows to have an option to tell the laptop to ALWAYS sleep the way it sleeps when on battery even with power connected!

I'll check what you suggest the next time I am close to the laptop, thanks! When you say "plug" and "unplug", you mean the power cable?
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    Ryzen 5800X
    Motherboard
    MSI B550 Tomahawk
    Memory
    32GB
    Graphics Card(s)
    RTX 3070
I'll try, thanks.
When on battery, it actually sleeps. I think it disables most things to preserve the battery. When plugged in, it thinks it can waste energy and do updates, keep everything running etc.

I'd love for Windows to have an option to tell the laptop to ALWAYS sleep the way it sleeps when on battery even with power connected!

I'll check what you suggest the next time I am close to the laptop, thanks! When you say "plug" and "unplug", you mean the power cable?
correct. you can have it plugged in, unplug the power cable from the laptop, close the lid, wait a few seconds for it to go into sleep, and then plug it back in if you want. should stay asleep. Microsoft has slowly been erasing the ways to disable modern standby for a while. used to be a setting, then had to go through cmd, then registry change and now the only known way is the power cable trick
 

My Computer

System One

  • OS
    Windows 11 Pro
Back
Top Bottom