0

I have a small linux test box that has one fancy usb lan gigabit adapter on it. This adapter is connected first with a 4 port usb3 hub then to the machine.

machine -> usb3 4port hub -> lan adapter

I've tried also powering the hub externally but the result doesn't change. After some random time this usb lan interface just dies.

Here's the journalctl log, the interface is called eth1

myhost kernel: usb 2-1: USB disconnect, device number 3
myhost kernel: usb 2-1.1: USB disconnect, device number 5
myhost kernel: ax88179_178a 2-1.1:1.0 eth1: unregister 'ax88179_178a' usb-0000:00:14.0-1.1, ASIX AX88179 
myhost kernel: ax88179_178a 2-1.1:1.0 eth1: Failed to read reg index 0x0002: -19
myhost kernel: ax88179_178a 2-1.1:1.0 eth1: Failed to write reg index 0x0002: -19
myhost systemd[1]: Stopping ifup for eth1...
myhost kernel: ax88179_178a 2-1.1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
myhost kernel: ax88179_178a 2-1.1:1.0 eth1 (unregistered): Failed to write reg index 0x0001: -19
myhost kernel: ax88179_178a 2-1.1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19

this is instead what happens to the lsusb log, before the device not responding:

Bus 002 Device 007: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 006: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 003: ID 05e3:0626 Genesys Logic, Inc. 
Bus 002 Device 004: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:07dc Intel Corp. 
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

after the device not responding:

Bus 002 Device 007: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 006: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 004: ID 05e3:0626 Genesys Logic, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:07dc Intel Corp. 
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

It appears that the usb3 hub has 2 device address the usb2 and the usb3 part... the usb3 part Bus 002 Device 002 dies while the Bus 001 Device 002 still is up.

Rebooting the system fix the problem for another 30 minutes.

However rebooting the system is very annoying.

There's a code that I could call in order to physically disable and re enable the usb hub or the entire usb root without having to reboot the system every 30 min?

I would like to write a cron script to workaround this stuff before changing the piece of hardware that is so unstable.

I've tried also some other solution proposed in other questions but I would like to restart the whole USB root of devices, this could work instead the restart of single device that is not accessible anymore.

Thanks

1 Answer 1

1

You could try using uhubctl to powerdown and powerup the port. This should cause the device to reset and that should kernel to redetect it.

eg on my machine this will turn off/on USB port 1-2.2

# /usr/sbin/uhubctl -l 1-2 -p 2 -a off  
Current status for hub 1-2 [0bda:5411 Generic 4-Port USB 2.0 Hub, USB 2.10, 4 ports]
  Port 2: 0101 power connect []
Sent power off request
New status for hub 1-2 [0bda:5411 Generic 4-Port USB 2.0 Hub, USB 2.10, 4 ports]
  Port 2: 0000 off

# uhubctl -l 1-2 -p 2 -a on 
Current status for hub 1-2 [0bda:5411 Generic 4-Port USB 2.0 Hub, USB 2.10, 4 ports]
  Port 2: 0000 off
Sent power on request
New status for hub 1-2 [0bda:5411 Generic 4-Port USB 2.0 Hub, USB 2.10, 4 ports]
  Port 2: 0101 power connect []

Not all USB ports can be controlled that way, but I've used it to re-detect USB devices before.

Working out the correct values for -l and `-p can be a bit of trial and error.

You wrote

myhost kernel: usb 2-1.1: USB disconnect, device number 5

So I would first try -l 2-1 -p 1

3
  • Thank you for your answer, howerver it seems that uhubctl isn't available for Debian 9. There's a way to install it ? I'm not an expert with backports but even with it, it still seems unavailable. Commented Jul 17, 2022 at 7:27
  • You could try to build it from source; dunno if something as old as Debian 9 will work, though! github.com/mvp/uhubctl Commented Jul 18, 2022 at 1:05
  • I understand but in my request was clearly stated I needed it for Debian 9 :( I wonder instead why a thing like the usb power management that is such a core feature waited debian 10 ! in order to be supported... this is insane... is like not having a sound card driver in an os that is so advanced that can handle fiber optics connections and VR devices but miss the very basics... thanks for your support anyway :P Commented Jul 20, 2022 at 8:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .