Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Everytime I lock my mac and log back in two minutes, It has disconnected the wi-fi network. Is there a setting to disable this?

Model: Mac Book Pro - 15-inch, Mid 2010 I lock it by clicking 'Login Window...' after clicking my username on top right corner of the menu bar.

share|improve this question
    
OS X version? Is it fully patched? –  jaume Nov 22 '12 at 9:54
    
10.8.2 I don't know what you mean by fully patched? –  snihalani Nov 23 '12 at 22:03
    
Thanks, fully patched means that all software updates are installed, which is your case since 10.8.2 is the latest version available. Can you add to your question which Mac model it is (Mac Pro/MacBook Pro/Air...) and how you lock your Mac? –  jaume Nov 24 '12 at 9:17
    
Done. Thanks for helping. –  snihalani Nov 24 '12 at 20:28
    
Could you mark John's answer as the accepted one? Readers keep wondering why that's not the case and I'm being downvoted... John added his answer 8 months after mine and seems to solve your issue. –  jaume Aug 29 at 14:34

5 Answers 5

up vote 20 down vote accepted

Do the following:

Find out what the network interface is for your wifi. Mine is "en1" for this example (I have obfuscated my MAC addresses with "00")

ifconfig
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500  
ether 00:00:00:00:00:00  
inet6 0000::000:0000:0000:0000%en1 prefixlen 64 scopeid 0x5
inet 10.0.1.16 netmask 0xffffff00 broadcast 10.0.1.255
media: autoselect
status: active

Then, you need to set up the airport util for your wireless card to tell it not to shut off:

cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources
sudo ./airport en1 prefs DisconnectOnLogout=NO
share|improve this answer
1  
I really don't know why this isn't the accepted answer, this was exactly the problem I was having. Thanks! –  NateDSaint Oct 10 '13 at 15:35
    
Yep. This works! :-) –  Rune Grimstad Mar 18 at 11:31
3  
This didn't work on my 2013 MBPr, unfortunately. –  gWaldo May 8 at 18:38
    
Worked - this should be correct answer. –  Marcin Bobowski Jun 11 at 6:00
    
Didn't work on late 2013 MBPr. –  Johann Jul 21 at 18:32

EDIT: Please see John's answer above, which basically tells you to run:

cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources
sudo ./airport en1 prefs DisconnectOnLogout=NO

in Terminal, where en1 is the name of your Mac's WiFi interface. You can get it with this Terminal command:

ifconfig | grep -B 6 'status: active' | head -n 1 | cut -d : -f 1

when WiFi is the only active interface (that is, no Ethernet cable attached).


Other people's Macs are misbehaving in a similar way, read for example this and this. Although I own a similar MacBook Pro that runs 10.8.2 I can count myself fortunate not to suffer this issue.

Consequently the list below is rather a compilation of possible fixes (some may even seem absurd or just plain obvious) than tested recommendations:

I checked the power management settings (command pmset) and defaults but couldn't find anything.

(My setup is: clean "Mountain Lion" install (with restore from Time Machine) and Airport Express base station.)

Hope this will help...

share|improve this answer

Try the workaround here: http://forums.whirlpool.net.au/archive/2000041

The problem with OS X is to "lock" your screen you have two options, either let the screen saver time out and lock your screen (which doesn't disconnect WIFI) or clicking on your "user name" on the top right corner and choosing "Login Window" which essentially locks your mac and takes you to a login window, however this approach disconnects the WIFI Connection.

The work around I have found is installing an app called "Lock Me Now" from the app store and once it has been installed launch it and from the preferences "check" "Just Lock" under "Lock Type" which does the same thing as the screen saver timing out. Also for ease of use you can assign a keyboard shortcut to simplify the process of locking your Mac (I chose to use Command + L )

share|improve this answer
    
I realized that my initial problem was actually resolved by this, but the workaround I had built worked better with @John's answer. I'm going back to yours, though, as it makes it easier to lock my desktop and walk away without worrying about everything turning off while I'm gone. : ) Thanks! –  NateDSaint Oct 14 '13 at 21:22

You can live without "lock me now".

just use:

CTRL + SHIFT + 'key to eject cd'

share|improve this answer
    
what do you mean by "lock me now"? –  dwightk Mar 13 at 21:15
    
Pretty sure he means the above mentioned program in the app store. His suggestion does the same thing without having to have an app. –  Darrell Golliher Apr 8 at 18:43
    
Unfortunately this method also drops the network on MBPr's –  gWaldo May 8 at 18:38

Open Applications > Utilities > Keychain Access then go to Keychain Access in the menu bar on the top, then Preferences - click "show keychain status in the menu bar".

You will see a little lock on the menu bar ... click on it then lock screen from there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.