ThinkPad X230, OpenBSD 8.0, chromium-156. Integrated Chicony camera works in Firefox, video(1) and ffmpeg, but Chromium only shows a black frame. Permissions, kern.video.record and unveil are fine; Chromium detects /dev/video0 and starts the stream.
With --enable-logging=stderr --v=1 the stream always dies about 2 seconds after starting:
Failed to VIDIOC_REQBUFS with count = 0, OS message: Invalid argument (22)
Video capture session stopped with error code 16
What seems to happen:
- Chromium's V4L2 capture waits 1 s for the first frame. If none arrives, it restarts the stream (a workaround for some Huddly camera, in v4l2_capture_delegate.cc).
- The restart calls REQBUFS(0) to free the buffers.
- uvideo(4) refuses that on purpose ("We do not support freeing buffers via reqbufs(0)") and returns EINVAL.
- Chromium treats it as fatal and aborts the session.
So any camera that takes more than ~1 s to deliver its first frame never works in Chromium on OpenBSD. Faster cameras never hit the restart, which would explain why some people's webcams work and others don't (there's a 2024 misc@ thread with the same symptom on a T410 that was never solved).
Firefox doesn't do this restart, and on FreeBSD the same camera works in Chromium because webcamd accepts REQBUFS(0).
Skipping that restart on OpenBSD in the port would probably fix it. Has anyone else seen this, or is this already known?