Same model here (ThinkPad X1 Nano Gen 2, 21E80013US, BIOS N3IET54W 1.34,
i7-1280P), Linux Mint 22.3 (noble base), tested with HWE 7.0.0-43 and
6.17.0-42. Same symptom: sensor and /dev/video* present, but no usable
frames. Sharing my findings in case they help others and narrow the root
cause.

1. The kernel capture path works. After letting libcamera configure the media 
graph once (cam -c1 -C2 -s role=raw), direct capture from the ISYS node with 
plain MMAP buffers is clean:
v4l2-ctl -d /dev/video8 --stream-mmap=4 --stream-count=60 → BA10 1932x1092, 
consecutive sequence numbers, steady 30 fps, zero csi2-1 error messages, and 
the raw Bayer data contains a correct image.

2. Streaming through libcamera fails. Tested with libcamera 0.8.0 built
from source, SoftISP in both CPU and GPU mode. Every libcamera session
produces csi2-1 error messages (Transfer FIFO overflow, inter-frame
packets discarded, CRC / packet header errors, and sometimes “stream
stop time out”). Completed requests report bytesused: 0 and garbage
sequence numbers and timestamps, so SoftISP outputs black frames. Even
role=raw requests come back flagged this way. I suspect the buffer
import path (libcamera uses DMABUF, while v4l2-ctl MMAP works), but I
have not confirmed this.

3. Sensor control writes while streaming cause CSI-2 errors. In one test
I changed each control during a clean v4l2-ctl stream:

exposure: 0 errors
analogue_gain: 7 errors
digital_gain: 3 errors
vertical_blanking: 4 errors

Frames keep coming in plain V4L2. Gain changes from AGC therefore look
harmful.

4. IVSC is a red herring on non-Computer-Vision SKUs. The DSDT puts SPFD
(INTC1094) under \_SB.PC00.SPI1 unless CVFS == 2. On my unit the BIOS
sets CVFS = 0 (CUPN = 8). When I forced CVFS = 2 with a small SSDT, spi-
INTC1094:00 appeared on the LJCA SPI bus, but vsc-tp fails with -22
because the wakeupfw LJCA GPIO line (VGPO pin 1) is not valid
(gpiochip_line_is_valid = 0). I believe this unit has no IVSC fitted:
Computer Vision is optional on this model. Without IVSC the direct
ov2740 → CSI2 graph is correct.

Working workaround (no libcamera at runtime):

Set fixed sensor controls before streaming (exposure=1102, analogue_gain=512).
Stream with v4l2-ctl --stream-mmap ... --stream-to=-.
Debayer with ffmpeg (-pixel_format bayer_grbg16le -video_size 1952x1092), 
subtract black level 64, scale 10→16-bit, apply per-channel gains.
Output to v4l2loopback (exclusive_caps=1).
For simple auto-exposure, adjust only the exposure control.

This works in browsers and video-call apps at about 28-30 fps with
Secure Boot enabled. I can share the script if useful.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2153096

Title:
  IPU6 webcam (OV2740) on X1 Nano fails on kernel 7.0.0-14/-15: int3472
  cannot find GPIO chip INTC1096:00, VSC chain doesn't come up

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2153096/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to