310Alvium USB Cameras User Guide V4.6.1
Performance and troubleshooting
Using SuspendMode under Linux
Activating U3 mode
1. Connect to the camera and use as you like.
2. Set
DevicePowerSavingMode to SuspendMode.
3. Close all Vimba X connections, including the first Vimba X Viewer dialog.
Linux requires to change the following settings to bring a USB device to U3 mode:
• power/control => auto
• power/autosuspend_delay_ms => 0
The following script to put the camera to U3 mode can be used on most hosts.
4. Execute this script with root privileges. For example, save this script as U3.sh
and use the command
sudo ./U3.sh:
Reactivating operational mode
Open Vimba X Viewer.
The camera boots up. This may take about 2 seconds.
#!/usr/bin/env bash
# https://www.kernel.org/doc/html/v4.13/driver-api/usb/power-
management.html#the-user-interface-for-dynamic-pm
find -L /sys/bus/usb/devices/ -maxdepth 2 -regextype posix-
extended -regex '/sys/bus/usb/devices/[0-9]+\-[0-9]+' | while
read port; do
if [[ $(< $port/idVendor) == "1ab2" ]]; then
if [[ $1 == on ]]; then
echo "Activating port: $port"
echo on > $port/power/control
echo 2000 > $port/power/autosuspend_delay_ms
else
echo "Suspending port: $port"
echo auto > $port/power/control
echo 0 > $port/power/autosuspend_delay_ms
fi
fi
done
Code Listing 1: Linux script to change to U3 mode