2017/01/04

Fixing an external USB3 ethernet adapter (Realtek r8152) in Ubuntu 16.04

I have an external USB3 ethernet adapter that wasn't working under Ubuntu 16.04.

Details of the adapter:

$ lsusb
...
Bus 001 Device 012: ID 0bda:8153 Realtek Semiconductor Corp. 
Bus 001 Device 011: ID 2109:2812 VIA Labs, Inc. VL812 Hub

$ lsmod | grep r8152
r8152                  49152  0
mii                    16384  2 r8152,usbnet
Error log:
$ dmesg
...
[ 584.877219] usb 1-2.3.3: reset high-speed USB device number 15 using xhci_hcd
[ 585.017923] r8152 1-2.3.3:1.0 eth0: v1.08.2
[ 586.623086] r8152 1-2.3.3:1.0 enx00e04c...d: renamed from eth0
[ 586.658451] IPv6: ADDRCONF(NETDEV_UP): enx00e04c...d: link is not ready
[ 586.708837] IPv6: ADDRCONF(NETDEV_UP): enx00e04c...d: link is not ready
After some googling, I found that the issue is related to the USB autosuspend feature (https://bugzilla.redhat.com/show_bug.cgi?id=1236679). Luckily, the fix is very easy:
sudo nano /etc/default/tlp
and in this file add the following line:
# Exclude listed devices from USB autosuspend (separate with spaces).
# Use lsusb to get the ids.
# Note: input devices (usbhid) are excluded automatically (see below)
#USB_BLACKLIST="1111:2222 3333:4444"
USB_BLACKLIST="0bda:8153"
After a reboot, the USB3 wired ethernet works just fine:
$ dmesg
...
[ 87.910485] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c...d: link becomes ready

Post a Comment