JetsonHacks

Developing on NVIDIA® Jetson™ for AI on the Edge

USB Autosuspend – NVIDIA Jetson TK1

In order to conserve power, by default the Jetson TK1 suspends inactive USB ports. This is commonly referred to as “USB Autosuspend”. Unfortunately some USB devices (such as USB cameras) have issues with this setting. If you have a USB hub attached to the Jetson with such a device plugged in, you will see that when the machine boots the light for the device turns on, then after a few seconds the light turns off. The Jetson has suspended the device, in most cases disabling it for all intent and purposes.

In previous blog posts, such as Post Flash Setup, the work around to this issue was to run a shell script during boot up to turn off autosuspend. The script would execute a line similar to:

$ sudo bash -c ‘echo -1 > /sys/module/usbcore/parameters/autosuspend’

You can also run this from a command line in a Terminal to accomplish the task.

There is one issue to this work around. The Jetson boots and then runs the script. Unfortunately, in the time that elapses during the boot process before running the script, the USB port may be suspended. In several cases, disabling the autosuspend does not “enable” the suspended port, but requires that the device be replugged.

With the advent of Linux for Tegra (L4T) 21.X, there is a much better fix for this issue. In switching from fastboot to uboot as the default boot loader, uboot allows a command line to be passed to the boot process. This allows us to set autosuspend off as part of the boot process, rather than after the boot process has completed.

To turn off autosuspend, the command usbcore.autosuspend=-1 should be appended to the command line in the file /boot/extlinux/extlinux.conf. You can add the line manually using an editor on the file, or use this handy command from a Terminal:

$ sudo sed -i ‘$s/$/ usbcore.autosuspend=-1/’ /boot/extlinux/extlinux.conf

This is a pretty useful trick.

Facebook
Twitter
LinkedIn
Reddit
Email
Print

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer

Some links here are affiliate links. If you purchase through these links I will receive a small commission at no additional cost to you. As an Amazon Associate, I earn from qualifying purchases.

Books, Ideas & Other Curiosities