7

Both the Wifi and the ethernet connection to the internet are not working. All had been functioning fine until the Ubuntu suspended itself. On re-starting, the connection to internet failed to function and now I get the message "Network Disabled" whenever I re-boot.

nm-tool tells me the state is "asleep". Stopping and starting the NetworkManager has no effect

The machine is an Inspiron 9300 and work perfectly with Windows. How do I wake the networking up?

Thanks

André Marinho
  • 910
  • 9
  • 23

2 Answers2

14

Ahh, the good old NM bug.

stop network-manager

sudo rm /var/lib/NetworkManager/NetworkManager.state

start network-manager

Scream bloody murder if this fixes the issue. (This really should have been fixed a long time ago)

coteyr
  • 18,288
  • 1
    Thank you. Worked a treat. I wasted quit a few hours on this one and almost considered going back to Windows. – Terry Dixon Nov 25 '12 at 23:36
  • 1
    I've just encountered this one with Ubuntu 13.10, and these instructions fixed it for me. thumbsup (I had also manually forced it back up with ifconfig eth0 up and dhclient eth0, but of course that's not the right way as it bypasses all the management.) – Jonathan Gilbert Nov 12 '13 at 04:14
  • This problem is still present in Ubuntu 14.04 - and your answer worked just fine. Thanks. – nonbeing Nov 19 '14 at 10:58
  • Thanks! I skipped the second command (sudo rm /var/lib...) and it still solved the issue for my Ubuntu 14.04.1 LTS on VMWare. – Isaac Feb 28 '15 at 12:50
0

For Ubuntu 20.04 LTS:

sudo service network-manager stop
sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo service network-manager start

For Ubuntu 21.04:

sudo systemctl stop NetworkManager.service
sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo systemctl start NetworkManager.service

If it does still not work. change your NetworkManager.conf file, and change the managed is true if it was false.

$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown] managed=true

[device] wifi.scan-rand-mac-address=no

restart your Network manager service

$ service network-manager restart
Guokas
  • 116