-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nikon D780 USB interaction becomes slow in shell mode #947
Comments
currently we have a property cache , that has a 5 second timeout (currently hardcoded). After that it would refetch everything. as the nikon Dxxx series have a lot of properties this could be a bit slow. Is the same happening with the command line options or only via shell mode? what kind of commands are you doing in the shell mode? I think it might need an optimzation there too. |
The shell mode commands: 'capture-tethered 500ms' (most frequent), get_config, and a few set_config. Every 30 s, get_config:
Every, ca 5 min, get_config:
|
After ca 2 days of continuously running with the "slow" behavior, it ended up with a situation where each "gp_port_write" would timeout and report "Error writing to the port (-35)". See attached gphoto2 debug file. |
After a system (and camera) restart, and running with the "--shell"-mode, I noticed it was behaving "slow", again. I now ran a command line, with multiple parameter settings, without getting the "slow" behavior: env LANG=C /usr/local/bin/gphoto2 --debug --debug-logfile=/root/my-logfile-set-multiple-params-- See attached gphoto2 debug file. |
As it stands, will try to extend the hard coded (5s) cache timeout. |
Added the following line to my .gphoto/settings: For the past few hours, the camera communication has been running ok. IN DEPTH: |
FYI |
Am trying to use a Nikon D780, instead of D600/D610, with my gphoto2/libgphoto2 shell-mode setup.
The D780 USB communication is, or within minutes or hours becomes, "slow".
Each "get-config" or "set-config" takes multiple seconds to complete. These requests should be measured in sub-seconds, or milliseconds.
Looking at the gphoto2 debug-output, there seem to be a lot of extra communication generated from libgphoto2, et al.
I started out, running with:
gphoto2 2.5.28 gcc, popt(m), exif, no cdk, no aa, jpeg, no readline
libgphoto2 2.5.30 standard camlibs (SKIPPING lumix), gcc, no ltdl, no EXIF
libgphoto2_port 0.12.1 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, no ltdl, no EXIF, USB, serial without locking
Have also tried this, with the same/similar "slowliness":
gphoto2 2.5.28 gcc, popt(m), exif, no cdk, no aa, jpeg, no readline
libgphoto2 2.5.31 standard camlibs (SKIPPING docupen lumix), gcc, no ltdl, no EXIF
libgphoto2_port 0.12.2 iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, no ltdl, no EXIF, USB, serial without locking
The gphoto2 front end is run in "shell"-mode from a perl-script. The stdin/stdout from gphoto2 is used by the perl-script to get/set parameters and handle photo events.
If nothing else is going on, the "capture-tethered 500ms" command is run. Repeated until there is time to read or write a parameter, or something else happens.
Once or twice a minute, some parameters (ca 5-10) are read. With some minutes of interval, other parameters (ca 5-10) might get read and written.
For the Nikon D780, these gphoto2 parameter reads or writes seem to become very slow, either immediatly, or after a (long or short) while.
Here is a gphoto2 debug file, where the "slowliness" appears to exist from the beginning or start early:
gphoto2_debug_1704471442.txt
(note: in the beginning of the scenario, all parameters are read and some are written before the "shell"-mode and the first "capture-tethered 500 ms" starts)
The text was updated successfully, but these errors were encountered: