Skip to main content

Wi-Fi disconnects when I lock the mac [Resolved]

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.

Question Credit: snihalani
Question Reference
Asked May 14, 2018
Tags: wifi
Posted Under: Apple
9 Answers

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")

ether 00:00:00:00:00:00  
inet6 0000::000:0000:0000:0000%en1 prefixlen 64 scopeid 0x5
inet netmask 0xffffff00 broadcast
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

credit: John
Answered May 14, 2018

Try the workaround here:

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 )

credit: bmike
Answered May 14, 2018

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.

credit: stuffe
Answered May 14, 2018

You can do it by writing simple service for Mac, this is best solution for this problem.

Try this out -

credit: jnix dev
Answered May 14, 2018

You can live without "lock me now" app.

just use:

CTRL + SHIFT + 'key to eject cd' (or if you don't have an eject key, ctrl+shift+power)

credit: rogerdpack
Answered May 14, 2018

For OS X 10.9, instead of locking your Mac consider using the following command in terminal:

open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/

The command starts the which locks the screen without disconnecting the Wi-Fi. I am not sure if it works on other versions of OS X.

credit: Graham Miln
Answered May 14, 2018

found a solution for this problem. Seems pretty well documented

credit: Arpit
Answered May 14, 2018

For maverick users-

To enabled the "Open Wireless Diagnostics.." as it doesn't show up by default to diagnose the WIFI connection.

Click the wifi icon on the menu bar with the Option key pressed. On the bottom of the list, you have "Open Wireless Diagnostics..."

credit: Mohammad Arif
Answered May 14, 2018
Your Answer