USB Ethernet not loaded correctly after boot, fixed by replugging cable

Hi all,

Recently built a new workstation to get away from MacOS and Windows. It’s been about a decade since my last attempt to switch to Linux and truth be told: it’s been a way bigger success this time around.

There is one issue I cannot seem to find the source of the problem or a fix for. I’ve got a Dell U4025QW Thunderbolt/Hub monitor. My keyboard, mouse and ethernet are plugged into this monitor. The monitor is connected through USB to the workstation.

The screen, keyboard and mouse work fine out of the box, but for some strange reason the ethernet is not detected or configured during boot. Removing the USB-C cable and plugging it back in solves the problem.

dmesg shows the following after boot:

[    6.012287] [    T250] usb 3-1.4.1.5: new high-speed USB device number 10 using xhci_hcd
[    6.101315] [    T250] usb 3-1.4.1.5: New USB device found, idVendor=0bda, idProduct=1100, bcdDevice= 1.01
[    6.101320] [    T250] usb 3-1.4.1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.101322] [    T250] usb 3-1.4.1.5: Product: USB2.0 HID
[    6.101324] [    T250] usb 3-1.4.1.5: Manufacturer: Realtek
[    6.143454] [    T250] hid-generic 0003:0BDA:1100.000C: hiddev103,hidraw11: USB HID v1.11 Device [Realtek USB2.0 HID] on usb-0000:0e:00.3-1.4.1.5/input0
[   22.288026] [   T1285] Key type trusted registered
[   22.773523] [   T1366] PM: Image not found (code -22)
[   22.899256] [   T1394] BTRFS: device fsid 27057695-0e9e-439e-a646-50d22c1e387c devid 1 transid 11919 /dev/mapper/system-root (254:2) scanned by mount (1394)
[   22.899393] [   T1394] BTRFS info (device dm-2): first mount of filesystem 27057695-0e9e-439e-a646-50d22c1e387c
[   22.899399] [   T1394] BTRFS info (device dm-2): using crc32c (crc32c-lib) checksum algorithm
[   22.952673] [   T1394] BTRFS info (device dm-2): enabling ssd optimizations
[   22.952676] [   T1394] BTRFS info (device dm-2): enabling free space tree

After plugging the cable back in, the device is recognised again but with different messages:

[  115.490718] [   T5214] usb 3-1.4.1.5: new high-speed USB device number 19 using xhci_hcd
[  115.580114] [   T5214] usb 3-1.4.1.5: New USB device found, idVendor=0bda, idProduct=1100, bcdDevice= 1.01
[  115.580118] [   T5214] usb 3-1.4.1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  115.580119] [   T5214] usb 3-1.4.1.5: Product: USB2.0 HID
[  115.580121] [   T5214] usb 3-1.4.1.5: Manufacturer: Realtek
[  115.641125] [   T5214] hid-generic 0003:0BDA:1100.0016: hiddev103,hidraw11: USB HID v1.11 Device [Realtek USB2.0 HID] on usb-0000:0e:00.3-1.4.1.5/input0
[  116.250222] [   T3470] r8152 4-1.4.3:1.0 enp14s0f3u1u4u3: carrier on

I can’t exactly figure out what’s going wrong. Anyone have an idea for a solution?

You could try automating the reset at boot (a bit of a hack admittedly) using a script and custom systemd service.

Create it with
sudo nano /usr/local/bin/reset-dell-usb.sh
and add

#!/bin/bash
# One-shot USB reset for Dell U4025QW to bring up Ethernet reliably

# Find the Realtek hub device (idVendor=0bda, idProduct=1100)
for devpath in /sys/bus/usb/devices/*; do
    if [[ -f "$devpath/idVendor" && -f "$devpath/idProduct" ]]; then
        vendor=$(cat "$devpath/idVendor")
        product=$(cat "$devpath/idProduct")
        if [[ "$vendor" == "0bda" && "$product" == "1100" ]]; then
            devname="${devpath##*/}"
            echo "Resetting USB device $devname"
            echo -n "$devname" > /sys/bus/usb/drivers/usb/unbind
            sleep 1
            echo -n "$devname" > /sys/bus/usb/drivers/usb/bind
            break
        fi
    fi
done

Save when done, and make it executable
sudo chmod +x /usr/local/bin/reset-dell-usb.sh

Incorporate it into a custom system service
sudo nano /etc/systemd/system/reset-dell-usb.service
with

[Unit]
Description=One-shot reset of Dell U4025QW USB hub for Ethernet
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/reset-dell-usb.sh

[Install]
WantedBy=multi-user.target

After this do

sudo systemctl daemon-reload
sudo systemctl enable reset-dell-usb.service

Reboot and see if the above helps.

1 Like

Thanks! I’ve tried your solution and it does seem to do something. However, it does not seem to load the network interface:

[  246.231848] [   T4365] hid-generic 0003:0BDA:1100.0018: hiddev103,hidraw11: USB HID v1.11 Device [Realtek USB2.0 HID] on usb-0000:0e:00.3-1.4.1.5/input0

