OS X - Fix for wifi disconnect after suspend/resume

OS X - Fix for wifi disconnect after suspend/resume


I've purchased a Mac recently and since upgrading to Maverick have been having some problem with wifi after suspend/resume. Looking into the issue, I've found this thread: https://discussions.apple.com/thread/5495375 and some people have reported that turning off bluetooth did fix the issue.


For my case, this was not possible, so I've tried to make a little fix, that disable bluetooth on suspend and enable it on wake, but with a 10 seconds delay, in order to let the wifi connect successfully.


Here is my github repo for anyone to look at the code: https://github.com/Setsuna666/osx-wifibtfix


Here is the latest version of the fix, which include an uninstall script: https://github.com/Setsuna666/osx-wifibtfix/archive/v1.0.2.zip


If you have any questions or issues, please post it here so it can be easier for me to keep track of.

Posted on May 16, 2014 9:52 PM

Reply
25 replies

May 17, 2014 1:24 PM in response to Setsuna666

I receive the following output when I try the install:


again does not seems to be working (does not turn on BT 10s after wait as it did the very first time)


Antzcrashing-MacBook-Air:osx-wifibtfix-1.0.4 Antzcrashiing$ sudo bash install.sh

Password:

install.sh: line 12: cd: /Users/Jeffrey/Documents/OS: No such file or directory

Installing Wifi/BT fix by Setsuna666...

Script as been executed as root, please run it again as a user (without sudo)

Antzcrashing-MacBook-Air:osx-wifibtfix-1.0.4 Antzcrashing$ bash install.sh

install.sh: line 12: cd: /Users/Jeffrey/Documents/OS: No such file or directory

Installing Wifi/BT fix by Setsuna666...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

Downloading SleepWatcher...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

Downloading file from http://www.bernhard-baehr.de/sleepwatcher_2.2.tgz...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 43385 100 43385 0 0 50263 0 --:--:-- --:--:-- --:--:-- 50272

Extracting SleepWatcher...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

x ./sleepwatcher_2.2/

x ./sleepwatcher_2.2/config/

x ./sleepwatcher_2.2/ReadMe.rtf

x ./sleepwatcher_2.2/sleepwatcher

x ./sleepwatcher_2.2/._sleepwatcher.8

x ./sleepwatcher_2.2/sleepwatcher.8

x ./sleepwatcher_2.2/sources/

x ./sleepwatcher_2.2/sources/Makefile

x ./sleepwatcher_2.2/sources/._sleepwatcher.c

x ./sleepwatcher_2.2/sources/sleepwatcher.c

x ./sleepwatcher_2.2/sources/sleepwatcher.xcodeproj/

x ./sleepwatcher_2.2/sources/sleepwatcher.xcodeproj/bb.pbxuser

x ./sleepwatcher_2.2/sources/sleepwatcher.xcodeproj/bb.perspectivev3

x ./sleepwatcher_2.2/sources/sleepwatcher.xcodeproj/project.pbxproj

x ./sleepwatcher_2.2/config/de.bernhard-baehr.sleepwatcher-20compatibility-localu ser.plist

x ./sleepwatcher_2.2/config/de.bernhard-baehr.sleepwatcher-20compatibility.plist

x ./sleepwatcher_2.2/config/rc.sleep

x ./sleepwatcher_2.2/config/rc.wakeup

Creating dependencies for SleepWatcher...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

Installing SleepWatcher...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

Copying SleepWatcher configuration...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

cp: /Users/Jeffrey/Documents/OS: No such file or directory

cp: Stuff/MAC/osx-wifibtfix-1.0.4/extra//rc.sleep: No such file or directory

cp: /Users/Jeffrey/Documents/OS: No such file or directory

cp: Stuff/MAC/osx-wifibtfix-1.0.4/extra//rc.wakeup: No such file or directory

chmod: /etc/rc.sleep: No such file or directory

chmod: /etc/rc.wakeup: No such file or directory

Starting SleepWatcher...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

Downloading blueutil...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

Downloading file from http://www.frederikseiffert.de/blueutil/download/blueutil.dmg...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 33343 100 33343 0 0 13110 0 0:00:02 0:00:02 --:--:-- 13106

Mounting blueutil disk image...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

/dev/disk2 Apple_partition_scheme

/dev/disk2s1 Apple_partition_map

/dev/disk2s2 Apple_HFS /Volumes/blueutil

Installing blueutil...

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied


Finished installing Wifi/BT fix

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

Now try to suspend and resume your Mac, your wifi should connect without issue

./lib/functions.sh: line 5: //tmp//wifi-bt-fix.log: Permission denied

May 17, 2014 1:25 PM in response to antzcrashing

uninstall gives the following output:


Antzcrashing-MacBook-Air:osx-wifibtfix-1.0.4 Antzcrashing$ bash uninstall.sh

uninstall.sh: line 10: cd: /Users/Jeffrey/Documents/OS: No such file or directory

Uninstalling blueutil...

./lib/functions.sh: line 5: //wifi-bt-fix.log: Permission denied

Uninstalling SleepWatcher...

./lib/functions.sh: line 5: //wifi-bt-fix.log: Permission denied

rm: /etc/rc.sleep: No such file or directory

rm: /etc/rc.wakeup: No such file or directory

Stopping SleepWatcher...

./lib/functions.sh: line 5: //wifi-bt-fix.log: Permission denied

Uninstall finished

./lib/functions.sh: line 5: //wifi-bt-fix.log: Permission denied

May 30, 2014 4:31 PM in response to Setsuna666

Setsuna666 can you please provide the source code for the binaries your script installs? How can you guarantee that this software is not a spyware and without a backdoor ?


All users, please read carefully about potential risks of installing "custom" software of unknown origin:

http://en.wikipedia.org/wiki/Malware#Backdoors


Best solution would be to open all sources and to allow users to build the full solution from sources.

Jun 3, 2014 9:15 AM in response to Setsuna666

I didn't realize you created your own thread for this utility, and replied in the other thread, so I'll copy it here:


sleepwatcher and blueutil are both available via Homebrew. With Homebrew the installation becomes


- brew install sleepwatcher blueutil

- ln -sfv /usr/local/opt/sleepwatcher/*.plist ~/Library/LaunchAgents


And uninstallation is


- brew uninstall sleepwatcher blueutil

- rm -rf ~/Library/LaunchAgents/de.bernhard-baehr.sleepwatcher*

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

OS X - Fix for wifi disconnect after suspend/resume

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.