Fix for a Mac Disconnecting from Wi-Fi After Sleep Wake
A fair amount of Mac users have encountered an issue where their Mac will immediately disconnect from wi-fi networks after waking from sleep, forcing users to rejoin a wireless network constantly. This is obviously pretty frustrating, but it’s usually easily remedied with a few adjustments to the Network Preferences in OS X.
If your Mac is disconnecting from wireless networks upon waking from sleep, try the following steps to resolve the issue. Before beginning, you’ll probably want to be sure you have the appropriate wifi router passwords handy so that you can reconnect to the networks quickly.
- Go to the Apple menu and choose System Preferences, then go to the “Network” panel
- Selecting Wi-Fi from the left side menu, click on the “Advanced” button in the corner
- Click into the “Preferred Networks” box and hit Command+A to Select All, then click the [-] minus button to remove all wi-fi networks – there is no confirmation it just happens instantly
- Click “OK” to set that change
- Back at the Network preference panel, pull down the “Locations” menu and choose “Edit Locations”
- Click the [+] plus button to add a new network location, give it some name
- Choose “Done”, then back at the Network panel again join the wi-fi network you want to connect to and enter the login details as usual
- Choose “Apply” to set the changes and close out of System Preferences
At this point the Mac should have no issue staying connected to the wireless router when woken from sleep, behaving as intended.
For a quick breakdown of what’s going on here: the first step forgets previously connected wi-fi networks in bulk – this means no network will automatically join and you’ll need to re-join them on your own in the future again. The second step of creating a new network location builds new preference settings that won’t have any old conflicting details, a similar action to deleting the Wi-Fi Network preference files (which, by the way, is another common solution to many networking issues in OS X). Assuming all steps are followed, the Mac will stick to the networks as intended and you’ll be reliably back to work again each time the Mac is woken from sleep.
This seems to happen most often on MacBook Air and MacBook Pro computers, since they are commonly put to sleep for travel purposes as they are toted around, whereas desktop and Macs centered around a stationary location tend to be left turned on. Why the wireless networks drop upon wake to begin with is a bit of a mystery, but with a fairly easy solution it shouldn’t be much of a problem if you happen to encounter it again.
If you’re still having issues, the tried and true approach of ditching network preferences and rebooting the Mac will often do the trick as well.
I fixed it with a script (toggle_wifi.sh as below) that turns wifi off/on on wake.
networksetup -setairportpower en0 off
networksetup -setairportpower en0 on
I use sleepwatcher (installed via brew) to call this script on wake.
brew install sleepwatcher
nohup sleepwatcher -w ./toggle_wifi.sh > /dev/null 2>&1 &
Thanks it works for me, on my old Mac Book with OS El Capitan
Did not solve it for me. When I created the new network it claimed to not have an IP Address!! so will see if simply re-ordering the list will help keep connected. Drops wifi even when watching YouTube videos. Been an Apple user since 1994… this is the last I’ll be buying. This issue is just the tip of the iceberg IMO
Solved my Problem!!
Thanks for the article
Solution seems to work for some people, not for others. My enchantment with Apple is over, they let too many things undone in much of their work…especially iTunes.
Doesn’t work, I’m fed up with Apple and their complicated issues which cost us more than need. I’m getting rid of all Apple products, After Steve Jobs is gone this company remain as a showoff product with useless problem all the time.
THANKS a LOT for this guide… Searched a lot to fix this issue.. EVEN the Customer care can’t help me to fix this issue….
Keep up the good work !!
This is another weird WiFi-behaviour from Apple. God, when will they learn to create a proper wireless design??! :-(
Similar problem but I after I wake-up my iMac (but not my MacBook which runs on Seirra also), I get a box in the middle of the screen that says “No Internet – needs to connect to the Internet in order to work. Please connect and try again”. This box won’t go away until I click on OK. It doesn’t seem to do anything but it is annoying. Where does it come from and how do I get rid of it? I have had it for about 2-3 months.
This worked perfectly. Thank you
did not work for me, still having the same issue
Thank you. Seems to have fixed my issue. Much appreciated.
I tried this and now I cannot connect to my wifi at all. Can you please help?
Thank you. This worked for me. I use a Windows VM with a VPN and it would always disconnect when the Mac went to sleep.
Now I can keep the VPN up during the duration of my day even if the machine has gone to sleep.
This works well if WiFi is active when wake-up.
But I’m using WiFi Extender of which power supply is controlled by Master/Slave socket where master is my MacBook.
So WiFi Extender is started after I run MacBook. Initialization takes about 30s. So demanded wifi is not accessible immediatelly after wake-up. In this case it doesn’t reconnect.
Could you help me?
This worked!!!!!!!!!!!!!! Thanks so much!!!!!! I thought the small incovenience wouldn’t be fixable, but it is!!! This will save precious seconds for me!!! IT WORKS!!!!
I found a better way.
I travel a lot so I have a long list of Preferred networks wich I don’t want to lose.
Anytime I get to a new place and I join the Wifi, it goes to the end of the List.
Seems that when the Mac comes back from Sleep state, if looks for the preferred network to reconnect, but as my current network is at the end of the list it simply doesn’t reconnect.
The solution ? I drag my current network to the top of the list, and voilà, no more reconnecting problems.
Hope that helps
Following these instructions, along with renewing the DHCP lease and then restarting BEFORE joining the network (thereby re saving the network password) worked for me.
This didn’t work for me. I still have to manually reconnect to my home network every time I wake from sleep.
I suppose I should actually clarify: when I wake my Macbook from sleep, Wi-Fi is on, but says this:
Wi-Fi has the self-assigned IP address and will not be able to connect to the Internet
The only thing that gets it to connect after that is turning off Wi-Fi, then turning it back on again.
But, I shouldn’t have to do this every time the Macbook wakes up from sleep.
You are using a self assigned IP, use DHCP or pick a different IP that doesn’t conflict with the current one
This still happens for me, and I’ve applied every fix I’ve been able to find. I think it’s time for Apple to admit there is a bug and release a patch or a fix. Getting real tired of this .
I have tried this on two machines that both suffer from this problem after having been migrated from previous MacBooks via Time Machine. Unfortunately this didn’t fix the issue.
This is what worked for me (Yosemite)
1) Open “System Preferences.”
2) Click “Network.”
3) In the left column, bottom row, click the gear icon with the down arrow.
4) Select “Set Service Order.”
5) Drag “WiFi” to the top of the list.
This worked for me!! Thank you!
I tested this fix, and it works. YES!!!
Thanks a bunch Dude.!!!
I’m not sure what you mean by “Website.” I just put the website I got this information from.
I wanted to say thank you for posting this. I didn’t have the problem for over two years after my purchase of MacBook Pro. It would connect all by itself, then upon some update I performed everything changed. That was a hassle. I have on several occasions Googled for help with this, but never found this site, so thanks Dude!
So, can you please figure out how to make my wonderful laptop connect upon startup all by itself? Will you please let me know. I am 56 years old, and not very good at fixing this stuff on my own, but I can read so…
Thanks again for this help. I am smiling.
Same problem experienced. Had to turn off the wifi and turn it back on. It usually take a minute to re-connect this way. Recently I tried something counterintuitive: de-select “Wake for wifi network access” in “System Preferences / Energy Saver”.
Tested it back and forth a few times over a week. No more disconnection after sleep.
MacBook Air mid-2011, OS 10.9.5
I have to say, this is the only thing that worked for me, removing ‘wake for wi-fi’ in Energy Saver. Big thanks passerby, been a source of regular frustration for a while now and no ‘solution’ – including many published on this page worked – but your suggested works perfectly! Cheers.
The same for me, the only thing that worked for this annoying problem, thank you a lot for the help @Passerby!
Thank you for posting this simple fix!! This has been driving me nuts. Only happens at my daughter’s house, but since we’re staying here right now, I’m grateful to have this solution. I’m in my happy zone now. :)
I have been dealing with this constant disconnect after sleep ever since my purchase of my first Mac Air 2 weeks ago. Many hours daily with AppleCare gave no relief. They did this work around and it didn’t do a thing. Finally Genius Bar gave me a brand new one!
I was so excited and to my chagrin here we go again. I followed the great directions of this fix to no avail!!
Why isn’t there a system fix from apple for this. I love my phone but I am beginning to hate my computer.
It’s the router not the computer! It’s common on several computers including pc’s.
If you have this specific problem I have the only real and easy fix. All your other devices work great on your wifi. Your early 2015 MacBook Pro with retina will work on wifi but after waking from sleep will not load web pages but wifi icon says it is still connected and you have to turn wifi off and back on for it to continue to work. Get a different brand router and or modem. I have time Warner and had a arris wifi router modem combo and tried everything to fix this with to no avail. Switching to a technicolor router/modem combo fixed it.
This fix did not work for me. Eventually I found that my MacBook struggled connecting to the 5GHz wifi frequency and immediately had no issues after swapping to 2.4GHz (apparently this is common). If your router broadcasts wifi on both 5GHz and 2.4GHz then go into your router settings and force it to not merge the two frequencies into one by renaming the 5GHz frequency (i.e. the 2.4GHz network will show up in your available networks list as a separate choice to the 5GHz one). My MacBook Pro is now happy as Larry after sleep, and maintains a constant connection all the time.
This is what has done it for me after reading and trying many, many different things for several weeks after I was finally determined to find a fix for the wifi dropping every time I closed my 11″ early 2014 macbook air running OSX 10.9.5
I have router/modem combo from xfinity that uses both 2.4GHz and 5GHz frequencies. I gave them different names and I only have it so it only finds the 2.4GHz network.
This fix worked for me. I was against a whole Yosemite clean install. I just thought it had to be something simpler. Thanks for the help. Of course, my wife is like ‘You mean I have to put in everyone’s password again?’ and I said ‘Yes.’ So she’s not too happy about that.
But I am happy that this stupid wifi disconnect is over! I have had it over 36 hours now. Thanks!
Forgetting networks didn’t work for me. Does anyone else have any better suggestions?
Yes, buy a cheap Windows laptop, since mine doesn’t have any problems with my WiFi, but my Mac Mini and Macbook do. Apple should stop spending time on silly nonsense like Handoff and fix basic things like fixing WiFi.
For whatever reason I have ended up with two wifi addresses having the same name. Only one works. How do I delete the other address?
This fix solved my wifi disconnect issue. Thank you for posting this solution. The wifi disconnecting after sleep has been driving me crazy. Sigh of relief!
None of these fixes or any fixes work across seven macbook pros. Apple kept changing my macbook and one did not even get out of the store before it went wrong and they gave me a second new one in half an hour. Eventually, they upgraded me to the 16gb but that still forgets the connection after about five or ten minute’s sleep – about a dozen times every day. Not a good advert and Apple’s unwillingness to address this has cost them about £11,000 in replacement computers for me alone and I am told I can still expect this one to work properly but I just can’t be bothered going back.
I experience this issue about once every couple of weeks on OS 10.8.5 on a Macbook Pro upon waking it up. I sleep it a few times during the day as well as all night. The issue appears only after overnight sleep.
To get it to connect I turn Wifi off/on a bunch of times as well as alternately connecting to one or the other of my two Wifi routers (Airport and Cisco). Today it took me about 10 minutes before the connection returned. Extremely annoying.
I was then able to search online for solutions and found this site. Next time I’ll try the suggestion to remove the preferred networks and I’ll report back the results.
i did it? and do NVRAM and PRAM but nothing for change.
Worked for me! This fixed an irritating problem I didn’t even know I had. I thought this was just how it worked.
It is a minor inconvenience. I usually just turn the WiFi off and then on again via the network icon at the top of the screen. No need to re-enter the password.
This is what I do too… Annoying more than anything.
Well, it’s now 2.5 years later and it’s still an issue. Turning wi-fi on and off never worked for me, I have to reboot the router each time. So, yeah, a “minor inconvenience”.
To me it’s more of an inconvenience since it only started happening after I replaced my MacBook pro with a new one. My old 2008 Macbook pro didn’t do this it connected to wifi like a pro!
This seems to have been introduced with the 10.9.2 update. Every Mac user I work with was fine before that update, and since it have had issues with their Macs not connecting to networks after waking. It’s frustrating a LOT of users, and looks like it’s just sloppy code. Even users who have done the fix above or Bob’s fix have had their Macs eventually develop the issue again, usually within a week. Quite frustrating.
This is me! I have followed different steps I’ve found in different websites to fix the problems, it always works for a few days then comes back. It’s when I change users or wake from sleep, it disconnects and reconnects automatically. And it makes downloading files impossible without keeping the iMac awake, which I guess is my only option. I have a very slow internet so it takes a long time to download files, I’m used to having the iMac sleep, I wake it up and the download is done. Not any more.
When I click the – button, I a got a “Remove Wi-Fi network Home Network?” confirmation. So wasn’t quite sure if I should Remove All, because it says my mac and other devices using iCloud Keychain will no longer join this Wi-Fi network.
Sorry I should have added that if this fix does not work you have to make a Genius Bar appointment since it’s most likely a hardware issue.
Removing those files works if it’s software related which is the case for like 90% of people suffering with this issue but there is a small percentage in which it’s a hardware issue.
this fix didn’t work for me
tried everything already uo to a total erase and install
apple’s helpdesk can’t fix it
Sorry, author. An old wives tale.
Well – fingers crossed – this appears to have worked.
This is the fix that really works!
go into the root Library then into the Preferences folder delete the SystemConfiguration folder and com.apple.Bluetooth.plist file and restart your MacBook and then empty your trash.
Well, glad it worked for you – doesn’t work for me. Combined with the inability of my Mac mini to send a refresh signal to the monitor when coming out of sleep (also huge threads on this) – I’m done.
@Chunky McChunk it goes back to at least Mountain Lion.
There is an extremely long thread about this on Apple’s discussion board with plenty of people who are having no luck with any of these methods.
Worked for my mom’s Mac when I dumped previous networks, though I didn’t create a new location. It was taking over a minute to connect.
Turning off bluetooth never did it for me though.
This is a well documented problem that I think everyone encounters, for me it disconnects and takes like a minute to reconnect, but it does reconnect eventually.
Big thread about it on Apple Support, seems new to OS X Mavericks? https://discussions.apple.com/thread/5495375?tstart=0
I have found Bluetooth interference to cause Wi-Fi flakiness with OS X, and the 5G networks are particularly vulnerable to this kind of connectivity dropping.
So if you are on a MacBook you can disable Bluetooth to maintain a connection, obviously not an option on an iMac or Mac Mini without wired keyboard and mouse.
Some routers appear more prone to this than others, as well.