[Bug] D405 intermittently delivers incomplete UVC color frames at 640x480@30 FPS
Camera Model
D405
LibRealSense SDK Version
2.58.4
Firmware Version
5.15.1.55
Operating System
Ubuntu 22.04
Kernel Version (Linux Only)
6.8.0-138-generic
MIPI Driver Version (NVIDIA Jetson Only)
No response
Platform
PC (AMD64/x86_64)
Connection Type
USB3
Language
Python
Application Segment
Robotics
Issue Description
I am observing intermittent color frame drops on Intel RealSense D405 cameras.
The issue can be reproduced with a single D405 using a minimal pyrealsense2 program, with only the color stream enabled at 640x480, BGR8, 30 FPS. No CameraRuntime, shared memory, Recorder, image encoding, or multi-camera processing is involved.
After approximately 15–40 minutes, the D405 occasionally skips one device frame number. For example:
previous frame: 27878 current frame: 27880 missing frame: 27879
The timestamp interval between the two delivered frames is approximately 66.7 ms, which corresponds to two 30 FPS frame periods.
I also traced VIDIOC_DQBUF at the V4L2 layer. The same sequence gap appears in both the video node and the metadata node, showing that the frame is already missing at or before the V4L2 userspace delivery boundary.
USB traffic captured with usbmon/tcpdump further shows that the affected UVC frame is shorter than a normal frame. A normal frame contains 614648 bytes of USB Bulk data, while the affected frame contains 607232 bytes, i.e. 7416 bytes fewer.
This behavior has been reproduced in multiple independent runs.
pyrealsense-d405-30fps-run3.log v4l2-d405-30fps-run3.log
Steps to Reproduce
- Connect one Intel RealSense D405 to a USB 3 port.
- Enable only the color stream at 640x480, BGR8, 30 FPS.
- Run the following minimal pyrealsense2 program.
- Let it run continuously for approximately 15–40 minutes.
- Monitor
get_frame_number()for a non-consecutive frame number.
import pyrealsense2 as rs
import time
pipeline = rs.pipeline()
config = rs.config()
config.enable_device("260322278464")
config.enable_stream(
rs.stream.color,
640,
480,
rs.format.bgr8,
30,
)
pipeline.start(config)
previous_frame = None
try:
while True:
frames = pipeline.wait_for_frames(5000)
color = frames.get_color_frame()
if not color:
continue
frame_number = color.get_frame_number()
if previous_frame is not None and frame_number != previous_frame + 1:
print(
"Frame gap:",
previous_frame,
"->",
frame_number,
)
break
previous_frame = frame_number
finally:
pipeline.stop()
### Expected Behavior
The D405 should continuously deliver complete color frames at the configured 640x480@60 FPS rate.
Device frame numbers should increase consecutively by one, and each frame interval should be approximately 33.3 ms.
No incomplete UVC frame should be discarded under this configuration.
### Actual Behavior
The D405 occasionally misses one complete frame.
Example:
- Previous frame number: 27878
- Current frame number: 27880
- Missing frame: 27879
- Camera timestamp delta: 66.687 ms
- Host timestamp delta: 66.767 ms
The same gap is observed at the V4L2 layer:
- /dev/video4: 27878 -> 27880
- /dev/video5: 27878 -> 27880
- V4L2 timestamp delta: 66.695 ms
- Failed DQBUF calls: 0
USB capture of the same event shows that the affected frame contains fewer bytes than a normal frame.
Normal frame:
18 x 32768 bytes + 24824 bytes = 614648 bytes
Affected frame:
18 x 32768 bytes + 17408 bytes + 0 bytes = 607232 bytes
Difference:
614648 - 607232 = 7416 bytes
All related USB completion statuses were 0. The following frame returned to the normal transfer size.
### Relevant Log Output
```shell
========== FRAME GAP DETECTED ==========
frame number : 27878 -> 27880
missing : 1
camera ts : 1790646699340.478 ms -> 1790646699407.164 ms
camera dt : 66.687 ms
host ts : 588171.388775 s -> 588171.455542 s
host dt : 66.767 ms
timestamp domain: timestamp_domain.global_time
total dropped: 1
========================================
V4L2 DQBUF records: 55760; failed calls: 0
node=/dev/video4 type=1 records=27880 sequence_gaps=1
GAP previous_sequence=27878 current_sequence=27880
timestamp_delta_ms=66.695
node=/dev/video5 type=13 records=27880 sequence_gaps=1
GAP previous_sequence=27878 current_sequence=27880
timestamp_delta_ms=66.695
USB Bulk transfer:
Normal frame:
18 x 32768 + 24824 = 614648 bytes
Affected frame:
18 x 32768 + 17408 + 0 = 607232 bytes
Missing USB data:
7416 bytesAdditional Context
Additional tests performed:
- Three different D405 cameras showed the same frame-gap behavior.
- Different USB 3 cables were tested.
- The issue occurs both through a USB hub and through an independent computer USB port.
- The issue also occurs with only one D405 connected.
- Only the color stream is enabled.
- A RealSense D435 connected to the same computer did not show this behavior.
- The D405 and D435 reported the same firmware version: 5.15.1.55.
- The next frame after the anomaly is received normally.
- The issue is reproducible without application-level recording, shared memory, image encoding, or multi-camera processing.
In two independent USB captures, the abnormal frame showed the same final Bulk transfer size:
Normal final transfer: 24824 bytes Abnormal final transfer: 17408 bytes Difference: 7416 bytes
Questions:
- Is this a known D405 firmware or UVC streaming issue?
- Is a short USB Bulk transfer with completion status 0 expected under any normal D405 streaming condition?
- Could this indicate that the D405 device or firmware is terminating a UVC frame early?
- Is firmware 5.15.1.55 recommended for D405 with librealsense 2.58.4?
- Is there any additional firmware/librealsense logging that could help determine why the frame terminates early?
- Is there a recommended firmware update, configuration, or workaround?
I can provide the complete V4L2 trace and usbmon pcap capture if needed.
Source: realsenseai/librealsense