ZED cameras become unavailable on Ubuntu PC

ZED 2i cameras unavailable on Ubuntu during multi-camera recording

Hi,

I am experiencing a recurring issue where ZED 2i cameras connected directly to an Ubuntu PC become unavailable during multi-camera recording attempts. The same issue does not happen with ZED 2i cameras connected to the ZED Box.

The issue appears in both cases:

  1. Multi-camera recording through ZED Studio

  2. Multi-camera recording through the ZED SDK, via my compiled ZED_SVO_Recording_Multi binary

For clarity, unless stated otherwise, when I say that cameras are “visible” or “unavailable”, I mean that they are visible or unavailable both through the ZED SDK and through the official ZED applications. In my observations these two states are correlated: I have not seen cases where a camera is available in only one of them.

Once the cameras become unavailable, they do not become available again until they are physically unplugged and replugged. Software-level recovery does not help: neither software power-cycling nor running ZED_Explorer --reboot restores the cameras.

ZED Studio behavior

During multi-camera recording attempts in ZED Studio, only the cameras connected directly to the Ubuntu PC become unavailable.

More specifically, they do not become unavailable immediately after ending the recording. They become unavailable only after closing ZED Studio.

The cameras connected to the ZED Box remain available.

Custom application behavior

In my custom application, recording is performed through the compiled ZED_SVO_Recording_Multi binary, which is built against ZED SDK 5.3.0.

During multi-camera recording attempts through this ZED SDK based binary, only the cameras connected directly to the Ubuntu PC become unavailable. In my observations, this happens immediately after stopping recording.

The cameras connected to the ZED Box remain available.

Reproduction frequency

The issue is frequent and easy to reproduce in this setup, but the exact rate depends on the application:

  • In ZED Studio, the issue happens 100% of the time: after a multi-camera recording attempt and then closing the application, only the cameras connected directly to the Ubuntu PC become unavailable.

  • In my custom application, which records via the compiled ZED_SVO_Recording_Multi binary using the ZED SDK, the issue happens randomly, but with a high reproduction rate, approximately 50% of runs or higher. In these cases, only the cameras connected directly to the Ubuntu PC become unavailable after stopping recording.

Any advice on how to debug or prevent this would be appreciated.

Environment

Ubuntu PC

  • OS: Ubuntu 24.04

  • ZED SDK: 5.3.0

  • CUDA: 13.0

  • TensorRT: 10

  • GPUs: 2 × NVIDIA RTX 4500 Ada

  • Cameras: 2 x ZED 2i, connected via USB-C

ZED Box

  • ZED SDK: 5.3.0

  • Cameras: 2 x ZED 2i, connected via USB-C

In my custom application, the latest ZED_SVO_Recording_Multi binaries are compiled against ZED SDK 5.3.0 on both devices.

(!!!) UPD 1: when running 3 x camera setup (2 x on ZEDBox, 1 x on Ubuntu PC) the issue doesnt reproduce for ZED Studio - all cameras stay available before and after recording and after closing the app. Maybe limited USB bandwidth on PC is the bottleneck? Any pointers on how to properly check this would be appreciated.

Hi @tony-pitchblack
Thank you for the details to describe your problem.

Yes, if you connect more than 2 cameras to the same USB3 channel, you should expect unpredictable disconnections.

Usually, we recommend connecting each camera to a separate USB3 channel to avoid USB3 conflicts because of the high bandwidth requirements.

I finally figured it out.
In my case it came down to two root problems - force killing apps and stale background processes.

Problem #1: Force killing apps ZED SDK
When sending SIGKILL to a ZED Tools application or a custom application which uses ZED SDK under the hood (for example, a compiled binary ZED_SVO_Recording_Multi) the connected cameras have a high chance of becoming unavailable on hardware level with most salient symptom being uvcvideo ... -71 error appearing in dmesg or journalctl logs.

Solution #1: Never use SIGKILL to terminate ZED apps
Use only SIGTERM or similar soft-kill signals to terminate any ZED app. This gives the process time to properly wrap up on hardware level and prevents cameras from becoming unavailable and having to replug them physically.

Problem #2: Stale background telemetry processes holding ZED cameras
To check if any background telemetry processes are present, run:
pgrep -af 'curl.*telemetry\.stereolabs\.com'
right after exiting a ZED app or after stopping a recording binary ZED_SVO_Recording_Multi

To kill the telemetry processes, run:
pkill -TERM -f ‘curl.*``telemetry.stereolabs.com``’

Solution #2: always clear stale background processes holding ZED cameras before launching a ZED app.
For apps from ZED Tools suite I wrote a simple wrapper bash script which clears stale telemetry processes after the app is closed. For my custom application for recording based on ZED SDK I added a similar post-recording hook which clears stale telemetry processes after the ZED_SVO_Recording_Multi stops. (just used an AI coding assistant to code those).

1 Like