Wifi disconnects after sleep and takes long time to reconnect with Mavericks

Since upgrading to Mavericks whenever my MacBook Air goes to sleep (if I leave it idle) the wifi disconnects and it can take up to a minute to reconnect when it wakes.


Basically what happens is, as soon as it wakes I have no internet connection, the WiFi indicator is pulsing, meaning it is searching for networks, but it takes ages to find any, then after some time, usually between 30 secs and a minute all the networks in my building pop up and it instantly at that point reconnects to my WiFi network.


It is incredibly frustrating I was so used to the Mac being an instant on tool, now it takes longer to get on the internet than booting up my windows PC.


Any ideas what might have caused this?

Posted on Oct 28, 2013 4:08 AM

Reply
483 replies

May 16, 2014 9:35 AM in response to bpka

I think they have, they just never seem to really get to the root of the problem. They just keep fixing it for some sub-set of users, and then another sub-set has the problem. I had the problem years ago on and off with various OSX point revisions on a number of laptops (back in the 2005-2007 time-frame). When I got my new 2013 MBA, it had the problem out of the box, as soon as I added a BT Apple Mouse (I used it for a month or so before adding the mouse with zero problems). The problem went away again after one of the Mavericks updates. I'm currently on 10.9.2, so we'll see what happens when I go to 10.9.3 now.

May 16, 2014 1:07 PM in response to seb101

Since this issue was driving me crazy (I use bluetooth alot, with a mouse and headset), I tried to find a fix for it. While it is a hack and in no way official, I think I managed to make one.


I didn't test it extensively, so it might not work perfectly, but from what I tested so far, it seems to fix the issue.


What my solution does, is disable bluetooth before the computer goes to sleep and re-enable it after 5 seconds from waking up from suspend, which give enough time for the wifi to connect without issue.


1. Download Sleepwatcher 2.2 from its website to you website, to your desktop and then run the following commands in a terminal: http://www.bernhard-baehr.de/


$ cd ~/Desktop/

$ sudo mkdir -p /usr/local/sbin /usr/local/share/man/man8

$ sudo cp ~/Desktop/sleepwatcher_2.2/sleepwatcher /usr/local/sbin

$ sudo cp ~/Desktop/sleepwatcher_2.2/sleepwatcher.8 /usr/local/share/man/man8

$ sudo cp ~/Desktop/sleepwatcher_2.2/config/de.bernhard-baehr.sleepwatcher-20compatibilit y.plist /Library/LaunchDaemons/

$ launchctl load /Library/LaunchAgents/de.bernhard-baehr.sleepwatcher-20compatibility.plist


2. Download Blueutil from its website and install it: http://www.frederikseiffert.de/blueutil/


3. Create the 2 sleepwatcher scripts, in the terminal type the following commands and copy this content:


$ vi /etc/rc.sleep

#BEGINING OF /etc/rc.sleep. DO NOT COPY THIS LINE

#!/bin/bash


/usr/local/bin/blueutil off


exit 0

#END OF /etc/rc.sleep. DO NOT COPY THIS LINE


$ vi /etc/rc.wakeup



#BEGINING OF /etc/rc.wakeup. DO NOT COPY THIS LINE

#!/bin/bash


$(sleep 5 && /usr/local/bin/blueutil on) &


exit 0

#END OF /etc/rc.wakeup. DO NOT COPY THIS LINE

4. From the terminal, change the permission of the 2 scripts

$ sudo chmod a+x /etc/rc.sleep

$ sudo chmod a+x /etc/rc.wakeup


5. Now, try to suspend and resume your laptop and everything should work correctly

May 16, 2014 9:33 PM in response to antzcrashing

Yeah, sure will look into creating a thread for this specifically. For the initial release, I didn't include any uninstall function to the script, but will definitely add one soon.


The 2 softwares included are the following:


- Blueutil - Allow bluetooth to be controlled from command line

- SleepWatcher - A daemon that monitor when the system goes to sleep and resume from it. Then, run script depending on the state


There is little risk from try it, and removing it is quite easy.


Here are the uninstall steps:


1. Uninstall blueutil by deleting the binary from /usr/local/bin/

$ sudo rm /usr/local/bin/blueutil


2. Remove SleepWatcher, binary, scripts and documentation

$ sudo rm /usr/local/sbin/sleepwatcher

$ sudo rm /usr/local/share/man/man8/sleepwatcher.8

$ sudo rm /etc/rc.sleep

$ sudo rm /etc/rc.wakeup

$ sudo rm /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher-20compatibility.plist


Nothing get changed on the system, only added, so removing it is as simple as deleting the files that have been added by the install script.


Hope this helps.

May 17, 2014 4:17 PM in response to bpka

bpka,


It would appear there may be multiple causes for this problem. The Bluetooth fix did not solve the problem for me. (I don't use Bluetooth at all) For me, the only solution that has worked consistently is to turn off ipv6 over wifi


[ In terminal: networksetup -setv6off wi-fi ]


( To undo: just turn ipv6 back on in System Preferemces/Network/WiFi.Advanced/TCPIP/ipv6 )


This is the only solution that has worked for me and since I do not need ipv6 support there is no downside for me.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Wifi disconnects after sleep and takes long time to reconnect with Mavericks

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.