Mountain Lion disconnect from Ethernet in sleep mode

I have a late 2009 iMac running Mountain Lion. I use a program called LogMeIn to remotely access my iPhone from other computers and my iPhone. This app worked in Lion, since it was able to work even if my iMac was in sleep mode. However, in Mountain Lion, my iMac looses connection to both my Ethernet and Wi-Fi when it is in sleep mode, renedering LogMeIn useless. In order to use it, I had to sett sleep to never in the Energy Saver prefrences.


So basically, all networking stops on sleep, on both Ethernet and Wi-Fi. I did not encounter this problem in Lion, but ever since upgrading to Mountain Lion it's been happening. Does anyone have any suggestions to fix this? Is anyone else havin

iPhone 4S, iOS 5.1.1, Verizon, 16 GB, Black

Posted on Jul 30, 2012 4:07 AM

Reply
234 replies

Mar 19, 2013 4:10 AM in response to Guuz

Hello all,

if it is any consolation I was asked by Apple Support about this issue because Engineering was working on it!

Maybe 10.8.4 will resolve it once and for all. I have given up searching forums for a solution: I believe there is no hack one can do to solve this; so, waiting and patience are the only possible actions, ah, and never let your Mac go to sleep!


😟

Mar 20, 2013 12:39 PM in response to alfredo87

Hi all,


I am have posted earlier having the same problem. Gave the solution by using ifconfig en0 down and ifconfig en0 up to solve it. But this changed since I changed Ethernet cables. Made a pre sleep and post wakeup event checking (also post earlier by some person) my network connection. I am logging whenever I have a problem and the problem seems to be gone for 1 and half month now.


The problem with my ethernet cable was the fact it was a cat5e cable and sometimes it came 100MB FDX instead of 1 GB FDX. I changed it to cat6 cable of a better quality. This seems to help.


Although I still think some needs to be done software wise, it can't hurt to check your environment.


The pre sleep and post wakeup script also caused me to significantly reduce the crontab entries I previous had and this also made my system more stable. For instance I stop the geektool now in the pre sleep script and wake it up again after some seconds in the post wakeup script. Also when the system wakes up I wait 5 seconds before checking the network is down. Previously I did this every 10 minutes from the crontab.


Regards, Ronald


Hopefully it doesn't come back anymore!!

Mar 20, 2013 1:53 PM in response to Ronaldo1965

Well, Ronald, it seems you have been doing some pretty meticulous logging and some pretty shrewd scripting as well! With some of the best results posted here so far.

If I understand correctly, you have written a script for a pre sleep and a post wakeup event checking your network connection. Or rather: formally switching off your en0 connection pre-sleep and reestablishing your en0 connection automatically at wakeup, am I right (sorry, just trying to learn from this)? Next running a cron script to keep your Mac from falling asleep? That seems to be a much more elegant workaround as opposed to never letting your Mac sleep ( whether or not using "Caffein"), as has also been suggested here.

It has been mentioned on a local forum here that the bug in question is about Mt Lion's TCP/IP stack not being quite right, a conclusion that seems a bit drastic/ outlandish to me. Your findings about the system not being able to determine the right connection speed (i.e. Gigabit Ethernet vs. 10Base100) upon wakeup because of maybe an inferior kind of cat 5e cable, makes a lot more sense to me, being a hardware guy. To even consider such a possibility, though, would never cross the mind of programmers/ software people!

What's more: the unfortunate use of an inferior cable wouldn't even be of concern to Apple, would it? Trouble is: everyone uses them, even without knowing it! So OSX should take that into account.

It may be worth your while to get in touch with some Apple techs higher in the echelon about this, but I am at a loss as to how to do so.

Suggestions anyone?

Please bear in mind that most probably nobody at Apple reads our efforts here, too. Rather just some bots scanning for ****words and such...

Mar 20, 2013 2:07 PM in response to hexdiy

Hi,

I agree with your comments about RONALDO's post: somebody managed to join up hard- and software: well done!

"most probably nobody at Apple reads our efforts here, too. Rather just some bots scanning for ****words and such..."

Do you believe that is an official Apple policy to avoid their technical boffins to find a solution to real problems in OS X???

if true: shame shame

Linux exists thanks to people like RONALDO1965.. Apple should try some HUMBLE PIE😉

