I have a Windows machine connecting to an SMB share on a local Debian server. Everything works flawlessly, when it's connected, but the first connection (either after a boot / reboot, or after resuming from a long sleep) is very slow.
In the screenshot below you can see that it takes ~6.7 seconds for Windows to start setting up the session. I can live with the delay, but this also breaks file descriptors upon waking up, so if I had a media file open before suspending, I'm unable to resume playing it.
How do I fix this? Where do I look?