Possible USB peripheral issue on Rock 5B+ (missing DISCONNECT event)?

I’ll reproduce and try to fix it.

it’s always high-speed on my end, I test it on ROCK 5B+

Thanks for checking! I’ve also run into another issue (which might be related to what I described in my previous post), where after several USB cable disconnects and reconnects, the kernel or at least parts of it, appeared to freeze. Unplugging and replugging the USB cable no longer triggered any events, or at least nothing was printed to the console.

When I tried to get the kernel log using sudo dmesg or list the processes with ps aux, neither command produced any output just a blinking cursor that I could interrupt with Ctrl+C. SSH access also stopped working. Meanwhile, the heartbeat LED started blinking faster and faster, indicating that the system was under some kind of load. However, the 5B+ could still be shut down using a long press of the power button. I managed to reproduce this freeze 3 times within a short period.

Once I was able to retrieve the kernel log before the system completely hung. It shows that the issue originated in the mass storage gadget driver, and the last log entry seems to point to a potential power supply or memory-related issue.

Have you encountered this kind of behavior before?

Here’s the kernel log:
usb_kernel_error.zip (11.1 KB)

Here’s the power supply I’m using:

and when I unplug the usb cable, the value /sys/class/udc/fc400000.usb/current_speed is UNKNOWN

Good behavior is when current_speed switches to UNKNOWN after unplugging the USB cable, this is triggered by the disconnect event.

Has this problem been reproduced in other adapters?

Hi @Nasca!

It turned out that there is interference in the electrical network as well, causing strange anomalies. I checked in another location with a different power adapter, and the freeze still occurred, although much less frequently. So let’s set this issue aside for now.

However, the speed issue still occurs every time. What I found out is that my desktop Intel NUC has both an ASMedia and an Intel host controller. The lower speeds (full-speed and high-speed) seem to occur only when the 5B+ is connected to the USB ports controlled by the ASMedia controller.

On the other hand, if I connect a USB flash drive to these ports, it never switches to the lower speeds, it always works at SuperSpeed.

How can I find out what is causing this speed issue with the 5B+? Could you take a look at this?