Ethernet link not detected in ubuntu 14.04 after update

8,924

I can confirm this bug. Faced same issue and It's not wiring problem, it's problem of r8169 driver that appeared recent update. I think they have already found a bug in this module https://lkml.org/lkml/2015/2/21/161

A temporary fix could be building original realtek driver (r8168) and replace current r8169 with it.

https://unixblogger.wordpress.com/2011/10/18/the-pain-of-an-realtek-rtl8111rtl8168-ethernet-card/

  1. install requirements

    sudo apt-get install build-essential

  2. get and extract the latest driver from Realtek website, enter the directory you unpacked driver to
  3. build & install driver:

    sudo make clean modules

    sudo make install

  4. make sure r8168.ko is present in your kernel drivers:

    sudo locate -i r8168

    one of lines in the output should be something like this:

    /modules/3.13.0-46-generic/kernel/drivers/net/ethernet/realtek/r8168.ko

  5. ban r8169 and rebuild kernel depencies

    sudo echo “blacklist r8169″ >> /etc/modprobe.d/blacklist.conf

    sudo depmod -a

  6. Make it available for boot

    sudo echo “r8168″ >> /etc/modules

  7. After reboot check the loaded driver

    lspci -v|grep -A 7 Realtek

    Last line should be "Kernel driver in use: r8168″

I hope this helps.

Share:
8,924

Related videos on Youtube

zipzapzoop
Author by

zipzapzoop

Updated on September 18, 2022

Comments

  • zipzapzoop
    zipzapzoop over 1 year

    Since I ran some update in the past week or so, I have not been able to get a wired connection. Specifically:

    • Initially, during boot up, the ethernet link light is on As ubuntu boots up, the link light will go off Ubuntu reports cable is disconnected If I boot into Windows 7, I can use the internet without issue.

    My problem is similar to what is described at: Ethernet Lights Not On When Cable Connected And Not Working

    lspci entry:

    Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
    

    sudo ethtool eth0:

    Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                       drv probe ifdown ifup
        Link detected: no
    

    ifconfig -a

    eth0      Link encap:Ethernet  HWaddr d4:3d:7e:26:b2:20
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:300 errors:0 dropped:0 overruns:0 frame:0
              TX packets:300 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:25463 (25.4 KB)  TX bytes:25463 (25.4 KB)
    
    lxcbr0    Link encap:Ethernet  HWaddr 7a:01:dd:5c:17:99  
              inet addr:10.0.3.1  Bcast:10.0.3.255  Mask:255.255.255.0
              inet6 addr: fe80::7801:ddff:fe5c:1799/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 B)  TX bytes:11788 (11.7 KB)
    

    syslog:

    Feb  8 18:20:42 newdesk kernel: [    4.048721] r8169 0000:03:00.0 eth0: link down
    Feb  8 18:20:42 newdesk kernel: [    4.048751] r8169 0000:03:00.0 eth0: link down
    Feb  8 18:20:42 newdesk kernel: [    4.048760] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    Feb  8 18:20:42 newdesk kernel: [    4.048905] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    

    As I lack another network card, I can only use windows right now. Advice on how to fix this is appreciated.

    Thanks!

    • Fabby
      Fabby about 9 years
      Your link points nowhere... Please adapt.
    • Fabby
      Fabby about 9 years
      Try the following: unplug the cable, open a terminal by pressing [Ctrl][Alt][T] and typing: tail -f /var/log/{kern.log,dmesg,syslog} what changes in the terminal windows when you plug in the cable?
    • zipzapzoop
      zipzapzoop about 9 years
      Nothing is logged when cable is added or removed
    • Fabby
      Fabby about 9 years
      Did you also plug the cable into another network port at the router's end?
    • zipzapzoop
      zipzapzoop about 9 years
      I've actually been going straight into my wall's ethernet jack. Your question inspired me though to test going via a router; I borrowed one and everything worked! What is up with Ubuntu that is preventing the direct connection from working?
    • Fabby
      Fabby about 9 years
    • Habkost
      Habkost about 9 years
      I have the same problem. But, if I log into windows and restart, my connection works. I just made a clean install of 14.10.
    • zipzapzoop
      zipzapzoop about 9 years
      Definitely not a duplicate; the answer in the dupe implies the link is seen, unlike in mine where Ubuntu thinks there is no link. I'll try the different driver.
    • goo
      goo about 9 years
      Try sudo rfkill list and man rfkill
  • Fabby
    Fabby about 9 years
    Upvoted and my answer deleted! ;-)