Friday, December 14, 2012

Wifi not working after upgrade to Ubuntu Linux 12.04 Precise Pangolin


After upgraded my laptop to the new Ubuntu 12.04 LTS, my wifi connection was gone. The first thing I thought was that the NetworkManager package I had been used was not installed. But it was installed. And when I ran it manually from /usr/sbin/NetworkManager (with sudo of course), it worked. My laptop immediately connected to the wireless router with the old configuration before the upgrade.

There must be something that kept the NetworkManager from running. Without a clue, I rebooted the computer. This time I noticed there was a message on the screen during the startup: waiting for network configuration ...

And later the message changed to: Waiting up to 60 more seconds for network configuration ...

Google these messages returned many suggestions. And I found the root cause eventually.  In my /etc/network/interfaces file, I had eth0 interface like:
        auto eth0
        iface eth0 inet dhcp
        ......

Since when the NetworkManager handles the network connections, these lines are not needed. The old system did not complain about them but it seems the new one does not like them and refuses to initialize any network.

I removed everything except two lines in that file:
        auto lo
        iface lo inet loopback


And rebooted. The warning messages disappeared during bootup and NetworkManager was started.

Things were not done yet. The wifi notification icon was still missing. With Ubuntu 12.04, it was easy to fix. Clicked on the configuration icon at the top right corner and chose the menu item Startup Applications... and added a startup program with nm-applet in the Command field. Logout and Login again. The cute wiki icon appeared.

BTW, if you found that the new system took much more spaces, you may want to read this post to clean up the garbage left by the upgrade.

No comments:

 
Get This <