sflomenb

Q: 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

Close

Q: Mountain Lion disconnect from Ethernet in sleep mode

  • All replies
  • Helpful answers

first Previous Page 14 of 16 last Next
  • by hexdiy,

    hexdiy hexdiy Dec 24, 2012 9:12 AM in response to loïcfernandezcastrillon
    Level 1 (60 points)
    Dec 24, 2012 9:12 AM in response to loïcfernandezcastrillon

    OK. Btw, I forgot to add the link in my last post. It is: http://forums.macrumors.com/showthread.php?t=1480259,

    Post by derbothaus, who seems to know his way around Terminal pretty well.

    Good luck!

  • by NeridaSydney,

    NeridaSydney NeridaSydney Jan 2, 2013 9:34 PM in response to RRFS
    Level 1 (0 points)
    Jan 2, 2013 9:34 PM in response to RRFS

    I have found a solution that works for me: choose "Sleep" when I walk away from the computer, and the ethernet connection will come up normally when I wake the computer up.

     

    Alternatively, if I forget to do this, and come back to a lost connection, I can choose "Sleep" and then wake the computer again, and all is well.  Certainly better than restarting, and I'm a happier camper now.

  • by murrayE,

    murrayE murrayE Jan 3, 2013 5:58 AM in response to NeridaSydney
    Level 1 (47 points)
    Mac OS X
    Jan 3, 2013 5:58 AM in response to NeridaSydney

    NeridaSydney wrote:

     

    I have found a solution that works for me: choose "Sleep" when I walk away from the computer, and the ethernet connection will come up normally when I wake the computer up....

    In my experience, that does not always work! Over a period of months, the only solution I've found that works consistently on my hard-wired iMac is that, after I wake it up, execute the following commands in Terminal:

       

       sudo ifconfig en0 down

       sudo sleep 10

       sudo ifconfig en0 up

  • by hexdiy,

    hexdiy hexdiy Jan 3, 2013 11:55 AM in response to murrayE
    Level 1 (60 points)
    Jan 3, 2013 11:55 AM in response to murrayE

    For users experiencing the same problems over WiFi, it might be interesting to substitute "en0" by "en1":

    sudo ifconfig en1 down

    sudo sleep 10

    sudo ifconfig en1 up

    Thank you, murrayE!

  • by hexdiy,

    hexdiy hexdiy Jan 3, 2013 3:06 PM in response to hexdiy
    Level 1 (60 points)
    Jan 3, 2013 3:06 PM in response to hexdiy

    And, BTW, coulnd't somebody make a daemon out of both Terminal command sets ( en0 + en1)  that reacts at wakeup? I myself am not experienced enough, but surely somebody out here is?

  • by margate,

    margate margate Jan 6, 2013 4:53 AM in response to sflomenb
    Level 1 (0 points)
    Jan 6, 2013 4:53 AM in response to sflomenb

    Only a few times I lost my network since August where I did the SMC resets etc.

     

    Anyway, Thanks to Bernhard de Baehr it is fairly easy to make a function to Down/Up interfaces using sleepwatcher 2.2 which you can download from http://www.bernhard-baehr.de/

     

    I choosed system wide, so my commands are for system wide

     

    1. Download SleepWatcher_2.2 to Desktop

    2. Dbl. click to unzip, a SleepWatcher 2.2 folder is created in desktop

    3. Open ReadMe.rtf and follow "Installation for new SleepWatcher users" using Terminal Window

     

    Comments on steps in ReadMe.rtf:

    Step 3:     

     

    With vi or your favorite editor create .sleep and .wakeup scripts with actions in your home folder /Users/<username>

     

    For this problem I only use  .wakeup with the follwing content, omit ---------------------------------- lines

     

    ----------------------------------

    #!/bin/sh

    #Used by sleepwatcher to do stuff on wakeup

    #Called from /etc/rc.wakeup

    #Edit GW,  LIF and WIF as needed.

     

    #Gateway to test

    GW=192.168.1.1

    #LAN IP and Interface information

    LIF=en0

    #WIFI IP and Interface information

    #WIF=en1

     

    #Down and Up LAN interface if GW is unavailable through $LIF

    if [ "$LIF" != "" ] && [ $(ping -b $LIF -t 1 -c 4 $GW 2>&1|grep -c "100.0% packet loss") != 0 ]; then

            ifconfig $LIF down

            sleep 1

            ifconfig $LIF up

            logger "wakeup: $LIF re-cycled"

    fi

     

    #Down and Up WIFI interface if GW is unavailable through $WIF

    if [ "$WIF" != "" ] && [ $(ping -b $WIF -t 1 -c 4 $GW 2>&1|grep -c "100.0% packet

    loss") != 0 ]; then

            ifconfig $WIF down

            sleep 1

            ifconfig $WIF up

            logger "wakeup: $WIF re-cycled"

    fi

    #Other stuff to follow

    -----------------------------------

     

    Change permission

    chmod 750 .sleep

    chmod 750 .wakeup

     

    Step 5: I skipped this because file copied in Step 6 and permanent load is done with -w in Step 7

    Step 6:

     

    sudo cp Desktop/sleepwatcher_2.2/config/de.bernhard-baehr.sleepwatcher-20compatibility. plist /Library/LaunchDaemons/

    chmod 644 /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher-20compatibility.plist

    sudo cp Desktop/sleepwatcher_2.2/config/rc.* /etc

    sudo chmod 750 /etc/rc.sleep

    sudo chmod 750 /etc/rc.wakeup

     

    There is a extented attribute "com.apple.quarantine" on the config files, remove with

     

    sudo xattr -d com.apple.quarantine /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher-20compatibility.plist

    sudo xattr -d com.apple.quarantine /etc/rc.wakeup

    sudo xattr -d com.apple.quarantine /etc/rc.sleep

     

    Step 7:

     

    sudo launchctl load -w /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher-20compatibility.plist                              

     

    4.Test

     

    reboot

    from Terminal do

     

    sudo launchctl list | grep sleepwatcher and check that "de.bernhard-baehr.sleepwatcher" is running

     

    tail -f /var/log/system.log | grep wakeup

     

    sleep/wake a few times and watch for wakeup entries in system.log

     

    if ping succeeds in .wakeup there are no wakeup entries

     

     

    All set

  • by Taskil,

    Taskil Taskil Jan 16, 2013 2:35 PM in response to SIMONDOLANBASS
    Level 1 (0 points)
    Jan 16, 2013 2:35 PM in response to SIMONDOLANBASS

    I have same email problem but only using an iMac with with wifi on a Sky modem/router. I have tried it with other modem/routers like BT and it works fine. Sometimes restarting mail works, sometimes resetting the modem and sometimes restarting the iMac but it definitely seems to be only with the Sky router. Not tried a wired ethernet connection as presumed it was an incompatability between router and iMac.

  • by audition74,

    audition74 audition74 Jan 29, 2013 2:58 AM in response to sflomenb
    Level 1 (0 points)
    Jan 29, 2013 2:58 AM in response to sflomenb
  • by Allex2501,

    Allex2501 Allex2501 Feb 2, 2013 2:29 PM in response to audition74
    Level 1 (0 points)
    Feb 2, 2013 2:29 PM in response to audition74

    FIxed my problem!

     

    After years the problem was solved somply!

     

    Go to System preferences

    Go to Ethernet
    Go to Advance
    Go to Hardware

     

    The just make the changes like in the pictures below

     

    it work for me Screen Shot 2013-02-02 at 8.18.21 PM.png

  • by Ronaldo1965,

    Ronaldo1965 Ronaldo1965 Feb 2, 2013 10:33 PM in response to Allex2501
    Level 1 (0 points)
    Feb 2, 2013 10:33 PM in response to Allex2501

    Hi,

    Sorry to say it does not help. Actually it was even more difficult to come out the disconnected state.

    Officially you can only do this if you are are able to set your switchport to 1000Fdx instead of autonegotiate. And then it even might work. Because the problem looks like a negotitiation problem. But most switches can't be managed. So then it won't fix anything.

  • by Ronaldo1965,

    Ronaldo1965 Ronaldo1965 Feb 2, 2013 10:34 PM in response to margate
    Level 1 (0 points)
    Feb 2, 2013 10:34 PM in response to margate

    This looks very good. I am going to try this too.

  • by Allex2501,

    Allex2501 Allex2501 Feb 2, 2013 10:51 PM in response to Ronaldo1965
    Level 1 (0 points)
    Feb 2, 2013 10:51 PM in response to Ronaldo1965

    So did u try?

    Let me know what happen after u tried

  • by BigBar,

    BigBar BigBar Feb 15, 2013 2:17 PM in response to sflomenb
    Level 1 (0 points)
    Feb 15, 2013 2:17 PM in response to sflomenb

    My Mountain Lion Mail also refuses to connect to accounts after waking from sleep. I have to quit and restart Mail to get the accounts to reconnect. One interesting twist to this is that one time I let the machine go to sleep while Windows 7 on Parallels had an open window. In this case, Mail did not lose connection to the accounts. This might be a clue. VERY frustrating!

  • by KID MAYHEM,

    KID MAYHEM KID MAYHEM Mar 7, 2013 5:05 AM in response to sflomenb
    Level 1 (0 points)
    Mar 7, 2013 5:05 AM in response to sflomenb

    My work around is keeping a shortcut to Network Diagnostics on my Dock Menu. To do this, follow the instruction Here. Running this Utility gets my Wifi connection back after resuming from Sleep Mode.

  • by BigBar,

    BigBar BigBar Mar 7, 2013 8:23 AM in response to sflomenb
    Level 1 (0 points)
    Mar 7, 2013 8:23 AM in response to sflomenb

    My problem was that the Mail accounts would disconnect during Sleep. I had to quit and researt Mail to get my mail flowing again. After I upgraded to OS10.8.2, about a week ago, the problem went away and hasn't returned.

    Mac Mini 2010.

first Previous Page 14 of 16 last Next