Mar 20, 2013 3:08 PM in response to alfredo87

Cher Alfredo, le môt "humilité" indubitablement ne se trouve pas dans le dictionnaire de Apple, certainement pas dans nos jours des "iDevices". Peut-ètre Android va leur servir de leçon? Ils le déservent...

This being off my chest, maybe you could regain contact with people from Apple Support, since it seems you have already been contacted by them on this topic?

Do you believe that is an official Apple policy to avoid their technical boffins to find a solution to real problems in OS X???

Not really, but I do understand their workload would be too heavy and urgent to find the time to listen to amateur dabblers like ourselves. Apple Support is a huuuge forum. An incredible amount of data, and too many irrelevancies. Digging for diamonds in here seems not to have fully entered their minds yet.

Nonetheless, kudos to Ronaldo1965!

And yes, if you have typed the full words, the BOTS seem to have done their job. Exactly as expected.

Quand-même, ne laisse pas tomber!

Apr 21, 2013 12:46 PM in response to sflomenb

I've been having this same issue since at least Mountain Lion (I don't remember having it under Lion or Snow Leopard). I have a hard drive connected to an Airport Extreme and store a ton of media files on that hard drive. I have the network drive the Airport Extreme creates from the hard drive automatically connect on startup - which works fine. When my computer goes to sleep within 5 minutes or so the network connections are lost and the drive is disconnected.


With that being said, I think I may have found a solution! Go to the Network System Preferences and do a couple of things - delete whatever connection you use to connect to the internet (wi-fi or ethernet - I actually utilize both, so I deleted both connections), and if you have multiple locations setup, delete those locations as well (you'll have to manually recreate them). Now, add back your network connection(s), and if you use wi-fi remove any remember networks (you'll have to reconnect to those manually when you're in range). Restart.


Amazingly enough this actually seemed to work for me! I did this last night, computer went to sleep, when I woke up this morning and woke my computer up, my attached network drive was still there. No idea if this is a permanent fix or not, but so far so good.

May 14, 2013 1:15 AM in response to sflomenb

I used the Google DNS and it worked for a while ... then the problem came back. Each time I let my Mac go to sleep by itself (rather than putting it to sleep), Mail accounts disconnected. The only solution was to quit and restart Mail.


However, yesterday, the Mac froze so I ran Disk Warrior from the CD. One of the issues this highlighted and fixed was a corruption that led to a lack of space on the 'available' part of the hard drive.


Since then Mail has behaved itself. Early days yet — and I'm not an expert so I don't know whether this is relevant or coincidental — but I'll report back.

Jun 1, 2013 1:00 PM in response to sflomenb

My solution, which seems to work on for the first day:


I first clicked on the wifi bars on the top of the computer screen, then in the drop down menu selected "open network preferences" (you can also get here by clicking the apple, selecting "system preferences", then selecting "network").


Next select "Wi-Fi..." in the list to the left. Click on the "Advanced..." button. In the window that opens next, click on each preferred network and delete them ALL one at a time by clicking the "-" button. Also make sure that "remember networks this computer has joined" is checked. Now click "OK"- the window closes. In the remaining window, click "apply", then close that window.


Next put the computer to sleep, then wake it up again (not sure if this step is necessary, but I did it none-the-less). Then click on the wi-fi bars at the top of the computer and re-select your network, and, if necessary, re-enter your password.


I tried this and then tried putting the computer into sleep mode and wake mode several times so see if it would reconnect to my network automatically, and it did. Voila, problem solved. At least for an hour. I'll check on it over the next several days to see if the solution persists.

Jun 1, 2013 10:26 PM in response to Ronaldo1965

Just to report you. I haven't got this problem anymore ever since. So my last actions see to have worked.

A summary you can try(details can be found im this discussion)

1) recovery by sudo ifconfig en0 down and then ifconfig en0 up

2) use .wake and .sleep scripts

3) remove network profiles and add again only you use.

4) wait with commands coming out of sleep for some seconds.

5) replace cables with real cat6 cables

6) update to mac os x 10.8.4. Did not see it on this level yet. But could be fixed just before (cat 6 cables)

7) Nvram clear does not help.


I can't tell you which really did it. But this finally is solved from my side.

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.

Mountain Lion disconnect from Ethernet in sleep mode

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