[SOLVED] [RTL8151] Ethernet not working via multiport adapter

Recently, I bought a Cable Matters 201046 multiport adapter for my ThinkPad T470s. Unfortunately, the ethernet adapter does not work.

inxi -N shows

Network: Device-1: Intel Ethernet I219-V driver: e1000e
Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi
Device-3: Realtek RTL8151 Adapteon Business Mobile Networks BV type: USB driver: usb-storage

Device-3 is the Cable Matters ethernet adapter. No, I don’t want to use the built-in ethernet, I prefer to plug a single cable.

It seems that the RTL8151 is wrongly detected as an usb-storage device (without showing up). How can I teach Manjaro / linux to use this as a ethernet adapter?

Hi and welcome to the forum :+1:

You would need to craft udev rules, i’m sure there is info on the internet about that topic, or someone here to aid in that.
You would at least need to find the adapter’s info via lspci and or lsusb and search which kernel driver supports it.

Also please see:

Thank you for the warm welcome :slight_smile:

Here is some additional information as suggested:

Generated on 2020-12-10 08:57:1607587047

#################### lspci -vnn ########################

00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5904] (rev 02)
	Subsystem: Lenovo Device [17aa:224b]
	Flags: bus master, fast devsel, latency 0
	Capabilities: <access denied>
	Kernel driver in use: skl_uncore

00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 620 [8086:5916] (rev 02) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device [17aa:224b]
	Flags: bus master, fast devsel, latency 0, IRQ 135
	Memory at eb000000 (64-bit, non-prefetchable) [size=16M]
	Memory at a0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at e000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21) (prog-if 30 [XHCI])
	Subsystem: Lenovo Device [17aa:224b]
	Flags: bus master, medium devsel, latency 0, IRQ 131
	Memory at ec200000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)
	Subsystem: Lenovo Device [17aa:224b]
	Flags: fast devsel, IRQ 18
	Memory at ec228000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: intel_pch_thermal
	Kernel modules: intel_pch_thermal

00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)
	Subsystem: Lenovo Device [17aa:224b]
	Flags: bus master, fast devsel, latency 0, IRQ 133
	Memory at ec229000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: mei_me
	Kernel modules: mei_me

00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 120
	Bus: primary=00, secondary=01, subordinate=39, sec-latency=0
	I/O behind bridge: 00002000-00004fff [size=12K]
	Memory behind bridge: d4000000-ea0fffff [size=353M]
	Prefetchable memory behind bridge: 00000000b0000000-00000000d1ffffff [size=544M]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1c.2 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 [8086:9d12] (rev f1) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 121
	Bus: primary=00, secondary=3a, subordinate=3a, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: ec100000-ec1fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 122
	Bus: primary=00, secondary=3c, subordinate=3c, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: ec000000-ec0fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-LP LPC Controller [8086:9d58] (rev 21)
	Subsystem: Lenovo Device [17aa:224b]
	Flags: bus master, medium devsel, latency 0

00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)
	Subsystem: Lenovo Device [17aa:224b]
	Flags: fast devsel
	Memory at ec224000 (32-bit, non-prefetchable) [disabled] [size=16K]

00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
	Subsystem: Lenovo Device [17aa:224b]
	Flags: bus master, fast devsel, latency 64, IRQ 136
	Memory at ec220000 (64-bit, non-prefetchable) [size=16K]
	Memory at ec210000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel, snd_soc_skl

00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)
	Subsystem: Lenovo Device [17aa:224b]
	Flags: medium devsel, IRQ 16
	Memory at ec22a000 (64-bit, non-prefetchable) [size=256]
	I/O ports at efa0 [size=32]
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801

01:00.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Bus: primary=01, secondary=02, subordinate=39, sec-latency=0
	I/O behind bridge: 00002000-00003fff [size=8K]
	Memory behind bridge: d4000000-ea0fffff [size=353M]
	Prefetchable memory behind bridge: 00000000b0000000-00000000d1ffffff [size=544M]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

02:00.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 123
	Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: ea000000-ea0fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

02:01.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 124
	Bus: primary=02, secondary=04, subordinate=38, sec-latency=0
	I/O behind bridge: 00002000-00002fff [size=4K]
	Memory behind bridge: d4000000-e9efffff [size=351M]
	Prefetchable memory behind bridge: 00000000b0000000-00000000d1ffffff [size=544M]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

02:02.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 125
	Bus: primary=02, secondary=39, subordinate=39, sec-latency=0
	I/O behind bridge: 00003000-00003fff [size=4K]
	Memory behind bridge: e9f00000-e9ffffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

39:00.0 USB controller [0c03]: Intel Corporation JHL6240 Thunderbolt 3 USB 3.1 Controller (Low Power) [Alpine Ridge LP 2016] [8086:15c1] (rev 01) (prog-if 30 [XHCI])
	Subsystem: Device [2222:1111]
	Flags: bus master, fast devsel, latency 0, IRQ 132
	Memory at e9f00000 (32-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

3a:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)
	Subsystem: Intel Corporation Dual Band Wireless-AC 8265 [8086:1010]
	Flags: bus master, fast devsel, latency 0, IRQ 134
	Memory at ec100000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: <access denied>
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

