Ubuntu: Laptop can't reconnect to new wifi hub after suspend


I have a Dell Inspiron 5520 laptop with an Intel Centrino Wireless-N 2230 card, running Ubuntu 14.04. The wifi worked flawlessly with my old Virgin Media Superhub, but after being "upgraded" to a Superhub 2, the laptop usually fails to reconnect to the network after I suspend it - all my other devices work fine, though it's the only one in the house running Linux. The laptop can always see the network, it just takes ages trying to connect after being suspended and eventually gives up - dmesg shows some "authentication timed out" errors.

I have tried two different USB wifi adapters that work perfectly on a Windows desktop, and both exhibit the same problem on the laptop. The only workarounds I have found so far are to reboot the laptop or hub, change the wifi channel, or disable wifi security. I've tried restarting network-manager, deleting the connection from the manager, and turning the wireless card off and on with the button on the keyboard - none of these seem to help. I've tried all the suggestions on this thread and this one (though their issues seem very slightly different), and none have any effect, except that sudo modprobe -r iwlwifi gives me an error:

modprobe: FATAL: Module mac80211 is in use.  modprobe: FATAL: Error running remove command for iwlwifi.  

Does anyone have any ideas as to what to try next? I'd be very happy with a more convenient workaround if I can't find a permanent solution.


I'm having this same issue. Seems to only happen to me when using the Superhub as well. When suspending/resuming elsewhere (using different wireless routers) I do not have this issue.

The (annoying) workaround for me has also been to switch between the channels but this does not always work either. This is assuming that your Virgin Superhub also has 2 separate connections for 2G and 5G?


This seems to be a wpa_supplicant bug reported here: wpa_supplicant crashes when coming out of suspend

I tried to stop network-manager before suspend/hibernate and start it back again after resume/thaw. Open up terminal by pressing Ctrl+Alt+T. Make a new file in /usr/lib/pm-utils/sleep.d named 99zFix by entering this command: sudo gedit /usr/lib/pm-utils/sleep.d/99zFix Copy and paste the following code into the file.

#!/bin/bash  case "$1" in  suspend|hibernate)  service network-manager stop  ;;  resume|thaw)  service network-manager start  ;;  esac  

Save (Press Ctrl+S) and exit. Then make it executable by entering: sudo chmod 644 /usr/lib/pm-utils/sleep.d/99zFix in terminal.

Done! :)

You can do it exactly for restart/shutdown/logout if you have the same problem there. Enjoy!

Source: How do I run commands on suspend/return from suspend?


I've found another bug report here that is a little bit more similar to your problem: https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/811441/comments/24 According to respond number 24:

You need to
(i) create directories /run and /run/lock,
(ii) move contents of /var/run into /run and /var/lock into /run/lock,
(iii) delete directories /var/run and /var/lock (iv) create replacement simlinks; e.g. 'ln -s /run /var/run' and 'ln -s /run/lock /var/lock'

The following code does the above explanations. Running it once didn't work well for me, so I inserted it after suspend|hibernate) instead of service network-manager stop to run it every time I hibernate or suspend my laptop. You might do it once and test if it works or not.

#!/bin/bash  case "$1" in  suspend|hibernate)  mkdir /run /run/lock  mv /var/run/* /run  mv /var/lock/* /run/lock  rm /var/run -R  rm /var/lock -R  ln -s /run /var/run  ln -s /run/lock/ /var/lock  ;;  resume|thaw)  ;;  esac  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »