Problem with usb after many connections

Hello, we are using this HW:
Apalis iMX8 QuadMax
Ixora Carrier Board

And using:
Torizon Embedded Linux OS (latest)
(I can specify everything about the OS if needed)

we are facing a problem where after many cycles of connecting and disconnecting the USB
(we don’t know the number of cycles plugin-plugout, but it usually happens after 1-1.5 days)

When it stops working, it is not possible to find the usb in the system (but it does not appear in the device list under dev/, even after re-plugin).

after restarting toradex, usb is visible again (that day/day and a half)


We attempted to disable USB controller suspension
(echo on > /sys/bus/usb/devices/1-1/power/control (on used bus))
but without success.

After several attempts I have to ask you for advice, what to try and possibly what the problem might be.

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Based on the context provided, it seems you are experiencing an issue with USB connectivity on the Apalis iMX8 QuadMax module paired with the Ixora Carrier Board, running Torizon Embedded Linux OS. The problem occurs after many cycles of connecting and disconnecting the USB device, and the USB device stops being recognized by the system until a restart is performed.

Here are a few steps and suggestions to help troubleshoot and potentially resolve the issue:

  1. Check Kernel Logs:

    • Use the dmesg command to check the kernel logs for any USB-related error messages when the issue occurs. This can provide insights into what might be going wrong.
      dmesg | grep usb
      
  2. Monitor USB Power Management:

    • Ensure that USB power management is not causing the issue. You mentioned trying to disable USB controller suspension, but it might be worth verifying the power settings for all USB devices.
      for device in /sys/bus/usb/devices/*/power/control; do echo on > $device; done
      
  3. Check for USB Enumeration Issues:

    • Since the Toradex Easy Installer SPL/U-Boot bootloader re-enumerates as different USB devices during recovery mode, ensure that there are no enumeration issues when the USB device is reconnected. This can sometimes cause the device to not be recognized properly.
  4. Update to the Latest BSP:

    • Ensure that you are using the latest Board Support Package (BSP) for the Apalis iMX8. There might be updates or patches that address USB stability issues.
  5. Test with Different USB Ports and Cables:

    • Try using different USB ports on the Ixora Carrier Board and different USB cables to rule out any hardware-related issues.
  6. Check for Known Issues:

    • Review the Apalis iMX8 Errata and the Software Issue Tracker for any known issues related to USB connectivity. There might be documented issues and workarounds available.
  7. Contact Toradex Support:

    • If the issue persists, consider reaching out to Toradex technical support for further assistance. Provide them with detailed information about your setup, the steps you have already taken, and any relevant logs.

By following these steps, you should be able to gather more information about the root cause of the USB connectivity issue and potentially find a solution. If you need further assistance, don’t hesitate to contact Toradex support with the details of your problem.

Please, also check if these links can help you solve your problem:

Enabling USB Client feature in Torizon.

Hi @MartinF

This issue is really hard for us to reproduce on our side. Could you share some more details about the tests you did on your side?

  1. Which USB port are you using? This issue happens on all of Ixora USB ports?

  2. Can you give a better estimation of the number of cycles? Is it in the order of 100s, 1000s or 10000s?

  1. Do you have the dmesg logs of the tests?

Also, could you provide the exactly version of your carrier board and the output of the command?

tdx-info

Hello Allan, sorry for late respond.
I was on vacation.

tdx-info

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.129-6.5.0+git.6f8fd49366db #1-TorizonCore SMP PREEMPT Fri Dec 22 11:15:52 UTC 2023
Kernel command line:      pci=nomsi root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/d84a97a24c27b978c409f4a362d0c0c28589d246081ac1a02c48b317582ca645/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.5.0-build.8
Distro variant:           VARIANT="Docker"
Hostname:                 apalis-imx8-14904105
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Apalis iMX8QM V1.1 on Apalis Evaluation Board
Toradex version:          0067 V1.1A
Serial number:            14904105
Processor arch:           aarch64
------------------------------------------------------------

Which USB port are you using? This issue happens on all of Ixora USB ports?
usb 1-1
root hub and first one (but on some devices it is 1-2)


Can you give a better estimation of the number of cycles? Is it in the order of 100s, 1000s or 10000s?

one test is 40sec (plugin plugout)
two shifts (8h), so can be 1440x cycles


Do you have the dmesg logs of the tests?

the logs are mostly like this

[ 7025.785540] usb 1-1: USB disconnect, device number 35
[ 7055.099878] usb 1-1: new full-speed USB device number 36 using xhci-hcd
[ 7055.294254] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 7055.433911] usb 1-1: USB disconnect, device number 36
[ 7055.839900] usb 1-1: new full-speed USB device number 37 using xhci-hcd
[ 7056.034117] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 7071.177684] usb 1-1: USB disconnect, device number 37
[ 7091.630776] usb 1-1: new full-speed USB device number 38 using xhci-hcd
[ 7091.815372] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 7091.858256] usb 1-1: USB disconnect, device number 38
[ 7092.260780] usb 1-1: new full-speed USB device number 39 using xhci-hcd
[ 7092.445077] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 7107.133396] usb 1-1: USB disconnect, device number 39
[ 7126.861658] usb 1-1: new full-speed USB device number 40 using xhci-hcd
[ 7127.056194] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 7128.080652] usb 1-1: USB disconnect, device number 40
[ 7128.491710] usb 1-1: new full-speed USB device number 41 using xhci-hcd
[ 7128.676151] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

but i will try to get the logs right after the incident