Ethernet Connection randomly disconnects after transmit queue 0 timed out

7,828

First of all, I tried to replace r8169 with r8168 which happens to be a bug for many users having Realtek Ethernet Controller, but never solved the problem, even now almost an year after posting this. I face the same problem even with the latest kernel update 4.2.0-30-generic.

Solution:

Replace the current kernel with a stable older kernel version, in my case I installed kernel version 3.2.0-83-generic manually in 14.04 LTS. Now the Ethernet connection is stable and the problem is solved.

Download the following .deb packages from 1, 2, 3, 4 and install it:

sudo dpkg -i linux-headers-3.2.0-83_3.2.0-83.120_all.deb
sudo dpkg -i linux-headers-3.2.0-83-generic_3.2.0-83.120_i386.deb
sudo dpkg -i linux-image-3.2.0-83-generic_3.2.0-83.120_i386.deb

You can change the boot order by editing GRUB_DEFAULT=0 in /etc/default/grub as given here. Then

sudo update-grub
sudo reboot

I think you can try to install other latest v3.2 kernels which too may be stable, Ex: 3.2.0-98-generic

Note: I have tested it for both 32bit and 64bit Ubuntu 14.04 LTS

Share:
7,828

Related videos on Youtube

Sooraj S
Author by

Sooraj S

Primarily a postgraduate in Photonics, became interested in the mathematical foundations of quantum computation and quantum information. At my heart, I get fascinated to read through mathematical equations and proofs.

Updated on September 18, 2022

Comments

  • Sooraj S
    Sooraj S over 1 year

    Description of problem:

    Ethernet connection gets disconnected at random apparently without any reason. I have tried the following command to restart my ethernet connection,

    sudo service network-manager restart
    

    though it never solved the issue. Every time I have to restart my system to get the connection back.

    Details of my Ethernet card:

    $ lspci -nnk | grep -iA2 net
    06:00.0 Network controller [0280]: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)
            Subsystem: Lenovo Device [17aa:30a1]
            Kernel driver in use: ath9k<br>
    07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 02)
            Subsystem: Lenovo Device [17aa:392e]
            Kernel driver in use: r8169
    

    My system: Ubuntu 14.04 LTS 64bit on Lenovo ideapad z560.

    OBSERVATION: It happens more frequently when I make calls in skype or hangout. It seems that heavy usage of Ethernet is causing the disconnection.

    Debug steps tried so far:

    I found a post Wired Network is not stable in ubuntu 13.04 (64-bit) have something similar problem description as mine but not exactly. Following the solution given in that post, I installed and tried to use an older kernel linux-image-3.5.0-27-generic. But the same problem persisted there.

    At the same time I am not sure if it is a hardware related issue as this never happened with Windows 7 which I was using before. I did a lot of googling but could not find a solution except a few about older versions and bug report.

    As a hint to look into dmesg [ thanks to @noleti ], I found the following:

    $ dmesg -T | grep eth0
    [Sat May  2 19:52:37 2015] r8169 0000:07:00.0: eth0: RTL8102e at 0xffffc90000348000, 88:ae:1d:3a:ec:ff, XID 04e00000 IRQ 41
    [Sat May  2 19:52:45 2015] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [Sat May  2 19:52:51 2015] r8169 0000:07:00.0: eth0: link down
    [Sat May  2 19:52:51 2015] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [Sat May  2 19:52:51 2015] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [Sat May  2 19:52:56 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 19:52:56 2015] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [Sat May  2 20:09:01 2015] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
    [Sat May  2 20:09:01 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 20:09:13 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 20:09:19 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 20:09:31 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 20:10:13 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 20:10:55 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 20:12:07 2015] r8169 0000:07:00.0: eth0: link up
    [Sat May  2 20:13:49 2015] r8169 0000:07:00.0: eth0: link up
    

    After the event as shown in dmesg output my connection is lost.

    NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
    
    • MrVaykadji
      MrVaykadji about 9 years
      it's unclear to me if you're using ethernet or wifi
    • Ron
      Ron about 9 years
      Have you tried re-installing the drivers?
    • Sooraj S
      Sooraj S about 9 years
      @Ron I reinstalled ubuntu once......but nothing changed
    • solsTiCe
      solsTiCe about 9 years
      I have the same ethernet controller; except it's rev 05. It's working fine. You need to find out if it's a hardware problem, driver problem or higher tcp/ip stack problem. You can first try some other OS like freebsd to test the hardware.
    • Sooraj S
      Sooraj S about 9 years
      @solsTiCe i was using windows few months before ..... but this never happened.
    • noleti
      noleti about 9 years
      After such a disconnect, will dmesg yield any related error? Do you have LEDs indicating physical connection, and what do they say after a disconnect?
    • solsTiCe
      solsTiCe about 9 years
      @sssss Well if you don't want make some test.... You could try the realtek driver
    • Sooraj S
      Sooraj S about 9 years
      @noleti it gives lot of things. how do i know there is an error?
    • Sooraj S
      Sooraj S about 9 years
      @solsTiCe I have no idea what higher tcp/ip stack problem is. I will try the realtek driver soon.
    • Sooraj S
      Sooraj S almost 9 years
      @solsTiCe @noleti :Since all efforts failed. I have removed Ubuntu 14.04 LTS and installed Ubuntu 12.04. Kernel version:3.2.0-83-generic Internet connection is very stable. It never got disconnected after I switched to 12.04. But it is still not a solution to the problem.
  • Sooraj S
    Sooraj S about 9 years
    i tried this but didn't help.
  • Sooraj S
    Sooraj S almost 9 years
    nope......network is still the same.....unstable as before
  • jeff-h
    jeff-h over 7 years
    Thanks for documenting your journey through all of this. I have a Cenovo Mini PC 2 which contains a Realtek r8152 ethernet adapter and had very very similar problems to yours when running Ubuntu 16.04—dropping the network connection when high load occurred. I tried everything under the sun until I read your issue here and tried installing Ubuntu 12.04 (with kernel 3.13). It's worked perfectly ever since. As you say though... hardly a solution.
  • Sooraj S
    Sooraj S over 7 years
    @jeff-h you said 3.13 works fine with 12.04. try installing 14.04 or 16.04 and manually replace the kernel with 3.13.
  • jeff-h
    jeff-h over 7 years
    Thanks for your followup. Unfortunately I'm not deep enough into Ubuntu to know how or why to do that, although it sounds interesting. Luckily all I need to do is run Docker, nothing else. I realise there are numerous lighter distros for that but I had no luck with any of them on this Cherry Trail PC (but that's a side issue.)