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.
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
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:
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
#Used by sleepwatcher to do stuff on wakeup
#Called from /etc/rc.wakeup
#Edit GW, LIF and WIF as needed.
#Gateway to test
#LAN IP and Interface information
#WIFI IP and Interface information
#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
ifconfig $LIF up
logger "wakeup: $LIF re-cycled"
#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
ifconfig $WIF up
logger "wakeup: $WIF re-cycled"
#Other stuff to follow
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
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
sudo launchctl load -w /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher-20compatibility.plist
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
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.
Hi everyone, hope this could help if it's not been covered in previous posts.
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.
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!