Technical Background

The USB module of the Linux kernel features a memory limit of 16 MB, which will lead to restrictions in the use of USB multi-camera systems.


Modification of the kernel’s USB module memory

Memory limit determination

The memory limit of the Linux USB module can be determined by running the following command:

# cat /sys/module/usbcore/parameters/usbfs_memory_mb

By default, the returned value should be 16. This memory limit is a kernel boot argument that has to be changed at boot time. The kernel boot arguments are managed by the systems bootloader. The most major distributions such as Ubuntu, Debian or Fedora all use the grub bootloader. The procedure to change the boot arguments for the grub bootloader is described below.

 

Change memory limit with GRUB bootloader

The file /etc/default/grub[1] contains an entry GRUB_CMDLINE_LINUX_DEFAULT. On Ubuntu systems the complete entry looks similar to following: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash".

 

By adding the argument usbcore.usbfs_memory_mb=xxx[2] the memory limit will be increased at the next boot.

 

For increasing the memory limit to 1000 MB, the complete entry should look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000"

 

In order to apply the changes to grub, you need to call grub-mkconfig -o /boot/grub/grub.cfg as root user.



[1] In order to modify this file, you need to have the administrative rights of the root user.

[2] Memory size for the USB module, given in Megabyte.

 

Change Memory Limit with the U-Boot-Loader

Some ARM-Boards use the U-Boot-Loader to start the system. This section explains how to change the USB memory-limit for the Nvidia Jetson. Paths might be slightly different on other Boards.

 

To increase the memory limit you have to edit the Linux kernel boot arguments. To change the boot arguments edit the file /boot/extlinux/extlinux.conf with an editor of your choice.

 

Look for an entry that starts following:

APPEND console=ttyS0,115200n8 console=tty1 no_console_suspend=1 lp0_vec=2064@0xf46....

 

Add at the end of this line:

usbcore.usbfs_memory_mb=XXX (Replace XXX by a value that fits to your needs. Do not add a newline after this entry.)

 

You should restart your system now and check the USB memory limit with the following command:

 

# cat /sys/module/usbcore/parameters/usbfs_memory_mb

 

If memory was increased successfully the returned value should match to boot argument.

 


Suporte

Please contact our Technical & Application Support Center with any questions.

Phone: +49 3528 4386 845
E-mail: [email protected]

Para o topo