General support for USB 3.0 on Linux is still in a relatively early phase and future releases of Linux kernel and libusb should improve this situation.
Nevertheless, here are the steps needed for enabling USB 3.0 support in XIMEA Linux Software Package:
uname -sr
./install
Most Linux distributions need to be tweaked somehow to ensure that all images from the USB3 camera at a high data rate will be delivered.
This requires some actions:
The default USB buffer size in Linux is small (16 MB). This limitation can be removed by command (in Ubuntu):
sudo tee /sys/module/usbcore/parameters/usbfs_memory_mb >/dev/null <<<0
The default xiAPI setting is optimized to be compatible with most controllers.
On some controllers (e.g. FL1100) it is possible to increased buffer sizes and counts so data streaming is more reliable.
Change the buffer commit count to 32:
xiSetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_COMMIT, 32);
Change the buffer size to maximum:
xiGetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_SIZE XI_PRM_INFO_MAX, &buffer_size); xiSetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_SIZE, buffer_size);
xiAPI has receiving thread that is normally switched to Realtime priority.
This requires some Linux distributions to run with root privileges.
If a privilege does not allow to set priority to realtime - the USB buffer handling remains in normal priority thread and warning message shows.
* - rtprio 0 @realtime - rtprio 81 * - nice 0 @realtime - nice -16
sudo ./xiSample