Failed to disable autosuspend

Hi,

Is there a way to disable autosuspend on L4t R32.2.1?

I could disable autosuspend on L4t R32.4.2 by adding usbcore.autosuspend=-1 in extlinux.conf. (see below)
But not on L4t R32.2.1?

  INITRD /boot/initrd
  APPEND ${cbootargs} usbcore.autosuspend=-1

APPEND ${cbootargs} quiet

We tried to disable USB autosuspend due to we encountered an error as launching a USB camera on Agx. And the error shows once after system boot.

The error message "Failed to allocate required memory.
We suspend if it’s related suspend.

and
[ 481.963736] uvcvideo: Failed to submit URB 0 (-2).

Thank you for any advice,

Hi,
The issue may not be related to autosuspend. Please run

$ v4l2-ctl -d /dev/video1 --list-formats-ext

And share information of the USB cameras.

Hi DaneLLL,

Thanks for your support.
The USB camera is a stream from a video converter. (HDMI to USB)

nvidia@agx:~$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘YUYV’
Name : YUYV 4:2:2
Size: Discrete 1920x1080
Interval: Discrete 0.017s (60.000 fps)

nvidia@agx:~$ gst-device-monitor-1.0
Probing devices…

Device found:

name  : Monitor of Built-in Audio Digital Stereo (HDMI 3)
class : Audio/Source
caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
properties:
	device.description = "Monitor\ of\ Built-in\ Audio\ Digital\ Stereo\ \(HDMI\ 3\)"
	device.class = monitor
	alsa.card = 0
	alsa.card_name = tegra-hda-galen-t194
	alsa.long_card_name = "tegra-hda-galen-t194\ at\ 0x3518000\ irq\ 68"
	device.bus_path = platform-3510000.hda
	sysfs.path = /devices/3510000.hda/sound/card0
	device.form_factor = internal
	device.string = 0
	module-udev-detect.discovered = 1
	device.icon_name = audio-card
gst-launch-1.0 pulsesrc device=alsa_output.platform-3510000.hda.hdmi-stereo-extra2.monitor ! ...

Device found:

name  : Lattice USB 3.0 Video Bridge Analog Stereo
class : Audio/Source
caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
properties:
	alsa.resolution_bits = 16
	device.api = alsa
	device.class = sound
	alsa.class = generic
	alsa.subclass = generic-mix
	alsa.name = "USB\ Audio"
	alsa.id = "USB\ Audio"
	alsa.subdevice = 0
	alsa.subdevice_name = "subdevice\ \#0"
	alsa.device = 0
	alsa.card = 1
	alsa.card_name = "Lattice\ USB\ 3.0\ Video\ Bridge"
	alsa.long_card_name = "Lattice\ Lattice\ USB\ 3.0\ Video\ Bridge\ at\ usb-3610000.xhci-4\,\ super\ speed"
	alsa.driver_name = snd_usb_audio
	device.bus_path = platform-3610000.xhci-usb-0:4:1.3
	sysfs.path = /devices/3610000.xhci/usb2/2-4/2-4:1.3/sound/card1
	udev.id = usb-Lattice_Lattice_USB_3.0_Video_Bridge-03
	device.bus = usb
	device.vendor.id = 04b4
	device.vendor.name = "Cypress\ Semiconductor\ Corp."
	device.product.id = 00ed
	device.product.name = "Lattice\ USB\ 3.0\ Video\ Bridge"
	device.serial = Lattice_Lattice_USB_3.0_Video_Bridge
	device.form_factor = webcam
	device.string = front:1
	device.buffering.buffer_size = 384000
	device.buffering.fragment_size = 192000
	device.access_mode = mmap+timer
	device.profile.name = analog-stereo
	device.profile.description = "Analog\ Stereo"
	device.description = "Lattice\ USB\ 3.0\ Video\ Bridge\ Analog\ Stereo"
	alsa.mixer_name = "USB\ Mixer"
	alsa.components = USB04b4:00ed
	module-udev-detect.discovered = 1
	device.icon_name = camera-web-usb
gst-launch-1.0 pulsesrc device=alsa_input.usb-Lattice_Lattice_USB_3.0_Video_Bridge-03.analog-stereo ! ...

Device found:

