How to resolve dropping wifi issue since Yosemite upgrade?

As of today I experience random wifi connection drops on my MacBook Air 2012 that force me to reselect the network every ten minutes. The only recent change to the system was an upgrade to Yosemite. A google search indicated that others have the problem as well, yet as of yet I could not find a solution.

How to fix this issue?


Apple released the 10.10.1 update today, which is supposed to fix many wifi issues.


Unfortunately I think only Apple can fix this, hopefully with an update to Yosemite (which is reportedly already being tested, but a release date is unknown).

Until then, all I can offer is a workaround.

Find Your WiFi "port"

First you need to find your Wi-Fi port. On a MacBook Air this is probably en0.

On a Mac with built-in Ethernet and Wi-Fi, the Wi-Fi is probably en1.

If you aren't sure, you can use this:

WIFI=`/usr/sbin/networksetup -listnetworkserviceorder |\
egrep Device |\
fgrep Wi-Fi |\
sed 's#.*(Hardware Port: Wi-Fi, Device: ##g ; s#)##g'`

and then do

echo "$WIFI" 

to see what it is.

Use the airport command

Since Snow Leopard (at least) there has been an airport tool at:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

Let's call that $AIRPORT for short:

AIRPORT='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'

So if we put that together, this should be the proper command to tell your Mac to join the strongest Wi-Fi signal available:

${AIRPORT} ${WIFI} prefs JoinMode=Strongest JoinModeFallback=KeepLooking

which is just another way of writing this:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 prefs JoinMode=Strongest JoinModeFallback=KeepLooking

Use launchd

You can automatically run that airport command periodically with launchd.

I have put together the necessary files at https://github.com/tjluoma/airport-autojoin but the idea is this:

  • Use launchd plist in /Library/LaunchDaemons/ (which must be owned by root:wheel)

  • Have that launchd plist watch /Library/Preferences/SystemConfiguration/ for changes

  • Run the above command whenever changes occur.

I am not experiencing this problem in Yosemite, so I cannot guarantee that this will fix it, but it's what I would do to fix it if it kept happening to me.

See the GitHub page for more detailed instructions, including removal.