3c:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 [144d:a804] (prog-if 02 [NVM Express])
	Subsystem: Samsung Electronics Co Ltd Device [144d:a801]
	Flags: bus master, fast devsel, latency 0, IRQ 16, NUMA node 0
	Memory at ec000000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: nvme



#################### lspci -vt ########################

-[0000:00]-+-00.0  Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers
           +-02.0  Intel Corporation HD Graphics 620
           +-14.0  Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller
           +-14.2  Intel Corporation Sunrise Point-LP Thermal subsystem
           +-16.0  Intel Corporation Sunrise Point-LP CSME HECI #1
           +-1c.0-[01-39]----00.0-[02-39]--+-00.0-[03]--
           |                               +-01.0-[04-38]--
           |                               \-02.0-[39]----00.0  Intel Corporation JHL6240 Thunderbolt 3 USB 3.1 Controller (Low Power) [Alpine Ridge LP 2016]
           +-1c.2-[3a]----00.0  Intel Corporation Wireless 8265 / 8275
           +-1d.0-[3c]----00.0  Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
           +-1f.0  Intel Corporation Sunrise Point-LP LPC Controller
           +-1f.2  Intel Corporation Sunrise Point-LP PMC
           +-1f.3  Intel Corporation Sunrise Point-LP HD Audio
           \-1f.4  Intel Corporation Sunrise Point-LP SMBus


#################### lsusb -vt ########################

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 12M
        ID 1a40:0101 Terminus Technology Inc. Hub
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=, 12M
            ID 0bda:8151 Realtek Semiconductor Corp. RTL8151 Adapteon Business Mobile Networks BV
        |__ Port 3: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046a:c091 Cherry GmbH 
        |__ Port 3: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046a:c091 Cherry GmbH 
        |__ Port 4: Dev 6, If 0, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0b0e:0e41 GN Netcom 
        |__ Port 4: Dev 6, If 1, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0b0e:0e41 GN Netcom 
        |__ Port 4: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0b0e:0e41 GN Netcom 
        |__ Port 4: Dev 6, If 3, Class=Human Interface Device, Driver=usbhid, 12M
            ID 0b0e:0e41 GN Netcom 
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 4: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 480M
        ID 2a47:4ee7 Mundo Reader, S.L. 
    |__ Port 5: Dev 3, If 0, Class=Chip/SmartCard, Driver=, 12M
        ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
    |__ Port 7: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0a2b Intel Corp. Bluetooth wireless interface
    |__ Port 7: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0a2b Intel Corp. Bluetooth wireless interface
    |__ Port 8: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b5ab Chicony Electronics Co., Ltd 
    |__ Port 8: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M
        ID 04f2:b5ab Chicony Electronics Co., Ltd 


#################### inxi -Fxzc0 ########################

System:    Kernel: 5.9.11-3-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
           Desktop: KDE Plasma 5.20.4 Distro: Manjaro Linux 
Machine:   Type: Laptop System: LENOVO product: 20HF0000MZ v: ThinkPad T470s serial: <filter> 
           Mobo: LENOVO model: 20HF0000MZ v: SDK0J40697 WIN serial: <filter> UEFI: LENOVO 
           v: N1WET56W (1.35 ) date: 08/30/2019 
Battery:   ID-1: BAT0 charge: 22.0 Wh condition: 22.1/23.5 Wh (94%) model: SANYO 00HW022 
           status: Unknown 
           ID-2: BAT1 charge: 23.3 Wh condition: 23.4/26.3 Wh (89%) model: SANYO 01AV405 
           status: Unknown 
CPU:       Info: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP arch: Amber Lake 
           rev: 9 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 21607 
           Speed: 2503 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 2503 2: 2602 3: 2529 
           4: 2606 
Graphics:  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus ID: 1-8:5 
           Display: x11 server: X.Org 1.20.10 driver: intel unloaded: modesetting 
           resolution: 3840x2160~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.3 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 
           Device-2: GN Netcom Jabra Evolve2 40 type: USB driver: jabra,snd-usb-audio,usbhid 
           bus ID: 3-1.4:6 
           Sound Server: ALSA v: k5.9.11-3-MANJARO 
Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: efa0 
           bus ID: 3a:00.0 
           IF: wlp58s0 state: up mac: <filter> 
           Device-2: Realtek RTL8151 Adapteon Business Mobile Networks BV type: USB 
           driver: usb-network bus ID: 3-1.1:3 
