You are not logged in.

#1 2021-07-08 21:29:11

fabiin
Member
Registered: 2021-07-08
Posts: 11

Intermittent (5 secs) USB device disconnect throught a USB hub [T495]

Hi,
I've got a fresh new Thinkpad T495 (AMD) and I'm installing arch on it.

I've got a problem with a USB hub (ugreen brand, 4 ports). I've been using this hub for years on various linux and macOS without problems. This is clearly related to the Thinkpad laptop (or linux system on this laptop).

Only two devices are connected on the hub, a mouse and a keyboard.

Depending the order the devices are loaded by the kernel, the first one suffer intermittent disconnects, about every 5 seconds. It goes up for 5 secs, and briefly disconnect. (ok for the second one)

I've modified a setting in UEFI to force USB powering even if the laptop is not connected to AC.

If the device is connected directly into the laptop it work as expected.

I've see nothing in logs, but maybe I don't look at good place.

Here some logs:

lspci -k

# lspci -k
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
	Subsystem: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
	Subsystem: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
	Kernel driver in use: pcieport
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
	Kernel driver in use: pcieport
00:01.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
	Kernel driver in use: pcieport
00:01.6 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
	Kernel driver in use: pcieport
00:01.7 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
	Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
	Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
	Subsystem: Lenovo Device 5125
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
	Kernel driver in use: k10temp
	Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
01:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
	Subsystem: Intel Corporation Device 0014
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi
02:00.0 Non-Volatile memory controller: SK hynix Device 1627
	Subsystem: SK hynix Device 1627
	Kernel driver in use: nvme
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0e)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: r8169
	Kernel modules: r8169
03:00.1 Serial controller: Realtek Semiconductor Co., Ltd. RTL8111xP UART #1 (rev 0e)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: serial
03:00.2 Serial controller: Realtek Semiconductor Co., Ltd. RTL8111xP UART #2 (rev 0e)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: serial
03:00.3 IPMI Interface: Realtek Semiconductor Co., Ltd. RTL8111xP IPMI interface (rev 0e)
	Subsystem: Lenovo Device 5125
	Kernel modules: ipmi_si
03:00.4 USB controller: Realtek Semiconductor Co., Ltd. RTL811x EHCI host controller (rev 0e)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: ehci-pci
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: r8169
	Kernel modules: r8169
05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: rtsx_pci
	Kernel modules: rtsx_pci
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev d2)
	Subsystem: Lenovo Device 5125
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
06:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
	Subsystem: Lenovo Device 5125
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
06:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
	Subsystem: Lenovo Device 5125
	Kernel driver in use: ccp
	Kernel modules: ccp
06:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
	Subsystem: Lenovo Device 5125
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
06:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
	Subsystem: Lenovo Device 5125
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
06:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor
	Subsystem: Lenovo Device 5125
	Kernel driver in use: snd_pci_acp3x
	Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x
06:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
	Subsystem: Lenovo Device 5125
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

lsusb -tv

# lsusb -tv
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 04.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 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
    |__ Port 1: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub
        |__ Port 1: Dev 4, If 2, Class=Video, Driver=uvcvideo, 480M
            ID 13d3:56bc IMC Networks
        |__ Port 1: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
            ID 13d3:56bc IMC Networks
        |__ Port 1: Dev 4, If 3, Class=Video, Driver=uvcvideo, 480M
            ID 13d3:56bc IMC Networks
        |__ Port 1: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
            ID 13d3:56bc IMC Networks
        |__ Port 2: Dev 5, If 0, Class=Chip/SmartCard, Driver=, 12M
            ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
        |__ Port 4: Dev 6, If 0, Class=Vendor Specific Class, Driver=, 12M
            ID 06cb:00bd Synaptics, Inc. Prometheus MIS Touch Fingerprint Reader
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 2: Dev 11, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 1a40:0101 Terminus Technology Inc. Hub
        |__ Port 1: Dev 12, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 045e:076c Microsoft Corp. Comfort Mouse 4500
        |__ Port 2: Dev 13, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 046a:0180 Cherry GmbH Strait 3.0
        |__ Port 2: Dev 13, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 046a:0180 Cherry GmbH Strait 3.0
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg disconnect/reconnect the hub