In the meantime I’ve also tried to reload the kernel module with and without unbinding the usb device. Doesn’t seem to help either:

[  109.918314] [  T11332] usbcore: registered new device driver r8152-cfgselector
[  109.918343] [  T11332] usbcore: registered new interface driver r8152
[  195.819602] [  T11486] hid-generic 0003:0BDA:1100.000D: hiddev103,hidraw11: USB HID v1.11 Device [Realtek USB2.0 HID] on usb-0000:0e:00.3-1.4.1.5/input0

One thing I’ve noticed is the network interface outputting “carrier on”. I tried restarting the network manager, but to no avail either.

[  245.248831] [   T1664] usb 3-1.4.1.5: new high-speed USB device number 19 using xhci_hcd
[  245.338148] [   T1664] usb 3-1.4.1.5: New USB device found, idVendor=0bda, idProduct=1100, bcdDevice= 1.01
[  245.338152] [   T1664] usb 3-1.4.1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  245.338154] [   T1664] usb 3-1.4.1.5: Product: USB2.0 HID
[  245.338155] [   T1664] usb 3-1.4.1.5: Manufacturer: Realtek
[  245.395902] [   T1664] hid-generic 0003:0BDA:1100.0017: hiddev103,hidraw11: USB HID v1.11 Device [Realtek USB2.0 HID] on usb-0000:0e:00.3-1.4.1.5/input0
**[  245.845916] [   T4417] r8152 4-1.4.3:1.0 enp14s0f3u1u4u3: carrier on**
**[  245.873733] [  T13960] NET: Registered PF_PACKET protocol family**

Another interesting thing is the fact that the USB device is initially wrongly identified with a different number:

[ 6.976286] [ T542] usb 3-1.4.1.5: new high-speed USB device number 10 using xhci_hcd
[ 7.067330] [ T542] usb 3-1.4.1.5: New USB device found, idVendor=0bda, idProduct=1100, bcdDevice= 1.01
[ 7.067335] [ T542] usb 3-1.4.1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7.067337] [ T542] usb 3-1.4.1.5: Product: USB2.0 HID
[ 7.067339] [ T542] usb 3-1.4.1.5: Manufacturer: Realtek
[ 7.115559] [ T542] hid-generic 0003:0BDA:1100.000C: hiddev103,hidraw11: USB HID v1.11 Device [Realtek USB2.0 HID] on usb-0000:0e:00.3-1.4.1.5/input0

vs

[ 245.248831] [ T1664] usb 3-1.4.1.5: new high-speed USB device number 19 using xhci_hcd
[ 245.338148] [ T1664] usb 3-1.4.1.5: New USB device found, idVendor=0bda, idProduct=1100, bcdDevice= 1.01
[ 245.338152] [ T1664] usb 3-1.4.1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 245.338154] [ T1664] usb 3-1.4.1.5: Product: USB2.0 HID
[ 245.338155] [ T1664] usb 3-1.4.1.5: Manufacturer: Realtek
[ 245.395902] [ T1664] hid-generic 0003:0BDA:1100.0017: hiddev103,hidraw11: USB HID v1.11 Device [Realtek USB2.0 HID] on usb-0000:0e:00.3-1.4.1.5/input0
[ 245.845916] [ T4417] r8152 4-1.4.3:1.0 enp14s0f3u1u4u3: carrier on
[ 245.873733] [ T13960] NET: Registered PF_PACKET protocol family

Presumably NetworkManager starts prematurely. You want it to wait for the Dell device being ready. Identify the device from your list and add a drop-in After=yourdevice.