name  : Monitor of Built-in Audio Analog Stereo
class : Audio/Source
caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
properties:
	device.description = "Monitor\ of\ Built-in\ Audio\ Analog\ Stereo"
	device.class = monitor
	alsa.card = 2
	alsa.card_name = tegra-snd-t19x-mobile-rt565x
	alsa.long_card_name = tegra-snd-t19x-mobile-rt565x
	device.bus_path = platform-sound
	sysfs.path = /devices/sound/sound/card2
	device.form_factor = internal
	device.string = 2
	module-udev-detect.discovered = 1
	device.icon_name = audio-card
gst-launch-1.0 pulsesrc device=alsa_output.platform-sound.analog-stereo.monitor ! ...

Device found:

name  : Built-in Audio Analog Stereo
class : Audio/Source
caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
properties:
	alsa.resolution_bits = 16
	device.api = alsa
	device.class = sound
	alsa.class = generic
	alsa.subclass = generic-mix
	alsa.name = ""
	alsa.id = "ADMAIF1\ CIF\ ADMAIF1-0"
	alsa.subdevice = 0
	alsa.subdevice_name = "subdevice\ \#0"
	alsa.device = 0
	alsa.card = 2
	alsa.card_name = tegra-snd-t19x-mobile-rt565x
	alsa.long_card_name = tegra-snd-t19x-mobile-rt565x
	device.bus_path = platform-sound
	sysfs.path = /devices/sound/sound/card2
	device.form_factor = internal
	device.string = front:2
	device.buffering.buffer_size = 32768
	device.buffering.fragment_size = 16384
	device.access_mode = mmap+timer
	device.profile.name = analog-stereo
	device.profile.description = "Analog\ Stereo"
	device.description = "Built-in\ Audio\ Analog\ Stereo"
	module-udev-detect.discovered = 1
	device.icon_name = audio-card
gst-launch-1.0 pulsesrc device=alsa_input.platform-sound.analog-stereo ! ...

Device found:

name  : Built-in Audio Digital Stereo (HDMI 3)
class : Audio/Sink
caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
properties:
	alsa.resolution_bits = 16
	device.api = alsa
	device.class = sound
	alsa.class = generic
	alsa.subclass = generic-mix
	alsa.name = "HDMI\ 0"
	alsa.id = "HDMI\ 0"
	alsa.subdevice = 0
	alsa.subdevice_name = "subdevice\ \#0"
	alsa.device = 8
	alsa.card = 0
	alsa.card_name = tegra-hda-galen-t194
	alsa.long_card_name = "tegra-hda-galen-t194\ at\ 0x3518000\ irq\ 68"
	device.bus_path = platform-3510000.hda
	sysfs.path = /devices/3510000.hda/sound/card0
	device.form_factor = internal
	device.string = "hdmi:0\,2"
	device.buffering.buffer_size = 65536
	device.buffering.fragment_size = 32768
	device.access_mode = mmap+timer
	device.profile.name = hdmi-stereo-extra2
	device.profile.description = "Digital\ Stereo\ \(HDMI\ 3\)"
	device.description = "Built-in\ Audio\ Digital\ Stereo\ \(HDMI\ 3\)"
	alsa.mixer_name = "Nvidia\ Tegra18x\ SOR0"
	alsa.components = "HDA:10de002d\,10de0101\,00100100\ HDA:10de002e\,10de0101\,00100100\ HDA:10de002f\,10de0101\,00100100\ HDA:10de0030\,10de0101\,00100100"
	module-udev-detect.discovered = 1
	device.icon_name = audio-card
gst-launch-1.0 ... ! pulsesink device=alsa_output.platform-3510000.hda.hdmi-stereo-extra2

Device found:

