When I plug in an USB ethernet dongle the keyboard stops working

Does anyone know why this happens? As soon as I plug in this dongle https://www.aliexpress.com/item/1005007039245974.html (USB3 type A, gigabit version) the keyboard will stop working, when I remove it the keyboard works again.

Under the hood, the internal keyboard is also a USB device. So it smells like somethingā€™s going awry with the USB system. If I had to take a wild stab in the dark, Iā€™d say the device is trying to draw too much power, and the uConsole is shutting the bus down. But yeah, wild stab in the dark.

Couple of questions, have you tried this both with on battery power and with the uConsole plugged in? Have you tried the ethernet adapter on another machine?

The other thing worth looking at is what the kernel is logging when you connect / disconnect the adapter. Open a terminal on the uConsole, and run sudo dmesg -w to tail the kernel log. Then plug your device in and watch what is logged. Then unplug the device and watch what is logged.

Finally, copying those logs in to a reply will probably help others figure out whatā€™s going on. Use the ā€œpreformatted textā€ button to make the logs easier to read.

1 Like

Hi,

Thanks for the tips. I tried it again and I found that if I wait long enough (5s) the keyboard starts working again. Using a tester the dongle only pulls around 0.03A with nothing connected.

The keyboard seems to disconnect and then reconnect:

[  221.809061] usb 1-1.1: USB disconnect, device number 8
[  222.275083] usb 1-1.1: new full-speed USB device number 9 using dwc2
[  222.380260] usb 1-1.1: New USB device found, idVendor=1eaf, idProduct=0003, bcdDevice= 2.01
[  222.380276] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  222.380281] usb 1-1.1: Product: Maple 003
[  222.380287] usb 1-1.1: Manufacturer: LeafLabs
[  222.380292] usb 1-1.1: SerialNumber: LLM 003
[  222.607226] usb 1-1.2: new high-speed USB device number 10 using dwc2
[  222.719882] usb 1-1.2: New USB device found, idVendor=0bda, idProduct=5411, bcdDevice= 1.01
[  222.719899] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  222.719905] usb 1-1.2: Product: USB2.1 Hub
[  222.719911] usb 1-1.2: Manufacturer: Generic
[  222.720584] hub 1-1.2:1.0: USB hub found
[  222.721252] hub 1-1.2:1.0: 5 ports detected
[  223.011397] usb 1-1.2.3: new high-speed USB device number 11 using dwc2
[  223.116854] usb 1-1.2.3: New USB device found, idVendor=0bda, idProduct=8153, bcdDevice=30.00
[  223.116867] usb 1-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[  223.116872] usb 1-1.2.3: Product: USB 10/100/1000 LAN
[  223.116877] usb 1-1.2.3: Manufacturer: Realtek
[  223.116883] usb 1-1.2.3: SerialNumber: 000001
[  223.195450] usb 1-1.2.3: reset high-speed USB device number 11 using dwc2
[  223.332808] r8152 1-1.2.3:1.0: load rtl8153a-4 v2 02/07/20 successfully
[  223.368525] r8152 1-1.2.3:1.0 eth1: v1.11.11
[  224.112896] usb 1-1.1: USB disconnect, device number 9
[  224.339866] usb 1-1.1: new full-speed USB device number 12 using dwc2
[  224.445640] usb 1-1.1: New USB device found, idVendor=1eaf, idProduct=0024, bcdDevice= 2.00
[  224.445656] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  224.445662] usb 1-1.1: Product: uConsole
[  224.445668] usb 1-1.1: Manufacturer: ClockworkPI
[  224.445673] usb 1-1.1: SerialNumber: 20230713
[  224.449243] input: ClockworkPI uConsole Consumer Control as /devices/platform/soc/fe980000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:1EAF:0024.0003/input/input19
[  224.508229] input: ClockworkPI uConsole Keyboard as /devices/platform/soc/fe980000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:1EAF:0024.0003/input/input20
[  224.508735] input: ClockworkPI uConsole as /devices/platform/soc/fe980000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:1EAF:0024.0003/input/input21
[  224.508962] input: ClockworkPI uConsole Mouse as /devices/platform/soc/fe980000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:1EAF:0024.0003/input/input22
[  224.509217] hid-generic 0003:1EAF:0024.0003: input,hidraw0: USB HID v1.10 Keyboard [ClockworkPI uConsole] on usb-fe980000.usb-1.1/input0
[  224.509532] cdc_acm 1-1.1:1.1: ttyACM0: USB ACM device

If Iā€™m reading that right, it looks like the hub is also reconnecting. How odd. Iā€™d be curious if that also happens if you plug in another device. But at least you know it eventually sorts itself out and you can use the ethernet. :slight_smile:

yeah, chinese electronics ;]
For what i see device is ā€˜usb3ā€™, ĀµConsoleā€™s USB A port is USB2 high speed 480MBps.
Your measurments of power draw might be flawed, unless youā€™re using oscilloscope with decent samplerate youā€™ll see 0.03A of power draw which is true for 99.7% of time.
What you might miss is 1.5A spike appearing for 1msec which force-protects USB hub from frying, thus killing your keyboard connectivity.

iā€™ve tested pure usb2.0 tplink fast ethernet dongle
Bus 001 Device 002: ID 0b95:772b ASIX Electronics Corp. AX88772B
and can confirm it works flawlessly.

I had a similar issue with a dongle I bought last year. It turned out the dongle was pulling too much power from the USB port and messing up my keyboard. I fixed it by using a powered USB hub. Worth a shot to see if that works for you!

Hi,
I have the exact same issue with connecting a raspberry pi pico wired to a sensor :
When I plug it, the keyboards freezes but the pico is still powered on.
The keyboard only keeps working when the pico is booting in flashing mode (so it appears as a USB drive). If I flash it without disconnecting it, the keyboard is still connected and I can communicate via serial with the pico board.
I encountered a strange behavior of the tty port I was debuging on, the /dev/ttyACM1 and /dev/ttyCxx0 seemed to switch depending on when I plugged and unplugged the pico, but I donā€™t have any idea of whether this is keyboard related tty or notā€¦
I will look into current spike and board protection, but this seems weird as the pico board is always powered, even when I got no keyboard.

The USB keyboard and USB-A port share the same power circuit and upstream current limiter. In some cases, the connection capacitance will probably introduce an instant voltage drop, pulling power from the keyboard side. Therefore, the keyboard loses power, and maybe enter brownout mode.

It can be an annoying hardware design issue. Fortunately, a USB keyboard is safe to be hot-plugged at any time, without causing significant problems which USB flash drives are likely to have.

I donā€™t know the exact reason why the keyboard is taking so long to reset in your cases. I thought it would be less than 3 seconds.

1 Like