Cause: The USBFS buffer size is too small (16 MB by default). The following command can be used to check usbfs_memory_mb size. 


    cat /sys/module/usbcore/parameters/usbfs_memory_mb 



By default, the Linux kernel will allocate as little as 16MB of buffer space for all USB devices. For larger, higher speed devices (such as the Pixelink USB3 cameras) this is not adequate.  At 400 MB/s, 16MB of buffer space only amounts to 40 ms of buffer time before data loss occurs. Calling the API function PxLSetStreamState to turn on the camera stream, will return a warring return code of ApiSuccessLowMemory if your system is currently configured for very little buffer space. See the sample application lowUsbMemory for details.


To increase the amount of USB buffer space to a more appropriate value (in this case, 1GB), do the following:


Solution for systems using GRUB based bootloader (such as Ubuntu running on a PC):


1. Edit the file ‘/etc/default/grub’ and look for the line ‘GRUB_CMDLINE_LINUX_DEFAULT=”{some_text}”
2. Append ”usbcore.usbfs_memory_mb=1000” to the end of some_text. For example:
    GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” 

    becomes

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash usbcore.usbfs_memory_mb=1000”

3. Effect this change with the following command: 

    sudo update-grub

4. Manually set the memory limit (to 1GB) by entering the command: 

    ‘sudo modprobe usbcore usbfs_memory_mb=1000’

5. Reboot your system for this change to take effect.


Solution for Nvidia Jetsons: Tk1 (with L4T drivers version 21.1 or newer) 

                                            Tx1 (with L4T drivers version 24.1 or newer)


1. Configure the USB environment. In particular, the following file must be edited 

    ‘/boot/extlinux/extlinux.conf’ 

2. Append file with these two entries: 

    1. usb_port_owner_info=2 

    2. usbcore.usbfs_memory_mb=1000


Note: The usb_port_owner_info entry may already be there, but its set to a value of 0. A 0 value will have the USB port operate in USB2 mode, while a value of 2 is necessary for USB3 operation.


Solution for ODROID-XU3 and XU4


For these systems, the amount of USB buffer space can be via a configuration file that gets loaded at boot time. 

1. Edit the following file:

    '/media/boot/boot.ini'

2. Find the entry that starts with 'setenv bootargs'.

3. Add 'usbcore.usbfs_memory_mb=1000' to that line.