[ 3229.933395] usb 2-2: USB disconnect, device number 11
[ 3229.933405] usb 2-2.1: USB disconnect, device number 12
[ 3230.058132] usb 2-2.2: USB disconnect, device number 13
[ 3235.897593] usb 2-2: new high-speed USB device number 14 using xhci_hcd
[ 3236.039326] usb 2-2: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[ 3236.039336] usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 3236.039340] usb 2-2: Product: USB 2.0 Hub
[ 3236.074075] hub 2-2:1.0: USB hub found
[ 3236.074327] hub 2-2:1.0: 4 ports detected
[ 3236.470923] usb 2-2.1: new low-speed USB device number 15 using xhci_hcd
[ 3236.694969] usb 2-2.1: New USB device found, idVendor=045e, idProduct=076c, bcdDevice= 0.83
[ 3236.694980] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3236.694984] usb 2-2.1: Product: Microsoft® Comfort Mouse 4500
[ 3236.694988] usb 2-2.1: Manufacturer: Microsoft
[ 3236.774692] input: Microsoft Microsoft® Comfort Mouse 4500 as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.1/2-2.1:1.0/0003:045E:076C.000D/input/input33
[ 3236.831223] microsoft 0003:045E:076C.000D: input,hidraw0: USB HID v1.11 Mouse [Microsoft Microsoft® Comfort Mouse 4500] on usb-0000:06:00.3-2.1/input0
[ 3237.020479] usb 2-2.2: new low-speed USB device number 16 using xhci_hcd
[ 3237.265999] usb 2-2.2: New USB device found, idVendor=046a, idProduct=0180, bcdDevice= 1.03
[ 3237.266010] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3237.266015] usb 2-2.2: Product: wired keyboard
[ 3237.266018] usb 2-2.2: Manufacturer:
[ 3237.369516] input:   wired keyboard as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.2/2-2.2:1.0/0003:046A:0180.000E/input/input34
[ 3237.424597] hid-generic 0003:046A:0180.000E: input,hidraw1: USB HID v1.11 Keyboard [  wired keyboard] on usb-0000:06:00.3-2.2/input0
[ 3237.433866] input:   wired keyboard Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.2/2-2.2:1.1/0003:046A:0180.000F/input/input35
[ 3237.491018] input:   wired keyboard System Control as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.2/2-2.2:1.1/0003:046A:0180.000F/input/input36
[ 3237.491167] hid-generic 0003:046A:0180.000F: input,hidraw2: USB HID v1.11 Device [  wired keyboard] on usb-0000:06:00.3-2.2/input1

journalctl -f (disconnect / reconnect)

Jul 08 23:25:55 myhostname kernel: usb 2-2: USB disconnect, device number 14
Jul 08 23:25:55 myhostname kernel: usb 2-2.1: USB disconnect, device number 15
Jul 08 23:25:55 myhostname kernel: usb 2-2.2: USB disconnect, device number 16
Jul 08 23:25:59 myhostname kernel: usb 2-2: new high-speed USB device number 17 using xhci_hcd
Jul 08 23:25:59 myhostname kernel: usb 2-2: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
Jul 08 23:25:59 myhostname kernel: usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Jul 08 23:25:59 myhostname kernel: usb 2-2: Product: USB 2.0 Hub
Jul 08 23:25:59 myhostname kernel: hub 2-2:1.0: USB hub found
Jul 08 23:25:59 myhostname kernel: hub 2-2:1.0: 4 ports detected
Jul 08 23:25:59 myhostname kernel: usb 2-2.1: new low-speed USB device number 18 using xhci_hcd
Jul 08 23:26:00 myhostname kernel: usb 2-2.1: New USB device found, idVendor=045e, idProduct=076c, bcdDevice= 0.83
Jul 08 23:26:00 myhostname kernel: usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jul 08 23:26:00 myhostname kernel: usb 2-2.1: Product: Microsoft® Comfort Mouse 4500
Jul 08 23:26:00 myhostname kernel: usb 2-2.1: Manufacturer: Microsoft
Jul 08 23:26:00 myhostname kernel: input: Microsoft Microsoft® Comfort Mouse 4500 as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.1/2-2.1:1.0/0003:045E:076C.0010/input/input37
Jul 08 23:26:00 myhostname kernel: microsoft 0003:045E:076C.0010: input,hidraw0: USB HID v1.11 Mouse [Microsoft Microsoft® Comfort Mouse 4500] on usb-0000:06:00.3-2.1/input0
Jul 08 23:26:00 myhostname systemd-logind[316]: Watching system buttons on /dev/input/event13 (Microsoft Microsoft® Comfort Mouse 4500)
Jul 08 23:26:00 myhostname kernel: usb 2-2.2: new low-speed USB device number 19 using xhci_hcd
Jul 08 23:26:00 myhostname kernel: usb 2-2.2: New USB device found, idVendor=046a, idProduct=0180, bcdDevice= 1.03
Jul 08 23:26:00 myhostname kernel: usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jul 08 23:26:00 myhostname kernel: usb 2-2.2: Product: wired keyboard
Jul 08 23:26:00 myhostname kernel: usb 2-2.2: Manufacturer:
Jul 08 23:26:00 myhostname kernel: input:   wired keyboard as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.2/2-2.2:1.0/0003:046A:0180.0011/input/input38
Jul 08 23:26:00 myhostname kernel: hid-generic 0003:046A:0180.0011: input,hidraw1: USB HID v1.11 Keyboard [  wired keyboard] on usb-0000:06:00.3-2.2/input0
Jul 08 23:26:00 myhostname kernel: input:   wired keyboard Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.2/2-2.2:1.1/0003:046A:0180.0012/input/input39
Jul 08 23:26:00 myhostname kernel: input:   wired keyboard System Control as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb2/2-2/2-2.2/2-2.2:1.1/0003:046A:0180.0012/input/input40
Jul 08 23:26:00 myhostname kernel: hid-generic 0003:046A:0180.0012: input,hidraw2: USB HID v1.11 Device [  wired keyboard] on usb-0000:06:00.3-2.2/input1
Jul 08 23:26:01 myhostname systemd-logind[316]: Watching system buttons on /dev/input/event14 (  wired keyboard)
Jul 08 23:26:01 myhostname systemd-logind[316]: Watching system buttons on /dev/input/event17 (  wired keyboard System Control)
Jul 08 23:26:01 myhostname systemd-logind[316]: Watching system buttons on /dev/input/event15 (  wired keyboard Consumer Control)

