0

I recently moved my router to another PC and the back to my own and now my system won't start the ethernet connection automatically upon boot, I have to manually click on Wired Connection 1 each time.

From this question Network not starting up on boot I checked my /etc/network/interfaces file and it reads:

auto lo
iface lo inet loopback

What does that mean? Shouldn't it read?:

auto eth0
iface eth0 inet dhcp

Should I change it?

Gabriel
  • 2,453
  • 7
  • 32
  • 52
  • Both things are ok, the two lines for lo are the loopback interface. The eth0 is configured to receive a dinamic IP from the router. – animaletdesequia Jan 09 '14 at 13:56

1 Answers1

2

Generally, if you are using Network Manager, the /etc/network/interfaces file need only contain the loopback interface. Network Manager is supposed to handle all other details for us. I suggest you right-click the NM icon and select 'Edit Connections...' Select Wired and Wired Connection 1. Be sure that Connect Automatically is checked:

enter image description here

If you are still having the issue, please try:

sudo apt-get install ethtool
gksudo gedit /etc/rc.local

Add the following above 'exit 0'

ethtool -A eth0 autoneg off

Proofread carefully, save and close gedit. Is it working as expected now?

If it is still not working as expected, install the replacement r8168 driver:

sudo apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms
wget http://media.cdn.ubuntu-de.org/forum/attachments/44/18/3005217-r8168- dkms-8.029.00.tar.gz
sudo tar xvf 3005217-r8168-dkms-8.029.00.tar.gz -C /usr/src
sudo dkms add -m r8168-dkms -v 8.029.00
sudo dkms build -m r8168-dkms -v 8.029.00
sudo dkms install -m r8168-dkms -v 8.029.00 
echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf
sudo modprobe -rfv r8169
sudo modprobe -v r8168

I realize there are later versions of r8168 available, however, I am not confident that the later versions work with your earlier kernel in Ubuntu 12.04. Then try rebooting to see if the ethernet starts on boot correctly.

chili555
  • 60,188
  • Yep, I checked and Connect Automatically is checked. Still have to click it to connect though. – Gabriel Jan 09 '14 at 12:20
  • How about "Available to All Users?" After a fresh boot where it is not working,let's look at: dmesg > wifi.txt. Paste the file wifi.txt here and let us have the link: http://paste.ubuntu.com/ – chili555 Jan 09 '14 at 13:19
  • "Available to all Users" is also checked. Here's the dmesg output: http://paste.ubuntu.com/6720711/ – Gabriel Jan 09 '14 at 13:29
  • Please see my edit. – chili555 Jan 09 '14 at 13:48
  • It works now, thank you very much. What is the purpose of that line in rc.local? – Gabriel Jan 10 '14 at 01:59
  • 1
    Apparently the r8169 driver stumbles and won't connect if it tries to negotiate a connection speed with the router. Turning off autonegotiation allows it to connect. – chili555 Jan 10 '14 at 02:15
  • Well apparently I spoke too soon. Again the wired connection is not connecting upon start and I have to manually click on it. Sorry for having to un-select your answer but I swear it worked at least once. I think the issue might appear when I shut the PC down completely. Restarting keeps the system connected but a shut down triggers this issue. – Gabriel Jan 13 '14 at 12:19
  • Please change rc.local as per my edit. No problem unselecting. – chili555 Jan 13 '14 at 13:55
  • chili555 nope. Still won't connect until I click on the connection's name. This is so frustrating. – Gabriel Jan 14 '14 at 11:45