How to fix Realtek USB NIC TX timeout issues Print

  • realtek, debian, ubuntu, rtl8153, kernel, blacklist, drivers, usb, power, management, suspend, autosuspend, GbE, Gigabit, Ethernet, NIC, network card
  • 1

Are you experiencing TX timeout errors with your external USB3 network card? If it's a Realtek chipset, eg RTL8153, then we can most likely help you fix it.

The problem usually manifests itself around kernel errors as logged in /var/log/syslog:
kernel: [ 6164.073282] r8153 4-1.2:1.0 enx58ef68a8892b: Tx status -71

Typically, this happens when you've left your machine idle for longer than a few minutes, or you're sending lots of data over the connection. The cause is usually that the power saving techniques on the USB hub and/or device are too aggressive, and the network chip isn't able to handle the variations in link speeds, pauses and power state changes. On Debian-based systems (including Ubuntu), we can add some magic to the kernel defaults using GRUB that will resolve the issue.

 

First, we need to grab some information on where the device is connected to the system and how it is identified. Login to your system with root priveledges (eg SSH or console) and type "lsusb". As an example, you should see something like this:

user@my-system:~# lsusb
Bus 002 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

You want to pay attention to the device IDs, or the strings formatted 0000:0000. Make note of the device ID that corresponds to your USB NIC. Then, make note of the device ID of the hub it connects to, which you find by looking at the Bus 000 and Device 000 numbers. In this case, Bus 002 Device 001 is the root hub that this NIC connects to, and the NIC itself is Bus 002 Device 002.

 

Now that you've noted these two device IDs down, we need to put them into a format ready to paste into the GRUB file. Make a string like this:

usbcore.autosuspend=-1 usbcore.quirks=0000:0000:k,0000:0000:k

The first part before the space tells the kernel to disable autosuspend power saving features on all USB devices. The second parts are where you'll paste your device IDs of the NIC and hub, followed by :k which tells the kernel these devices can't work with any power management. Sometimes the first autosuspend flag doesn't work universally, so we add the second specific ones to ensure you get full coverage.

 

Now, open /etc/default/grub with your favourite text editor. Find the line that begins GRUB_CMDLINE_LINUX_DEFAULT= and paste in your completed string just before the last quote mark.

 

Finally, we need to update GRUB and reboot to ensure the new settings are applied.

update-grub && reboot

 

And that's it!


Was this answer helpful?

« Back