How can I set the USBFS on Linux or Linux for ARM to prevent image losses with pylon and USB cameras
If you get the following error message on Linux when running a USB3.0 camera, you should increase the USBFS (USB file system) limit:
CompleteXfers: Instance = 1, idx = 1, pDestBuffer = 0x0x7f903f98e010. EndAsyncXfer FAILED. status = 0xe200000f
In the pylon README file you will read the following:
* Increasing Packet Size
For faster USB transfers you should increase the packet size. You can do this by changing the "Stream Parameters" -> "Maximum Transfer Size" value from inside the pylon Viewer or by setting the corresponding value via the API.
After increasing the package size you will likely run out of kernel space and see corresponding error messages on the console. The default value set by the kernel is 16 MB. To set the value (in this example to 1000 MB) you can execute as root:
#echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb
This would assign a maximum of 1000 MB to the USB stack.
To set the maximum usbfs memory limit permanently:
1. Open the /etc/default/grub file in any text editor.
Find and replace:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000"
2. Update grub with these settings:
3. Reboot and test a Basler USB 3.0 camera.
To confirm that you have successfully updated the memory limit, run the following command: