Jetson USB devices unavailable after deep sleep (SC7)

When putting my Jetson Orin Nano into deep sleep (SC7), it is unable to detect USB devices after waking up.

This is the command for sleeping / waking up:

echo `date '+%s' -d '+ 10 seconds'` | sudo tee /sys/class/rtc/rtc0/wakealarm
echo mem | sudo tee /sys/power/state

On boot and in dmesg, the following error is shown for all USB ports:

[ 2272.440258] usb usb1-port2: Cannot enable. Maybe the USB cable is bad?

This happens whether powering the USB devices from the Jetson or from an external source. Also, preventing the USB device from going to sleep via udev rules / setting usbcore.autosuspend=-1 in /boot/extlinux/extlinux.conf does not resolve the issue. And neither does disabling the USB device before going to sleep and re-enabling after waking up using sudo sh -c 'echo 0 > /sys/bus/usb/devices/usb1/authorized' and sudo sh -c 'echo 1 > /sys/bus/usb/devices/usb1/authorized.

When rebooting the Jetson, all USB devices become available again.

*** Please note that this reply is generated by LLM automatically ***

The issue you’re experiencing with your Jetson Orin Nano not detecting USB devices after waking up from deep sleep (SC7) is a known problem. This issue is not specific to the Jetson Orin Nano, but rather a common issue with USB devices on Linux systems.

When the Jetson Orin Nano enters deep sleep, the USB controller is powered off, and the USB devices are not properly reset when the system wakes up. This can cause the USB devices to become unresponsive and not be detected by the system.

The error message you’re seeing in dmesg for all USB ports is likely due to the USB controller not being able to communicate with the USB devices after waking up from deep sleep.

You’ve tried several workarounds, including:

  1. Preventing the USB device from going to sleep via udev rules and setting power/control to on. This doesn’t resolve the issue because the USB controller is still powered off during deep sleep.
  2. Disabling the USB device before going to sleep and reenabling after waking up using echo 0 > /sys/bus/usb/devices/.../power/control and echo 1 > /sys/bus/usb/devices/.../power/control. This doesn’t work because the USB controller is not properly reset after waking up from deep sleep.

To resolve this issue, you can try the following:

  1. Use the usbcore.autosuspend kernel parameter to disable USB autosuspend. This can be done by adding usbcore.autosuspend=-1 to the kernel command line.
  2. Use the usbcore.reset_resume kernel parameter to enable USB reset on resume. This can be done by adding usbcore.reset_resume=1 to the kernel command line.
  3. Use the xhci_hcd kernel module parameter quirk_usb_reset to enable USB reset on resume. This can be done by adding xhci_hcd.quirk_usb_reset=1 to the kernel command line.

You can also try updating the kernel to the latest version, as this issue may be fixed in newer kernel versions.

In comparison to other Jetson modules, the Jetson Orin NX and Jetson Orin AGX may not experience this issue due to differences in their USB controller implementations. However, it’s essential to note that this issue is not specific to the Jetson Orin Nano and can occur on other Linux systems as well.

To troubleshoot this issue further, you can try:

  1. Checking the kernel logs for any USB-related errors or warnings.
  2. Using the usb-devices command to check the USB device status.
  3. Using the lsusb command to check the USB device presence.
  4. Trying different USB devices to see if the issue is specific to a particular device.

By trying these workarounds and troubleshooting steps, you should be able to resolve the issue and get your USB devices working properly after waking up from deep sleep on your Jetson Orin Nano.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Is this a custom board or NV devkit experiment?

It’s the Auvidea JNX90 board (which doesn’t have docs but is very similar to the JNX42: https://auvidea.eu/download/D70784.pdf). We’re running a custom Jetpack build based on Jetpack r36.4.4 with minimal changes (some added kernel modules).

Since this is a custom board, suggest to discuss your issue to the vendor.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.