name  : Built-in Audio Analog Stereo
class : Audio/Sink
caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
properties:
	alsa.resolution_bits = 16
	device.api = alsa
	device.class = sound
	alsa.class = generic
	alsa.subclass = generic-mix
	alsa.name = ""
	alsa.id = "ADMAIF1\ CIF\ ADMAIF1-0"
	alsa.subdevice = 0
	alsa.subdevice_name = "subdevice\ \#0"
	alsa.device = 0
	alsa.card = 2
	alsa.card_name = tegra-snd-t19x-mobile-rt565x
	alsa.long_card_name = tegra-snd-t19x-mobile-rt565x
	device.bus_path = platform-sound
	sysfs.path = /devices/sound/sound/card2
	device.form_factor = internal
	device.string = front:2
	device.buffering.buffer_size = 32768
	device.buffering.fragment_size = 16384
	device.access_mode = mmap+timer
	device.profile.name = analog-stereo
	device.profile.description = "Analog\ Stereo"
	device.description = "Built-in\ Audio\ Analog\ Stereo"
	module-udev-detect.discovered = 1
	device.icon_name = audio-card
gst-launch-1.0 ... ! pulsesink device=alsa_output.platform-sound.analog-stereo

Device found:

name  : Lattice USB 3.0 Video Bridge
class : Video/Source
caps  : video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1;
properties:
	udev-probed = true
	device.bus_path = platform-3610000.xhci-usb-0:4:1.0
	sysfs.path = /sys/devices/3610000.xhci/usb2/2-4/2-4:1.0/video4linux/video0
	device.bus = usb
	device.subsystem = video4linux
	device.vendor.id = 04b4
	device.vendor.name = Lattice
	device.product.id = 00ed
	device.product.name = "Lattice\ USB\ 3.0\ Video\ Bridge"
	device.serial = Lattice_Lattice_USB_3.0_Video_Bridge
	device.capabilities = :capture:
	device.api = v4l2
	device.path = /dev/video0
	v4l2.device.driver = uvcvideo
	v4l2.device.card = "Lattice\ USB\ 3.0\ Video\ Bridge"
	v4l2.device.bus_info = usb-3610000.xhci-4
	v4l2.device.version = 264588 (0x0004098c)
	v4l2.device.capabilities = 2216689665 (0x84200001)
	v4l2.device.device_caps = 69206017 (0x04200001)
gst-launch-1.0 v4l2src ! ...

Thank you,

HI,
Please try the pipeline and check if you can see video preview:

$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=60/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvoverlaysink

Hi DaneLLL,

Video preview ok by using the command you provided.
And the once error still showed.

nvidia@agx:~$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=60/1 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvoverlaysink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
gstv4l2src.c(658): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:01.019573201
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

nvidia@agx:~ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=60/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvoverlaysink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ^Chandling interrupt. Interrupt: Stopping pipeline ... Execution ended after 0:00:05.132856142 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... nvidia@agx:~

Thank you,

Hi,
For information, do you connect the camera to the type-A port? Or type-C port(J512 or J513)?
Do you see the camera is enumerated as superspeed?

Hi DaneLLL,

It’s set to superspeed.
It’s connected to a type-A port (USB3) on a customized board.

nvidia@agx:~$ lsusb
Bus 002 Device 002: ID 04b4:00ed Cypress Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 001 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120

nvidia@agx:~ lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M |__ Port 4: Dev 2, If 0, Class=Video, Driver=uvcvideo, 5000M |__ Port 4: Dev 2, If 1, Class=Video, Driver=uvcvideo, 5000M |__ Port 4: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 5000M |__ Port 4: Dev 2, If 3, Class=Audio, Driver=snd-usb-audio, 5000M |__ Port 4: Dev 2, If 4, Class=Audio, Driver=snd-usb-audio, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 12M |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 12M |__ Port 1: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 2: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M nvidia@agx:~

nvidia@agx:~ dmesg | grep -u SuperSpeed [ 4.693288] tegra-xusb 3610000.xhci: Host supports USB 3.1 Enhanced SuperSpeed [ 9.210668] usb 2-4: new SuperSpeed USB device number 2 using tegra-xusb nvidia@agx:~

Plus, the error could be duplicated on AGX Xavier EVB board too.

Thank you,

hi,
We have USB3 camera See3CAM CU135. Will try and see if we can reproduce the issue.

Hi,
We have seen the issue that USB3 camera is enumerated as high-speed when connecting to type-A port(J507) on Xavier. We will check this.

It works fine if we use type-C to type-A adapter and connect to type-C(J512) port. If you use Xavier devkit. you may try this.

Hi,

We would need further information about the devkit. Please check and confirm if the devkit board ID is 180-82822-DAAF-B00. If not, please share the board ID.