I'm using ubuntu 14.04 and a DSL connection for internet. However, whenever I suspend and resume my session, I'm no longer able to connect to the internet. Could someone help me fix this?
5 Answers
Robbin's answer fixes it for me. To have this run every time the system wakes create a script with this content...
#!/bin/sh
case "${1}" in
resume|thaw)
service network-manager restart;;
esac
and put the script in /etc/pm/sleep.d
and make it executable. (The script is a slight variation of the one on this page)
-
In my tests it was definitely more reliable than the workaround with "nmcli nm sleep false". Thank you.– TuKsnMay 1, 2014 at 21:14
-
3Why do we have to restart the network manager every time? Is this a bug in Ubuntu 14.04?– PhaniOct 29, 2014 at 16:35
-
1@Phani: it might be bugs.launchpad.net/ubuntu/+source/systemd/+bug/1299282 or bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1289884.– chaDec 23, 2014 at 15:56
-
I had forgotten about this thread. Will check the solution and update! Aug 3, 2016 at 19:44
-
1
I have been successful in bringing up the network by restarting networkmanager 100% of the times.
in a terminal:
$ sudo restart network-manager
Have not have time to check in to the issue more closely.
I just turn off my wifi using the keyboard combination Fn + F2 and then turn it back on the same way (may be different for your computer). This restores my connection. Give it a try and see if that helps.
-
Yeah, this works for me too. Hardly an idea solution though, right? I find I can also right click on Network Manager to disable, then re-enable WIFI. Pretty tedious, but it does the job.– ScaineMar 30, 2015 at 12:37
I was able to recover the wifi after suspend by disabling the requirement for a password after suspend. This can be accomplished by unchecking the box in "Settings/Brightness&Lock"
On a desktop running kubuntu 14.04 without wireless but having one nic with two vlans, static configuration in /etc/network/interfaces
, none of all your suggestions helped.
This did the trick, no undesired sideeffects:
aptitude purge network-manager
and accepting the removal of plasma-nm;
now it works like a charm;
apt-get purge
... should do the same
-
And how do you want to control your network connections without NM? A reinstallation of network-manager may be helpful...– s3lphSep 2, 2014 at 18:46
-
This is a well working solution for maybe a special situation, a desktop with a static net config; it may not be the best one for say a laptop with roaming, dhcp and wireless. What do you mean by "control your network connections"? I just want to control my servers and the office from this admin box.– maumauSep 2, 2014 at 22:58
-
2@maumau: NetworkManager is the default system service in Ubuntu that manages and controls network connections. If you remove it, you'll have to take care of that yourself, which is a bad idea expect for very experienced users with complicated setups. Nov 7, 2014 at 22:49
nmcli nm sleep false
works better, as per: Wireless networking not working after resume in Ubuntu 14.04