APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

OS X wake from sleep network problems

At Slow Firefox DNS Mac OS X Leopard I had written about a strange DNS issue with OS X and Firefox. That's gone away, but for some time now I've had a new problem: when I wake from sleep, it takes a long time before I can do any network access. Firefox and Safari just hang with spinning beach balls, ssh times out.. it looks like networking is dead.

It isn't dead though: I often leave an ssh session to other machines connected when I sleep briefly. Those sessions remail connected without problem. I just can't start new sessions.

Maddeningly, the problem would sometimes disappear entirely, only to reappear a day or so later. I thought that an Apple update or Firefox upgrade had fixed it.. but no, it came back again.

I thought it might be a DNS issue again, so I tried with hard IP addresses. No, those don't work either.

I've found plenty of similar complaints on the Net, but for wireless activity. This is happening to me with a hard Ethernet cable on en0 - I have Airport shut off most of the time. But.. Airport did give me a clue.

I noticed that when I happened to be using Airport, whether here or elsewhere, I wouldn't get the sleep problem. As I said, I usually have Airport shut off. I don't know why - I just don't like anything running if I'm not using it. So I usually have it shut off.

So what's happening here? Is OS X trying to use Airport for new connections even though I have it shut off? That might explain why existing connections are still fine. Here's another clue: If I turn Airport on and then shut it off, the hanging after sleep goes away for a while. That probably explains the supposedly random nature of this - I had probably turned on Airport for some reason. Maybe OS X just gets confused and thinks Airport is on unless it has been turned off recently?

I don't know. The obvious fix is to just leave Airport on. I suppose that's what I'll do.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> OS X wake from sleep network problems en0

8 comments



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence







Sun Nov 9 16:58:42 2008: 4750   badanov


My guess would be if you disable ACPI most of your sleep problems will disappear.

It has been my experience FreeBSD has an ongoing problem with ACPI



Sun Nov 9 17:13:37 2008: 4751   TonyLawrence

gravatar
That's often been the suggestion for Wireless wake from sleep problems, yes.

But given the symptoms, I think just leaving Airport enabled is a bit less drastic. I have no other APCI related issues, so why should I disable something that is useful?







Mon Nov 10 07:29:19 2008: 4752   jtimberman


I've been maddened by this just this evening, in fact. My Samba mounts from my Windows system caused all kinds of networking problems when I returned from sleep.

The issue only happens when I shut the lid. System "inactive" sleep hasn't been an issue. I too normally have ethernet connected and Airport off, since GigE is faster than 54G wifi :-). My main question, is Mac OS smart enough to actually honor the first device listed for even local network traffic (except specifically on the wifi)? I know it uses en0 for internet access.



Mon Nov 10 10:52:00 2008: 4753   TonyLawrence

gravatar
I don't know. I'm still scratching around on this one.

networksetup -listnetworkserviceorder

says the expected things.



Mon Nov 10 16:18:03 2008: 4756   jtimberman


I did more investigating after the samba + itunes issue pretty much hosed up the system this morning :(. I couldn't access the status bar or dock to switch workspaces or applications after resuming from sleep. Unfortunately I couldn't find any specific correlation to the issue, as it didn't occur again in testing. Steps:

0. Turn Airport on, connect to network via ethernet.
1. Boot system and login. Mounted shares are in my login items.
2. Put system to sleep and resume.
3. Open iTunes and play a song from the share, works ok.
4. netstat -an shows my connection to the server IP and port 445.
5. Put system to sleep and resume.
6. netstat -an shows the same client port in the samba connection.
7. iTunes resumes playing the song.

I then disabled Airport, rebooted and repeated with the same results. Everything works fine.

Next step if this occurs again is to keep an eye on system.log, I suppose. Maybe this would be a good starter for learning DTrace :-).



Mon Nov 10 16:25:53 2008: 4758   TonyLawrence

gravatar
In Googling around, I found /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

Try that with -I

No help for this issue..

Also wondering just where en0 etc. live.. not in /dev apparently.







Thu Nov 27 16:01:30 2008: 4823   TonyLawrence

gravatar
Hmmm.. the wake from sleep hangs have started up again. Turning on Airport doesn't seem to help but unplugging en0 did seem to..

This is very confusing.



Wed Jul 2 00:25:19 2014: 12499   mett

gravatar


Lightly late comment but did u try 'pmset noidle' from the terminal? It solved a similar problem I had with the connection suddlenly going down for no reason, on a customer pc.

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us