Drives:    Local Storage: total: 238.47 GiB used: 84.02 GiB (35.2%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLW256HEHP-000L7 size: 238.47 GiB 
Partition: ID-1: / size: 29.40 GiB used: 21.31 GiB (72.5%) fs: ext4 dev: /dev/nvme0n1p3 
           ID-2: /home size: 195.83 GiB used: 62.70 GiB (32.0%) fs: ext4 dev: /dev/dm-0 
Swap:      ID-1: swap-1 type: partition size: 8.00 GiB used: 0 KiB (0.0%) dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 71.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 4006 
Info:      Processes: 244 Uptime: 42m Memory: 7.67 GiB used: 3.99 GiB (52.0%) Init: systemd 
           Compilers: gcc: 10.2.0 clang: 11.0.0 Packages: 1486 Client: KDE Plasma v: 5.20.4 
           inxi: 3.1.08 

I am quite sure that the root cause is a non-existing usb-modeswitch on the RTL8151 chip which prevents the driver from being loaded.

Did you check the pages from this search result?

Yes I did (with a different search engine). No luck for the specific RTL8151. It is listed in the linux-usb list but I am not sure if that’s helpful.

The ethernet is supposed to work with linux according to the manufacturer’s site and amazon reviews:

I needed to run this on a Lenovo Thinkpad with only 1 USB-C port, so having USB-PD passthrough was a much so that I could charge while having a monitor plugged in. This is the only dongle I found, with DP, and USB-PD passthrough. The 2 USB 2.0 ports are an added bonus, and work for a mice and keyboard. The Ethernet also runs from the USB bus, and is a 100Mbit one. It is picked up by the RTL Linux Kernel driver (though sometimes it disconnects after you suspend/resume the laptop).

It took me quite some time but…

I could not find anything of interest related to this either…

Maybe the manufactorer provides the Linux driver?

I did a search on this and found this page: Cable Matters 201046 USB-C to 8K DisplayPort Multiport Adapter with Power Delivery - Cable Matters Knowledge Base

On that page there is a section: “Symptom : Ethernet connection not recognized or stopped working.”
With this link: Cable Matters 201013 / 201020 Ethernet does not work or keeps disconnecting - Cable Matters Knowledge Base
Which has a link to Realtek with the drivers:
Realtek USB FE / GBE / 2.5G / Gaming Ethernet Family Controller Software - REALTEK

You could try that…

No luck. The Realtek driver is for the 8152. In the file 50-usb-realtek-net.rules provided with the driver there is only support for 0bda:8156, :8155, :8153, :8152, but not 0bda:8151.

You could ask Realtek for info if that driver can be used for that also, and if not if they have a separate one :wink:
(I would not go that bold to try adding the ID myself, because Hardware is kind of dangerous to fiddle with without enough knowledge)

Made some progress. In ChromeOS, there is a usb-modeswitching program called MIST (“Modem Interface Switching Tool”).

In the udev rules of mist, there are the following lines relating to Realtek 815x:

# The following devices are Ethernet adapters in USB Storage mode.

ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="a100", ATTR{bInterfaceClass}=="08", GOTO="mist_switch_device"

ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="8151", ATTR{bInterfaceClass}=="08", GOTO="mist_switch_device"

ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="8152", ATTR{bInterfaceClass}=="08", GOTO="mist_switch_device"

ATTRS{idVendor}=="13b1", ATTRS{idProduct}=="0040", ATTR{bInterfaceClass}=="08", GOTO="mist_switch_device"

In MIST’s default.conf, more infomation could be found:

###############################################################################
# The following devices are Ethernet adapters, not cellular modems.
###############################################################################

# Samsung USB Ethernet Adapter AA-AE2N12B
usb_modem_info {
  initial_usb_id { vendor_id: 0x04e8 product_id: 0xa100 }
  final_usb_id { vendor_id: 0x04e8 product_id: 0xa101 }
  initial_reset: true
}

# Realtek RTL8152-based Ethernet Adapters
usb_modem_info {
  initial_usb_id { vendor_id: 0x0bda product_id: 0x8151 }
  final_usb_id { vendor_id: 0x0bda product_id: 0x8152 }
  usb_message: "555342430860d9a9c0000000800006e0000000000000000000000000000000"
}

# Realtek RTL8153-based Ethernet Adapters
usb_modem_info {
  initial_usb_id { vendor_id: 0x0bda product_id: 0x8152 }
  final_usb_id { vendor_id: 0x0bda product_id: 0x8153 }
  usb_message: "555342430860d9a9c0000000800006e0000000000000000000000000000000"
}

It seems that the product ID switches to 0152 after modeswitch. I will try to figure out a working usb-modeswitch command and report here.

Anyway, any help will be greatly appreciated.

Success!

First, send switch command to multiport adapter:

sudo usb_modeswitch -v 0bda -p 8151 -V 0bda -P 8152 -M 555342430860d9a9c0000000800006e0000000000000000000000000000000

Second, install r8152-dkms from AUR.

Reboot, plug in ethernet cable -> the ethernet device is recognized by Network Manager, everything works now as expected. There seems to be no need for an udev rule.

inxi -N shows now

Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi 
           Device-2: Realtek RTL8152 Fast Ethernet Adapter type: USB driver: r8152 

Thank you for pointing me in the right direction. Marked as SOLVED.

You’re welcome im glad i was of any help. :+1:

PS:
Does it keep working after a total cold boot?
Because i would expect that you would need to perform that modeswitch everytime after a normal boot. (non fast boot)

Yep. Even after a shutdown (“cold start”) it persists. It also keeps working after disconnecting the multiport adapter from power.

For me, that’s perfectly ok. I don’t have a need for an ethernet adapter claiming to be an usb stick or whatever.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.