n150:~ # systemctl list-units --type device 
  UNIT                                                                                    LOAD   ACTIVE SUB     DESCRIPTION                                                                
  sys-devices-LNXSYSTM:00-LNXSYBUS:00-MSFT0101:00-tpmrm-tpmrm0.device                     loaded active plugged /sys/devices/LNXSYSTM:00/LNXSYBUS:00/MSFT0101:00/tpmrm/tpmrm0
  sys-devices-pci0000:00-0000:00:14.0-usb3-3\x2d1-3\x2d1:1.0-sound-card0-controlC0.device loaded active plugged USB_AUDIO
  sys-devices-pci0000:00-0000:00:14.0-usb3-3\x2d10-3\x2d10:1.0-bluetooth-hci0.device      loaded active plugged /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.0/bluetooth/hci0
  sys-devices-pci0000:00-0000:00:14.3-net-wlo1.device                                     loaded active plugged Alder Lake-N PCH CNVi WiFi
  sys-devices-pci0000:00-0000:00:14.3-ptp-ptp0.device                                     loaded active plugged /sys/devices/pci0000:00/0000:00:14.3/ptp/ptp0
  sys-devices-pci0000:00-0000:00:1c.0-0000:01:00.0-net-enp1s0.device                      loaded active plugged RTL8125 2.5GbE Controller
  sys-devices-pci0000:00-0000:00:1d.0-0000:02:00.0-nvme-nvme0-nvme0n1-nvme0n1p1.device    loaded active plugged WD_BLACK SN770 1TB EFI\x20System\x20Partition
  sys-devices-pci0000:00-0000:00:1d.0-0000:02:00.0-nvme-nvme0-nvme0n1-nvme0n1p2.device    loaded active plugged WD_BLACK SN770 1TB 2
  sys-devices-pci0000:00-0000:00:1d.0-0000:02:00.0-nvme-nvme0-nvme0n1-nvme0n1p3.device    loaded active plugged WD_BLACK SN770 1TB 3
  sys-devices-pci0000:00-0000:00:1d.0-0000:02:00.0-nvme-nvme0-nvme0n1-nvme0n1p4.device    loaded active plugged WD_BLACK SN770 1TB fedora_fedora
  sys-devices-pci0000:00-0000:00:1d.0-0000:02:00.0-nvme-nvme0-nvme0n1.device              loaded active plugged WD_BLACK SN770 1TB
  sys-devices-pci0000:00-0000:00:1f.3-sound-card1-controlC1.device                        loaded active plugged /sys/devices/pci0000:00/0000:00:1f.3/sound/card1/controlC1
  sys-devices-pci0000:00-0000:00:1f.5-spi_master-spi0-spi0.0-mtd-mtd0-mtd1.device         loaded active plugged /sys/devices/pci0000:00/0000:00:1f.5/spi_master/spi0/spi0.0/mtd/mtd0/mtd1
  sys-devices-pci0000:00-0000:00:1f.5-spi_master-spi0-spi0.0-mtd-mtd0-mtd1ro.device       loaded active plugged /sys/devices/pci0000:00/0000:00:1f.5/spi_master/spi0/spi0.0/mtd/mtd0/mtd1ro
  sys-devices-pci0000:00-0000:00:1f.5-spi_master-spi0-spi0.0-mtd-mtd0.device              loaded active plugged /sys/devices/pci0000:00/0000:00:1f.5/spi_master/spi0/spi0.0/mtd/mtd0
  sys-devices-pci0000:00-0000:00:1f.5-spi_master-spi0-spi0.0-mtd-mtd0ro.device            loaded active plugged /sys/devices/pci0000:00/0000:00:1f.5/spi_master/spi0/spi0.0/mtd/mtd0ro
  sys-devices-platform-serial8250-serial8250:0-serial8250:0.2-tty-ttyS2.device            loaded active plugged /sys/devices/platform/serial8250/serial8250:0/serial8250:0.2/tty/ttyS2
  sys-devices-platform-serial8250-serial8250:0-serial8250:0.3-tty-ttyS3.device            loaded active plugged /sys/devices/platform/serial8250/serial8250:0/serial8250:0.3/tty/ttyS3
  sys-devices-pnp0-00:01-00:01:0-00:01:0.0-tty-ttyS0.device                               loaded active plugged /sys/devices/pnp0/00:01/00:01:0/00:01:0.0/tty/ttyS0
  sys-devices-pnp0-00:02-00:02:0-00:02:0.0-tty-ttyS1.device                               loaded active plugged /sys/devices/pnp0/00:02/00:02:0/00:02:0.0/tty/ttyS1
  sys-devices-virtual-misc-rfkill.device                                                  loaded active plugged /sys/devices/virtual/misc/rfkill
  sys-module-configfs.device                                                              loaded active plugged /sys/module/configfs
  sys-module-fuse.device                                                                  loaded active plugged /sys/module/fuse
  sys-subsystem-bluetooth-devices-hci0.device                                             loaded active plugged /sys/subsystem/bluetooth/devices/hci0
  sys-subsystem-net-devices-enp1s0.device                                                 loaded active plugged RTL8125 2.5GbE Controller
  sys-subsystem-net-devices-wlo1.device                                                   loaded active plugged Alder Lake-N PCH CNVi WiFi

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

26 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
n150:~ # 

1 Like

Do you mean unloading and reloading the r8152 Ethernet driver?

Different approach:

  • In the NetworkManager settings, edit the connection
  • Change it to “All users can use this connection”
  • Click Apply, it will ask for the rootpassword.

Reboot and see if it works.

The issue is that the USB Ethernet device doesn’t appear at boot. It only shows up when the cable is replugged.

Yeah, I go that. Just suggested it since I did see this leading to a working device. Still a mystery to me, bu I guess it fails too often during actual boot. Thought it would at least be worth a try and won’t harm.

Yes, but this is a lower level (hardware initialization) issue with the USB network device itself. Nothing that NetworkManager can help with.

Over the past week I’ve had mixed results. I’d say about 75% of the time, the driver gets loaded correctly. Can’t really figure out what the cause is for the other 25%.

Either way, thanks all! Should I find a permanent fix I’ll drop it in this thread.

You didn’t answer my question about whether reloading the driver is helpful?

sudo modprobe -r r8152 && sudo modprobe r8152

That can be automated if it proves effective.

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