I will greatly appreciate any ideas, or other things to check and try.

Last edited by fabiin (2021-07-08 21:31:12)

Offline

#2 2021-07-08 21:31:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,970

Re: Intermittent (5 secs) USB device disconnect throught a USB hub [T495]

https://wiki.archlinux.org/title/Power_ … utosuspend
"-1" to disable it

Notice that userspace power management tools like TLP can and will alter the value at runtime, so if you use sth. like that, you'll have to configure it there (as well)

Online

#3 2021-07-08 21:54:09

fabiin
Member
Registered: 2021-07-08
Posts: 11

Re: Intermittent (5 secs) USB device disconnect throught a USB hub [T495]

Thanks for your fast answer. I've tried to blacklist the hub with udev rule:

# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0x1a40", ATTR{idProduct}=="0x0101", GOTO="power_usb_rules_end"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"

and disabling usb autosuspend (changed at boot time in grub):

$ cat /sys/module/usbcore/parameters/autosuspend
-1

Sadly it has no effect.

I've havn't installed any power management tool yet.

Some more informations:
- The desktop environnement is sway (on wayland).
- If only one device is connected to the hub, it work as expected. The problem occur only when two devices are connected
- Kernel 5.12.14

Last edited by fabiin (2021-07-08 22:04:20)

Offline

#4 2021-07-09 20:10:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,970

Re: Intermittent (5 secs) USB device disconnect throught a USB hub [T495]

How accurate is the frequency? Is it exactly 5s to the clock or "somewhat about 5s, sometiems 3, sometimes 8"?
Since there's a gazillion hub models under that ID, does yours come w/ an external power supply (option)?
Did you (can you) try to swap the connecting cable?
Does the hub show this behavior on other systems? (Yes, worked in the past. But that's in the past…)
You could also try to boot some live distro (ubuntu or just grml) to test the system w/ a different software stack.

Online

#5 2021-07-11 16:42:08

fabiin
Member
Registered: 2021-07-08
Posts: 11

Re: Intermittent (5 secs) USB device disconnect throught a USB hub [T495]

I'm not sure about the frequency since there is no log when the problem occur but it seems to be regular (maybe 4 secs would be more accurate)
The hub is not powered, it's a hub with a switch to select which PC (on 2) is connected to the devices. ( https://www.amazon.fr/UGREEN-Entr%C3%A9 … B01MXXQKGM )
It actually work on a raspberry Pi 3 (Raspian), a macbook pro running under Manjaro, and a PC tower running under Manjaro. The hub and cables are OK on other computers.

Last edited by fabiin (2021-07-11 16:42:32)

Offline

#6 2021-07-11 20:31:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,970

Re: Intermittent (5 secs) USB device disconnect throught a USB hub [T495]

You could still face a loose jack, so you should try a different SW stack (live distro) on the very HW.

Online

#7 2021-11-13 11:00:02

fabiin
Member
Registered: 2021-07-08
Posts: 11

Re: Intermittent (5 secs) USB device disconnect throught a USB hub [T495]

I've finally solved my issue by replacing the hub by an with USB3 support. Work as expected.

Thanks for your help

Last edited by fabiin (2021-11-13 11:00:16)

Offline

Board footer

Powered by FluxBB