Actually now found that if I unplug the power lead before closing lid then it sleeps fine.
If on charger - its not happening. But if I have closed the lid and no sleep - if a remove power then it sleeps.
Also when blank screen on wake, if I unplug power- immediately the screen comes alive an all ok.
All very strange...
I never had this problem with Lion on an early-2011 MacBook Pro, but do have this all the time on my 2010 Air with Snow Leopard. I believe the easiest way to (temporarily) fix (without rebooting or logoff/logon) is to restart the mDNSResponder daemon by doing this from terminal...
sudo killall mDNSResponder
Give it 5sec to start back up.
If that works for you, I created a little app so I can run this from the dock without opening terminal. It should work for Leopard, Snow Leopard or Lion. I hope this helps someone. http://kyen99.tumblr.com/post/8733128807/snow-leopard-dns-fix
I may have found a solution.
I have tried loads and tons of methods, to fix internet, wake, BT, reboot problems, such that I have read through the posts.
Removing the power, PR reset, permission fix, mDNSResponder, Blued etc etc. Hope I am not mistaken, but after months of trial and error I went with turning my Magic Trackpad off and not using it. Yes, I did spend money to buy it, but it seems that this may have been the problem.
Try it, maybe it helps.
My up time is about a week now, instead of hours or a day or two.
Still, Apple MUST fix this frustrating issue. :-(
Our mid 2011 iMac with Lion suffers from this same false Internet disconnect after waking from sleep mode. First it's important to report bugs to Apple consistently. Then I use the network diagnostics button on the "you are not connected to the Internet" page. Without fail the Internet connection is confirmed by the use of the network diagnostics button. The recent fix sent by Apple did not resolve this odd behavior. Looking forward to a permanent solution to this annoyance.
After playing with a large number of machines (MB Pro and Air) and 2 routers I have found a fix that works for me, and that solves all of the DNS related WiFi wakeup problems I have seen (but does not solve random WiFi drops that others see).
Specifically the problem that I have found a fix for in my environment is on wakeup where DNS not working, and the browser appears to be not connected when waking up from sleep (but where a connection to an web server by IP address, not URL, works in the browser).
In summary it depends if your home router is used as a DNS proxy as follows and is relaying DNS requests to the internet (a more scientific speculation for geeks is below):
- If your router is a DNS proxy (i.e. the DNS address used by your laptop is the same as your home router, and router relays DNS requet to the internet) then the browser, and mail etc will start working within a second or so of the WiFi reconnecting (as shown on the toolbar).
- However if your router is not a DNS proxy, and your say your home router passes the external ISP's DNS addresses to your laptop then you may have problems connecting to the internet on exiting sleep. Web sites on local subnet can be accessed by IP address, otherwise browser complains that it does not have internet connection. Some combination of waiting, shouting, network diagnostics, and disconnect and reconnect wireless will eventulally allow you to browse web sites.
You can see the DNS values in "System Pref" --> "Network" --> "Advanced" --> "DNS" to help work out which of the apove applies to you.
Simple fix that has worked with 2 routers and 5 machines:
- Check the DHCP configiration of your router to ensure that the DHCP server issues theaddress of the local address of your router as DNS server, not does pass through the ISP's DNS addresses to your laptop.
- Check you have not explicitly set any remote DNS addresses on your machine. I.e. all the values in "System Pref" --> "Network" --> "Advanced" --> "DNS" are grey not black.
Would be interested if this fix works for anyone else. After this fix my WiFi has been rock solid.
Only geeks and Apple need read on ... so Apple are reading this mail (please let me know) I hope the following speculation will help you fix what I believe is a bug in Lion ...
- The problem seems to be that on WiFi wakeup DNS does not work for a period when the DNS server is not on the local IP subnet.
- The most probable reason is that after wakeup there is a problem with the IP stack such that DNS requests are not correctly sent directly via the router's default gateway to the external DNS servers on wake up. (When the DNS server is on the local subset - e.g. home router acting as a DNS proxy - then the DNS server should be found with an IP ARP).
- There may also be a problem after wakeup where the ISP provides two DNS servers and the first listed server is down, though I have not tested this exhaustivly.
- Tested with OSX 10.7.3 and a number of routers. In particular this problem was reliably reproduced with a Draytek Vigor 2830 that can be configred as a DNS proxy or pass though the the ISP's DNS servers by changing the DHCP configuration. Router details:
- Model Name : Vigor2830n
- Firmware Version : 22.214.171.124db_232201
- Build Date/Time : Jun 1 2011 12:00:11
"The first is connecting to a Network from sleep on my MBP. The genius sugested that I go to my Macintosh Hardrive, then Library, then preferences, including system config. I deleted all the contents of the preferences folder with the exception of Xsan as directed. My laptop now connects immediatley to my Network and internet from sleep."
Just tried this after attempting other fixes that did not work- this worked immediately- hope it stays that way!
Have not seen any other feedback from people trying this....
MBP 2009 w/Lion, Brand new 2TB TimeCapsule.
PS- Have been using Lion for awhile and did not have the problem until I bought the TimeCapsule. It all started then. Previous was the old Airport Extreme pyramid.
Thought I'd post my experiences with this problem, and what fixed it for me. My symptoms:
After every wake from sleep the network was unavailable to Safari, Mail etc, even though it looked like the network was up according to iStat Menus, Network Prefs etc.
After a couple of minutes, according to Hardware Growler, my IP address was released and re-acquired. After that, everything worked.
Killing mDNSResponder during the initial period got things working, although the IP address was still re-acquired after 2 or 3 minutes.
This problem started happening suddenly for me. Then I realised that I had been testing my Epson flatbed scanner with Lion and it was still turned on. It's connected via Firewire through a Firewire hub. Believe it or not, turning off the scanner cured the problem! This is 100% repeatable. Scanner on, no network after sleep. Scanner off, everything's fine.
I think I've found an easy workaround to "sometimes won't re-connect wifi after sleep".
I wake up by pressing the power button.
Previously I was waking up by hitting spacebar.
I have a 2010 iMac with the latest Lion and all updates. Don't use time-machine. Don't have wired connection. Do use a bluetooth mouse.
Apple, I hope you're listening, as this might be a clue. I also have a 2011 Air, which does not have this problem - unless I have bluetooth enabled.
Just thought I would add myself to the list of people having a problem. I upgrade my MacBook4,1 from 10.5.8 to 10.6.3 via the Snow Leopard updgrade DVD and then immediately downloaded and installed the 10.6.8 combo update that Software Update said was available. Since then, when I awake my MacBook from sleep my Airport connection is greyed out and I need to enter my SSID and WAP2 password to reconnect.
It would be nice to get some attention from Apple on this one since it seems that so many are having the problem.