I have been struggling with an issue for 2 months. After Debian resumes from sleeping, I immediately get a password prompt and the desktop appears as expected.
In my fstab I have to lines that connect to shares on a windows machine.
If I mount them manually or with mount -a, they connect almost immediately.
However, if the machine has been asleep it takes almost exactly 120 seconds for them to reconnect.
During that time, anything that requires disk access, whether to a remote volume or a local disk appears to freeze until the shares come online.
I have tested this by
1) eliminating all mounts from fstab except /root and /boot - system resumes immediately
2) add in mounts for 2 locally connected usb disks - system resumes immediately
3) add in one cifs mount - all disk access (such as launching a file manager) pauses for 2 minutes until the share is on line.
- It is not motherboard related - tried on different brands
- It is not NIC related - happens with both intel and realtek NICs
- It is not OS related (strictly) as it also happens in Fedora but Debian is my preferred system and I only tried Fedora as a test of this issue. Windows has not problems of this sort when resuming.
- I have tried things like adding x-systemd.automount to the fstab - it makes no difference
This leaves me, as a novice, with two questions:
1 - What is it about reconnecting to windows shares that takes so long? especially since they initially connect quickly.
2 - What can I do to speed up the process?
I hope that someone who is more expert than I can answer these questions. It would be a big help.
Thank you
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Networking] Windows shares take 2 minutes to reconnect after linux resumes
- FreewheelinFrank
- Global Moderator
- Posts: 2111
- Joined: 2010-06-07 16:59
- Has thanked: 38 times
- Been thanked: 231 times
Re: [Networking] Windows shares take 2 minutes to reconnect after linux resumes
I suspect that it is exactly 120 seconds, because this is the period cifs will wait before reconnecting if the server has not responded.
I would also suspect that the reason the server does not respond is that the internet connection is not up yet when the attempt is made.
There seems to be an switch for cifs mounts in fstab which delays mounting until the network has been enabled: _netdev. Do you have this in your fstab mount line for the share?
https://askubuntu.com/questions/854199/ ... untu-14-04
https://askubuntu.com/questions/268121/ ... ifications
If this is not the explanation, please post the mount line so that members with networking experience can have a look. My answer is just based on a guess and a web search.