-
Notifications
You must be signed in to change notification settings - Fork 1
USB setup
By default Ubuntu sets the USB-FS memory size to 16Mb for USB devices. In the context of transferring a high resolution image, it's not enough... But there is a way to gain access to a higher amount of RAM for buffering.
There is a permanent way and a temporary way to do it:
In /etc/default/grub text file, modify:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000"
Update grub :
$ sudo update-grub
Reboot computer
Enter this command in a terminal :
$ sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'
To confirm the change has been done, type :
$ cat /sys/module/usbcore/parameters/usbfs_memory_mb
You can find more info on USB-FS here : https://www.flir.com/support-center/iis/machine-vision/application-note/understanding-usbfs-on-linux/
As a reminder, this parameter allows UNIX to switch off power giving to USB ports if it thinks it takes unnecessary power. I detail below the way to disable it. Long story short, it seems that we don't have any "NO STATUS SENT" issue. So far, all zabers are responding fine, and everything is smooth. Finger crossed, but it might have solved this issue for good.
Here is the way to enable/disable the autosuspend:
First, to check if autosuspend is disabled or enabled, type:
$ cat /sys/module/usbcore/parameters/autosuspend
If the return value is 2, then autosuspend is ENABLED. If the return value is -1 then autosuspend is DISABLED.
In the case where it is enabled, you can disable it by opening the file:
$ sudo gedit /etc/default/grub
Here, replace the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
with
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"
Save the file, and update grub with:
$ sudo update-grub
Finally, restart Ubuntu.
After reboot, check the value of the autosuspend parameter with :
$ cat /sys/module/usbcore/parameters/autosuspend
Should now return -1.