intel / ipu6-drivers

152 stars 50 forks source link

MIPI Camera Drivers Compatibility for Lenovo X1 Carbon Gen 11 on Ubuntu 22.04 #172

Open rmasad opened 11 months ago

rmasad commented 11 months ago

Issue Description: The MIPI camera drivers for the Lenovo X1 Carbon Gen 11 are currently not working as expected on the Ubuntu 22.04 operating system. This has led to a lack of camera functionality on this particular laptop model when running Ubuntu 22.04.

Expected Behavior: The MIPI camera drivers for the Lenovo X1 Carbon Gen 11 should be compatible with Ubuntu 22.04, enabling users to utilize the built-in camera for various applications such as video conferencing, streaming, and capturing media.

Steps to Reproduce:

Current Observations:

Environment:

Laptop Model: Lenovo X1 Carbon Gen 11 Operating System: Ubuntu 22.04 Kernel Version: 6.2.0-26-generic

gouyelliot commented 11 months ago

I'm in the same situation, a post on AskUbuntu give more information about the situation (I have the exact same logs as the one in the post).

I can provide more info or run commands if needed, just ping me !

ChenYuYeh commented 11 months ago

@rmasad

As the prominent method shared by Hans for the romfusion package for Fedora, it implies the driver delivered by Intel on this github can properly support the webcam on Lenovo ThinkPad X1. (Although there might be regression sometimes, it could be fixed soon. )

So it should be suspicious that Canonical is not willing to provide adb package for Lenovo ThinkPad X1 even it is a Ubuntu certified system though - https://ubuntu.com/certified/202301-31165.

We should follow up the progress of a post on AskUbuntu, and influence Canonical to see your expectations for providing some packages to bring your webcam back to life.

rmasad commented 11 months ago

Independent of an official support from Canonical (that would be great!) the instructions in this repository do not work. The same thing happens to me that happened to @gouyelliot (and it is described in this link). Any help to get it working?

I have the same error that is repeated (Device node fd 14 poll timeout) and the light stays on.

Happy to help/test.

ChenYuYeh commented 11 months ago

If I guess correctly, this GitHub might be meant for OS vendors (Ubuntu, Fedora) to generate their ppa/rpmfusion packages. Due to the complexity, includes loopback module, userspace, kernel, firmware and some closed binaries, is not quite friendly for ordinary users like you or me. And it makes me feel this GitHub is for temporary rather permanent purposes.

prochac commented 11 months ago

And it makes me feel this GitHub is for temporary rather permanent purposes.

It's temporary so far for 3 years, so I hope you're right.

yorik commented 10 months ago

The camera on Lenovo X1 Carbon Gen 11 works if you follow instructions in this repo and all related + apply patch https://gitlab.com/vicamo/v4l2-relayd/-/merge_requests/13/diffs on v4l2-relayd.

It's a lot of compiling, but at least it's possible.

rmasad commented 10 months ago

It doesn't work, it gives me error:

twouters commented 10 months ago

@rmasad did you try it on https://webrtc.github.io/samples/src/content/devices/input-output/ with a browser too? Cheese doesn't seem to work with this driver/framework, I don't have the details on why it doesn't.

yorik commented 10 months ago

@rmasad first check that driver is loaded and founds the sensor:

$ journalctl -k | grep ipu

Output should be something like:

intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x1)
intel-ipu6 0000:00:05.0: physical base address 0x603c000000
intel-ipu6 0000:00:05.0: mapped as: 0x00000000c5358427
intel-ipu6 0000:00:05.0: IPU in secure mode
intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
intel-ipu6 0000:00:05.0: IPC reset done
intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
intel-ipu6 0000:00:05.0: firmware: direct-loading firmware intel/ipu6ep_fw.bin
intel-ipu6 0000:00:05.0: FW version: 20230102
intel-ipu6 0000:00:05.0: Found supported sensor INT3474:01
intel-ipu6 0000:00:05.0: Connected 1 cameras
intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
intel-ipu6 0000:00:05.0: CSE authenticate_run done
intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
intel-ipu6-isys intel-ipu6-isys0: bind ov2740 12-0036 nlanes is 2 port is 1
intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.
intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0

Then try:

$ gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! xvimagesink

You should see your face.

Then:

gst-launch-1.0 -v icamerasrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! video/x-raw,format=YUY2 ! v4l2sink device=/dev/video0

And try to get video in https://webrtc.github.io/samples/src/content/devices/input-output/.

If it all works try to run v4l2-relayd manually:

v4l2-relayd -i icamerasrc  -o "appsrc name=appsrc caps=video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! queue leaky=1 max-size-buffers=10 ! v4l2sink name=v4l2sink device=/dev/video0"

And then tune systemd unit file to make it run. I found that removing CapabilityBoundingSet= and DeviceAllow=char-video4linux helps.

rpayanm commented 10 months ago

The camera on Lenovo X1 Carbon Gen 11 works if you follow instructions in this repo and all related + apply patch https://gitlab.com/vicamo/v4l2-relayd/-/merge_requests/13/diffs on v4l2-relayd.

It's a lot of compiling, but at least it's possible.

@yorik Oh! Impressive, my friend! Would you mind making a video installing all the thing? Please. You would help us a lot :heart:

rmasad commented 10 months ago

@yorik, when executing what you mention, this is what it returns:

export GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0/ && rm -rf ~/.cache/gstreamer1.0
DEVICE=$(v4l2-ctl --list-devices | grep platform:v4l2loopback -A 1 | tail -n 1 | xargs echo)
sudo -E gst-launch-1.0 icamerasrc buffer-count=7 device-name=ov2740-uf ! video/x-raw,format=NV12,width=1280,height=720 ! v4l2sink device=${DEVICE}

[sudo] contraseña para rmasad: 
[08-29 10:04:36.853] CamHAL[INF] load_camera_hal_library, the library name: /usr/lib/ipu_adl/libcamhal.so
[08-29 10:04:36.910] CamHAL[INF] load_camera_hal_library, the library name: /usr/lib/ipu_adl/libcamhal.so
Estableciendo el conducto a PAUSA …
[08-29 10:04:37.184] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[08-29 10:04:37.185] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[08-29 10:04:37.185] CamHAL[ERR] invalid media format, default value used.
[08-29 10:04:37.186] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Argumento inválido
El conducto está vivo y no necesita PREPARARSE …
El conducto está PREPARADO …
Estableciendo el conducto a REPRODUCIENDO …
New clock: GstSystemClock

(gst-launch-1.0:6509): GStreamer-CRITICAL **: 10:04:37.269: Registering meta implementation 'GstCamerasrcMeta' without init function
[08-29 10:04:37.269] CamHAL[ERR] sensor output sub device is not set
[08-29 10:04:39.692] CamHAL[ERR] Start: Device node /dev/video1 IOCTL VIDIOC_STREAMON error: Error de entrada/salida
[08-29 10:04:39.692] CamHAL[ERR] Device:Generic stream on failed.
[08-29 10:04:39.692] CamHAL[ERR] Devices stream on failed:-38
[08-29 10:04:39.692] CamHAL[ERR] Start capture unit failed with ret:-38.
[08-29 10:04:39.692] CamHAL[ERR] Camera device starts failed.
[08-29 10:04:39.692] CamHAL[WAR] @stop: device not started
[08-29 10:04:44.692] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:04:49.693] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:04:54.177] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:04:59.177] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:05:04.178] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:05:09.178] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:05:14.178] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:05:19.178] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:05:24.179] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:05:29.179] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery
[08-29 10:05:34.179] CamHAL[WAR] <id0>@waitFrame, time out happens, wait recovery

In other terminal:

ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x0000000061a9ce7a
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:21 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x0000000061a9ce7a
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x000000008a4d479b
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x0000000044252ec6
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:22 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: physical base address 0x603c000000
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: mapped as: 0x00000000f2def504
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU in secure mode
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPC reset done
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: FW version: 20220510
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Found supported sensor INT3474:01
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Connected 1 cameras
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: CSE authenticate_run done
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6-isys intel-ipu6-isys0: bind ov2740 13-0036 nlanes is 2 port is 1
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
ago 29 10:04:23 rmasad-X1-Gen-11 kernel: intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
ago 29 10:04:37 rmasad-X1-Gen-11 kernel:  ipu_psys_mapbuf_locked+0x17d/0x460 [intel_ipu6_psys]
ago 29 10:04:37 rmasad-X1-Gen-11 kernel:  ? ipu_psys_ioctl+0x2fa/0x550 [intel_ipu6_psys]
ago 29 10:04:37 rmasad-X1-Gen-11 kernel:  ipu_psys_ioctl+0x182/0x550 [intel_ipu6_psys]
ago 29 10:04:37 rmasad-X1-Gen-11 kernel: intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 13-0036
ago 29 10:04:39 rmasad-X1-Gen-11 kernel: intel-ipu6-isys intel-ipu6-isys0: stream stop time out
~ ❯ gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! xvimagesink                                     10:05:15

(gst-plugin-scanner:9456): GStreamer-WARNING **: 10:05:36.821: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsticamerasrc.so': /lib/x86_64-linux-gnu/libcamhal.so.0: undefined symbol: _ZN3cca8IntelCCA6getCMCERNS_7cca_cmcE
ADVERTENCIA: conducto erróneo: no hay un elemento «icamerasrc»
yorik commented 10 months ago

@yorik Oh! Impressive, my friend! Would you mind making a video installing all the thing? Please. You would help us a lot ❤️

Thank you! Sorry, I don't have time now to re-install everything and learn how to do videos. Also I'm using Debian, which , looks like, isn't popular now. So it wouldn't be very helpful for most people.

yorik commented 10 months ago

@rmasad looks like icamerasrc was build incorrectly and there is some problem with the driver. I guess you need to clean up everything and build/install it again. Are there any chance that /lib/x86_64-linux-gnu/libcamhal.so.0 is a leftover from previous attempts?

gouyelliot commented 10 months ago

Thanks @yorik for the info, could you run uname -a and share the output here please ?

I spent some time re-compiling/re-installing everything, and now I get this error when trying to start the pipeline

$ export GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0/ && rm -rf ~/.cache/gstreamer1.0
$ sudo -E gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! xvimagesink
août 31 13:12:15 Elliot-ThinkPad kernel: ================================================================================
août 31 13:12:15 Elliot-ThinkPad kernel: UBSAN: invalid-load in /build/linux-hwe-6.2-GoDE7J/linux-hwe-6.2-6.2.0/include/linux/iosys-map.h:267:9
août 31 13:12:15 Elliot-ThinkPad kernel: load of value 68 is not a valid value for type '_Bool'
août 31 13:12:15 Elliot-ThinkPad kernel: CPU: 0 PID: 6100 Comm: camerasrc0:src Tainted: G           OE      6.2.0-31-generic #31~22.04.1-Ubuntu
août 31 13:12:15 Elliot-ThinkPad kernel: Hardware name: LENOVO 21HMCTO1WW/21HMCTO1WW, BIOS N3XET41W (1.16 ) 07/06/2023
août 31 13:12:15 Elliot-ThinkPad kernel: Call Trace:
août 31 13:12:15 Elliot-ThinkPad kernel:  <TASK>
août 31 13:12:15 Elliot-ThinkPad kernel:  dump_stack_lvl+0x48/0x70
août 31 13:12:15 Elliot-ThinkPad kernel:  dump_stack+0x10/0x20
août 31 13:12:15 Elliot-ThinkPad kernel:  __ubsan_handle_load_invalid_value+0xa2/0x100
août 31 13:12:15 Elliot-ThinkPad kernel:  ? dma_buf_map_attachment+0x84/0xc0
août 31 13:12:15 Elliot-ThinkPad kernel:  dma_buf_vmap_unlocked.cold+0x10/0x15
août 31 13:12:15 Elliot-ThinkPad kernel:  ipu_psys_mapbuf_locked+0x17d/0x460 [intel_ipu6_psys]
août 31 13:12:15 Elliot-ThinkPad kernel:  ipu_psys_ioctl+0x182/0x550 [intel_ipu6_psys]
août 31 13:12:15 Elliot-ThinkPad kernel:  ? ipu_psys_ioctl+0x2fa/0x550 [intel_ipu6_psys]
août 31 13:12:15 Elliot-ThinkPad kernel:  ? _copy_to_user+0x25/0x60
août 31 13:12:15 Elliot-ThinkPad kernel:  ? ipu_psys_ioctl+0x2fa/0x550 [intel_ipu6_psys]
août 31 13:12:15 Elliot-ThinkPad kernel:  ? __fget_light+0xb5/0x160
août 31 13:12:15 Elliot-ThinkPad kernel:  __x64_sys_ioctl+0x9a/0xe0
août 31 13:12:15 Elliot-ThinkPad kernel:  do_syscall_64+0x59/0x90
août 31 13:12:15 Elliot-ThinkPad kernel:  ? do_syscall_64+0x69/0x90
août 31 13:12:15 Elliot-ThinkPad kernel:  ? exit_to_user_mode_prepare+0x3b/0xd0
août 31 13:12:15 Elliot-ThinkPad kernel:  ? syscall_exit_to_user_mode+0x2a/0x50
août 31 13:12:15 Elliot-ThinkPad kernel:  ? do_syscall_64+0x69/0x90
août 31 13:12:15 Elliot-ThinkPad kernel:  ? exit_to_user_mode_prepare+0x3b/0xd0
août 31 13:12:15 Elliot-ThinkPad kernel:  ? irqentry_exit_to_user_mode+0x9/0x20
août 31 13:12:15 Elliot-ThinkPad kernel:  ? irqentry_exit+0x43/0x50
août 31 13:12:15 Elliot-ThinkPad kernel:  ? exc_page_fault+0x92/0x1b0
août 31 13:12:15 Elliot-ThinkPad kernel:  entry_SYSCALL_64_after_hwframe+0x72/0xdc
août 31 13:12:15 Elliot-ThinkPad kernel: RIP: 0033:0x7fe238d1aaff
août 31 13:12:15 Elliot-ThinkPad kernel: Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
août 31 13:12:15 Elliot-ThinkPad kernel: RSP: 002b:00007fe234b24110 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
août 31 13:12:15 Elliot-ThinkPad kernel: RAX: ffffffffffffffda RBX: 00007fe215380ed0 RCX: 00007fe238d1aaff
août 31 13:12:15 Elliot-ThinkPad kernel: RDX: 0000000000000013 RSI: 00000000c0044102 RDI: 0000000000000012
août 31 13:12:15 Elliot-ThinkPad kernel: RBP: 00007fe215382210 R08: 0000000000000000 R09: 00007fe215382210
août 31 13:12:15 Elliot-ThinkPad kernel: R10: 00007fe228000690 R11: 0000000000000246 R12: 0000000000000000
août 31 13:12:15 Elliot-ThinkPad kernel: R13: 00007fe21537caf0 R14: 00007fe215380ed0 R15: 00007fe234b2423c
août 31 13:12:15 Elliot-ThinkPad kernel:  </TASK>
août 31 13:12:15 Elliot-ThinkPad kernel: ================================================================================
yorik commented 10 months ago

@gouyelliot, sure:

Linux ya 6.4.11 #1 SMP PREEMPT_DYNAMIC Sun Aug 27 13:50:18 CEST 2023 x86_64 GNU/Linux

I built it from debian linux-source-6.4=6.4.11-1 package enabling all related modules just in case:

$ diff /boot/config-6.4.0-3-amd64 /boot/config-6.4.11
...
 # Multiplexer I2C Chip support
 #
-# CONFIG_I2C_MUX_GPIO is not set
-# CONFIG_I2C_MUX_LTC4306 is not set
-# CONFIG_I2C_MUX_PCA9541 is not set
-# CONFIG_I2C_MUX_PCA954x is not set
-# CONFIG_I2C_MUX_REG is not set
-# CONFIG_I2C_MUX_MLXCPLD is not set
+CONFIG_I2C_MUX_GPIO=m
+CONFIG_I2C_MUX_LTC4306=m
+CONFIG_I2C_MUX_PCA9541=m
+CONFIG_I2C_MUX_PCA954x=m
+CONFIG_I2C_MUX_REG=m
+CONFIG_I2C_MUX_MLXCPLD=m
...
-# CONFIG_I3C is not set
+CONFIG_I3C=m
+# CONFIG_CDNS_I3C_MASTER is not set
+# CONFIG_DW_I3C_MASTER is not set
+# CONFIG_SVC_I3C_MASTER is not set
+CONFIG_MIPI_I3C_HCI=m
...
-# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_V4L2_SUBDEV_API=y
+CONFIG_VIDEO_ADV_DEBUG=y
 # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
 CONFIG_VIDEO_TUNER=m
+CONFIG_V4L2_MEM2MEM_DEV=m
...
-# CONFIG_VIDEO_IPU3_CIO2 is not set
+CONFIG_VIDEO_IPU3_CIO2=m
+CONFIG_CIO2_BRIDGE=y
...
-# CONFIG_VIDEO_VIM2M is not set
-# CONFIG_VIDEO_VICODEC is not set
-# CONFIG_VIDEO_VIMC is not set
+CONFIG_VIDEO_VIM2M=m
+CONFIG_VIDEO_VICODEC=m
+CONFIG_VIDEO_VIMC=m
 CONFIG_VIDEO_VIVID=m
 CONFIG_VIDEO_VIVID_CEC=y
 CONFIG_VIDEO_VIVID_MAX_DEVS=64
-# CONFIG_VIDEO_VISL is not set
+CONFIG_VIDEO_VISL=m
+CONFIG_VISL_DEBUGFS=y

and all CONFIG_VIDEO_ not sure which one is needed, just started big. I'll try to use unmodified debian kernel in future.

gouyelliot commented 10 months ago

Thanks again for the details @yorik. Looks like I would need to upgrade my kernel, it's possible on Ubuntu using the intermediate kernels repository if anyone wants to give it a try.

I'm not going to do it as this is my workstation that I use daily and I'd rather stay on a stable kernel. Let's wait for the update I guess...

fourdollars commented 10 months ago

There is a known issue on Cheese that it can not support Intel MIPI camera via the v4l2loopback workaround. It is better to use Google Chrome or Mozilla Firefox to visit https://webcamtests.com/ to check your MIPI camera.

rmasad commented 10 months ago

Re-install everything, and run the command: gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! xvimagesink

It opens a window (the camera light does not turn on) and shows me this:

Screenshot-6

fourdollars commented 10 months ago

FYI, I usually executed sudo gst-launch-1.0 icamerasrc ! autovideosink to check the MIPI camera on Ubuntu.

rmasad commented 10 months ago

When I run sudo -E gst-launch-1.0 icamerasrc ! autovideosink, it response:


~ ❯ sudo -E gst-launch-1.0 icamerasrc ! autovideosink                                                                                                                                                                                                                                                                                                                                                                             10:08:25
[09-11 10:08:29.236] CamHAL[INF] load_camera_hal_library, the library name: /usr/lib/ipu_adl/libcamhal.so
[09-11 10:08:29.244] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.244] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.244] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.244] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.244] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.244] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.244] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.244] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.245] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.245] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.246] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.246] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.247] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.247] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.247] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.247] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.247] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.247] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.247] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.247] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.247] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.247] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.247] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.247] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.247] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.247] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE gain range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE eExposure time range failed
[09-11 10:08:29.248] CamHAL[ERR] Malformed ET range in exposure time range configuration
[09-11 10:08:29.248] CamHAL[ERR] Parse AE gain range failed
Estableciendo el conducto a PAUSA …
[09-11 10:08:29.894] CamHAL[INF] aiqb file name ov13b10.aiqb
[09-11 10:08:29.894] CamHAL[INF] aiqb file name ov13b10.aiqb
[09-11 10:08:29.894] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.894] CamHAL[INF] aiqb file name ov13b10.aiqb
[09-11 10:08:29.894] CamHAL[INF] aiqb file name ov13b10.aiqb
[09-11 10:08:29.895] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.895] CamHAL[INF] aiqb file name ov8856.aiqb
[09-11 10:08:29.895] CamHAL[INF] aiqb file name ov8856.aiqb
[09-11 10:08:29.895] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.895] CamHAL[INF] aiqb file name ov8856.aiqb
[09-11 10:08:29.895] CamHAL[INF] aiqb file name ov8856.aiqb
[09-11 10:08:29.895] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.895] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-11 10:08:29.895] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-11 10:08:29.896] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.896] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-11 10:08:29.896] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-11 10:08:29.896] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.896] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-11 10:08:29.896] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-11 10:08:29.896] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.896] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-11 10:08:29.896] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-11 10:08:29.896] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.896] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-11 10:08:29.896] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-11 10:08:29.897] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-11 10:08:29.897] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-11 10:08:29.897] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-11 10:08:29.897] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[09-11 10:08:29.897] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[09-11 10:08:29.897] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.897] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[09-11 10:08:29.897] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[09-11 10:08:29.898] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.898] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[09-11 10:08:29.898] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[09-11 10:08:29.898] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.898] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[09-11 10:08:29.898] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[09-11 10:08:29.898] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.898] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[09-11 10:08:29.898] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[09-11 10:08:29.898] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.898] CamHAL[INF] aiqb file name ov01a1s.aiqb
[09-11 10:08:29.898] CamHAL[INF] aiqb file name ov01a1s.aiqb
[09-11 10:08:29.898] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.898] CamHAL[INF] aiqb file name OV08A10_YHUT_ADL.aiqb
[09-11 10:08:29.898] CamHAL[INF] aiqb file name OV08A10_YHUT_ADL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.899] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.899] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.900] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.900] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.900] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[09-11 10:08:29.900] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.900] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.900] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.900] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.900] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.900] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.900] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.900] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.900] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[09-11 10:08:29.901] CamHAL[ERR] invalid media format, default value used.
[09-11 10:08:29.901] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.901] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.901] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.901] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[09-11 10:08:29.902] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1
El conducto está vivo y no necesita PREPARARSE …
El conducto está PREPARADO …
Estableciendo el conducto a REPRODUCIENDO …
New clock: GstSystemClock
[09-11 10:08:29.911] CamHAL[ERR] Get entity fail for calling getEntityById
[09-11 10:08:29.911] CamHAL[ERR] Get entity fail for calling getEntityById
[09-11 10:08:29.911] CamHAL[ERR] setup Link ov13b10  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
[09-11 10:08:29.911] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[09-11 10:08:29.911] CamHAL[ERR] set up mediaCtl failed
[09-11 10:08:29.911] CamHAL[ERR] @configure Device Configure failed
[09-11 10:08:29.911] CamHAL[ERR] failed to config streams.
ERROR: del elemento /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Información adicional de depuración:
gstcambasesrc.cpp(3143): gst_cam_base_src_loop (): /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.006924328
Estableciendo el conducto a NULL …
Liberando el conducto…```
fourdollars commented 10 months ago

@rmasad Could you execute sudo -E oem-getlogs on Ubuntu 22.04 and attach the log?

rmasad commented 10 months ago

It is a 62~ mb file. Any subset of the file (to grep it)?

fourdollars commented 10 months ago

@rmasad Lenovo ThinkPad X1 Carbon Gen 11 is an Ubuntu certified platform. Could you open a bug against https://bugs.launchpad.net/oem-priority and then attach your log there?

rmasad commented 10 months ago

I try installing gstreamer1.0-icamera from oem-solutions-group/intel-ipu6 repository and now I am getting this error: https://pastebin.com/3XevZ83z

rmasad commented 10 months ago

I try with 6.1.0-1022-oem, not working yet

~ ❯ uname -r
6.1.0-1022-oem

~ ❯ sudo gst-launch-1.0 v4l2src ! glimagesink
[sudo] contraseña para rmasad: 
Estableciendo el conducto a PAUSA …
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
ERROR: del elemento /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: El dispositivo «/dev/video0» no es un dispositivo de captura.
Información adicional de depuración:
../sys/v4l2/v4l2_calls.c(629): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Capabilities: 0x5200002
ERROR: el conducto no quiere prepararse.
Falló al establecer el conducto a PAUSA …
Estableciendo el conducto a NULL …
Liberando el conducto…

~ ❯ sudo gst-launch-1.0 icamerasrc
Estableciendo el conducto a PAUSA …
[09-22 10:16:31.895] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[09-22 10:16:31.896] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[09-22 10:16:31.896] CamHAL[ERR] invalid media format, default value used.
[09-22 10:16:31.896] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev9 IOCTL VIDIOC_G_EXT_CTRLS error: Argumento inválido
El conducto está vivo y no necesita PREPARARSE …
El conducto está PREPARADO …
Estableciendo el conducto a REPRODUCIENDO …
New clock: GstSystemClock

(gst-launch-1.0:14552): GStreamer-CRITICAL **: 10:16:31.943: Registering meta implementation 'GstCamerasrcMeta' without init function
[09-22 10:16:31.943] CamHAL[ERR] sensor output sub device is not set
ERROR: del elemento /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Información adicional de depuración:
gstcambasesrc.cpp(3143): gst_cam_base_src_loop (): /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:
streaming task paused, reason not-linked (-1)
Execution ended after 0:00:00.568868400
Estableciendo el conducto a NULL …
Enter ia_aiq_get_aiqd_data()
Out-aiqd data size: 41480
[09-22 10:16:32.599] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No existe el archivo o el directorio
Liberando el conducto…
Trollgeir commented 9 months ago

Can confirm after numerous attempts I managed to get my camera working too.

Ubuntu 22.04, kernel 6.2.0-33-generic

After several failed attempts I tried to uninstall everything and go again from scratch, removing everything related to gst-launch/gstreamer. And then;

sudo add-apt-repository ppa:oem-solutions-group/intel-ipu6
sudo apt install linux-modules-ipu6-generic-hwe-22.04 linux-modules-ivsc-generic-hwe-22.04

After doing this I selected the additional drivers from the ppa: image

After a reboot the camera worked in google meet (although seems to be broken for cheese, but I don't really care).

gouyelliot commented 9 months ago

That's good news @Trollgeir ! I tried following your instructions, but now I don't have any /dev/video file on boot. Did you configure anything else after installing the packages ? I feel I'm missing something but can't figure out what

Trollgeir commented 9 months ago

That's good news @Trollgeir ! I tried following your instructions, but now I don't have any /dev/video file on boot. Did you configure anything else after installing the packages ? I feel I'm missing something but can't figure out what

I don't think so. I might have rebooted once before running the last line, and then a second reboot. I'll be honest I'm too scared to try to reproduce it because I've spent so many hours to fix this 😞

lukemarsden commented 9 months ago

Running ov2740 on X1 Carbon Gen 11 here. Ubuntu 22.04.

Both https://github.com/intel/ipu6-drivers/issues/172#issuecomment-1739853484 on stock 6.2 kernel and https://github.com/intel/ipu6-drivers/issues/22#issuecomment-1705198032 on 6.5.0-1004-oem kernel are working for me (being careful to uninstall the drivers when switching methods with apt remove linux-modules-ipu6-generic-hwe-22.04 linux-modules-ivsc-generic-hwe-22.04 or sudo dkms remove ipu6-drivers/0.0.0 respectively). However, the webcam is only working intermittently (in the same way on both kernels). It's very strange, if I load https://meet.new for example in Chrome, my dmesg -w will look like this:

[33900.129696] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 1
[33900.129703] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 0
[33900.231053] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[33907.585989] intel-ipu6-isys intel-ipu6-isys0: stream stop time out
[33907.586009] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
[33909.634053] intel-ipu6-isys intel-ipu6-isys0: stream close time out
[33909.634095] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 1
[33909.634103] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 0
[33909.759273] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036

Sometimes the video stream shows up immediately, sometimes it takes a few seconds, and sometimes it takes a few minutes. During that time, the light on the camera will flick off and on again in time with the stream stop/close time out messages above. In Chrome, it always seems to work eventually, in Zoom it seems like sometimes it permafails.

It seems like the intel-ipu6-isys driver is retrying on some internal failure. I'd love to get to the bottom of this and figure out how to make it work reliably all the time :) Anyone interested in debugging with me on my system?

Logs from one time turning the camera on in google meet worked first time:

dmesg -w

[34405.387505] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[34446.455300] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036

sudo journalctl -u v4l2-relayd.service -f: no logs

One time it took two retries (during which time the video stream was a blank black square for a short time):

[34451.128818] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[34458.513640] intel-ipu6-isys intel-ipu6-isys0: stream stop time out
[34458.513657] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
[34460.557312] intel-ipu6-isys intel-ipu6-isys0: stream close time out
[34460.557351] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 1
[34460.557359] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 0
[34460.728742] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[34461.220302] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
[34461.327925] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[34468.687606] intel-ipu6-isys intel-ipu6-isys0: stream stop time out
[34468.687627] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
[34470.731202] intel-ipu6-isys intel-ipu6-isys0: stream close time out
[34470.731239] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 1
[34470.731246] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 0
[34470.846949] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[34471.327767] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
[34471.446117] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[34478.701532] intel-ipu6-isys intel-ipu6-isys0: stream stop time out
[34478.701545] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
[34480.745107] intel-ipu6-isys intel-ipu6-isys0: stream close time out
[34480.745140] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 1
[34480.745147] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 0
[34480.856014] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036
[34488.231597] intel-ipu6-isys intel-ipu6-isys0: stream stop time out
[34488.231611] intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
[34490.283232] intel-ipu6-isys intel-ipu6-isys0: stream close time out
[34490.283256] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 1
[34490.283261] intel-ipu6-isys intel-ipu6-isys0: Intel IPU6 BE SOC capture 0: cleaning active queue 0
[34490.412371] intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036

sudo journalctl -u v4l2-relayd.service -f:

Sep 29 09:35:48 rocket sh[20815]: Out-aiqd data size: 41480
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:15.475] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:15.529] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:15.529] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:15.530] CamHAL[ERR] invalid media format, default value used.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:15.530] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:15.582] CamHAL[ERR] sensor output sub device is not set
Sep 29 09:35:48 rocket sh[20815]: Enter ia_aiq_get_aiqd_data()
Sep 29 09:35:48 rocket sh[20815]: Out-aiqd data size: 41480
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:16.88] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:16.128] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:16.128] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:16.128] CamHAL[ERR] invalid media format, default value used.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:16.128] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:16.186] CamHAL[ERR] sensor output sub device is not set
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:21.546] CamHAL[ERR] Poll: Device node fd 22 poll timeout.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:21.546] CamHAL[INF] Time out or thread is not running, ret = 0
Sep 29 09:35:48 rocket sh[20815]: Enter ia_aiq_get_aiqd_data()
Sep 29 09:35:48 rocket sh[20815]: Out-aiqd data size: 41480
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:25.618] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:25.663] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:25.663] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:25.663] CamHAL[ERR] invalid media format, default value used.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:25.663] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:25.712] CamHAL[ERR] sensor output sub device is not set
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:31.57] CamHAL[ERR] Poll: Device node fd 22 poll timeout.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:31.57] CamHAL[INF] Time out or thread is not running, ret = 0
Sep 29 09:35:48 rocket sh[20815]: Enter ia_aiq_get_aiqd_data()
Sep 29 09:35:48 rocket sh[20815]: Out-aiqd data size: 41480
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:35.123] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:35.186] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:35.186] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:35.186] CamHAL[ERR] invalid media format, default value used.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:35.186] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:35.240] CamHAL[ERR] sensor output sub device is not set
Sep 29 09:35:48 rocket sh[20815]: Enter ia_aiq_get_aiqd_data()
Sep 29 09:35:48 rocket sh[20815]: Out-aiqd data size: 41480
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:26:45.385] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:34:53.647] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:34:53.647] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:34:53.647] CamHAL[ERR] invalid media format, default value used.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:34:53.647] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:34:53.708] CamHAL[ERR] sensor output sub device is not set
Sep 29 09:35:48 rocket sh[20815]: Enter ia_aiq_get_aiqd_data()
Sep 29 09:35:48 rocket sh[20815]: Out-aiqd data size: 41480
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:34.811] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:39.390] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:39.390] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:39.390] CamHAL[ERR] invalid media format, default value used.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:39.390] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:39.458] CamHAL[ERR] sensor output sub device is not set
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:44.822] CamHAL[ERR] Poll: Device node fd 24 poll timeout.
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:44.822] CamHAL[INF] Time out or thread is not running, ret = 0
Sep 29 09:35:48 rocket sh[20815]: Enter ia_aiq_get_aiqd_data()
Sep 29 09:35:48 rocket sh[20815]: Out-aiqd data size: 41480
Sep 29 09:35:48 rocket sh[20815]: [09-29 09:35:48.900] CamHAL[WAR] Failed to open file /run/camera/ov2740-uf_VIDEO.aiqd, error No such file or directory

Is the /run/camera/ov2740-uf_VIDEO.aiqd a red herring or do I need to install some firmware in that location? (If so, why does it work occasionally? :sweat_smile:)

yorik commented 9 months ago

Just for the record: I'm running ov2740 on X1 Carbon Gen 11 here. Debian sid, 6.5.0-1-amd64 stock kernel.

It works all the time, in dmesg I can see only:

intel-ipu6-isys intel-ipu6-isys0: stream on ov2740 12-0036

and when close meeting tab:

intel-ipu6-isys intel-ipu6-isys0: stream off ov2740 12-0036
lukemarsden commented 9 months ago

oh, interesting @yorik! What steps exactly did you follow to set it up?

yorik commented 9 months ago

All by the README

lukemarsden commented 9 months ago

Thanks @yorik! The instructions for https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api are unclear to me, with either of the export PKG_CONFIG_PATH lines or with that env var unset, I get the following error on the ./autogen.sh step:

checking for
  gstreamer-1.0 >= 1.0.0
  gstreamer-base-1.0 >= 1.0.0
  gstreamer-controller-1.0 >= 1.0.0
... yes
Building with libcamhal
checking for libcamhal... no
configure: error: Cannot find libcamhal pkgconfig
configure failed

I don't know what libdrm.pc or yocto are. This is on a brand new debian sid install, following the items in your list. I can't find a debian package for libcamhal, was it supposed to come from ipu6-camera-hal? That installation completed successfully, including copying the results into /usr.

lukemarsden commented 9 months ago

Oh, export PKG_CONFIG_PATH="$HOME/webcam/ipu6-camera-hal" unblocked me

lukemarsden commented 9 months ago

Oh, but then make doesn't actually build anything

luke@oldschool:~/webcam/icamerasrc$ make
make  all-recursive
make[1]: Entering directory '/home/luke/webcam/icamerasrc'
Making all in src
make[2]: Entering directory '/home/luke/webcam/icamerasrc/src'
Making all in interfaces
make[3]: Entering directory '/home/luke/webcam/icamerasrc/src/interfaces'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/luke/webcam/icamerasrc/src/interfaces'
make[3]: Entering directory '/home/luke/webcam/icamerasrc/src'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/luke/webcam/icamerasrc/src'
make[2]: Leaving directory '/home/luke/webcam/icamerasrc/src'
make[2]: Entering directory '/home/luke/webcam/icamerasrc'
make[2]: Leaving directory '/home/luke/webcam/icamerasrc'
make[1]: Leaving directory '/home/luke/webcam/icamerasrc'
luke@oldschool:~/webcam/icamerasrc$ sudo make install
Making install in src
make[1]: Entering directory '/home/luke/webcam/icamerasrc/src'
Making install in interfaces
make[2]: Entering directory '/home/luke/webcam/icamerasrc/src/interfaces'
make[3]: Entering directory '/home/luke/webcam/icamerasrc/src/interfaces'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../../libtool   --mode=install /bin/install -c   libgsticamerainterface-1.0.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libgsticamerainterface-1.0.so.1.0.0 /usr/local/lib/libgsticamerainterface-1.0.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgsticamerainterface-1.0.so.1.0.0 libgsticamerainterface-1.0.so.1 || { rm -f libgsticamerainterface-1.0.so.1 && ln -s libgsticamerainterface-1.0.so.1.0.0 libgsticamerainterface-1.0.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgsticamerainterface-1.0.so.1.0.0 libgsticamerainterface-1.0.so || { rm -f libgsticamerainterface-1.0.so && ln -s libgsticamerainterface-1.0.so.1.0.0 libgsticamerainterface-1.0.so; }; })
libtool: install: /bin/install -c .libs/libgsticamerainterface-1.0.lai /usr/local/lib/libgsticamerainterface-1.0.la
libtool: warning: remember to run 'libtool --finish /home/luke/webcam/out/install/lib'
 /bin/mkdir -p '/usr/local/include/gstreamer-1.0/gst/icamera'
 /bin/install -c -m 644 gstcamera3ainterface.h gstcameraispinterface.h gstcameradewarpinginterface.h gstcamerawfovinterface.h '/usr/local/include/gstreamer-1.0/gst/icamera'
make[3]: Leaving directory '/home/luke/webcam/icamerasrc/src/interfaces'
make[2]: Leaving directory '/home/luke/webcam/icamerasrc/src/interfaces'
make[2]: Entering directory '/home/luke/webcam/icamerasrc/src'
make[3]: Entering directory '/home/luke/webcam/icamerasrc/src'
make[3]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/lib/gstreamer-1.0'
 /bin/bash ../libtool   --mode=install /bin/install -c   libgsticamerasrc.la '/usr/local/lib/gstreamer-1.0'
libtool:   error: error: cannot install 'libgsticamerasrc.la' to a directory not ending in /home/luke/webcam/out/install/lib/gstreamer-1.0
make[3]: *** [Makefile:546: install-pluginLTLIBRARIES] Error 1
make[3]: Leaving directory '/home/luke/webcam/icamerasrc/src'
make[2]: *** [Makefile:848: install-am] Error 2
make[2]: Leaving directory '/home/luke/webcam/icamerasrc/src'
make[1]: *** [Makefile:685: install-recursive] Error 1
make[1]: Leaving directory '/home/luke/webcam/icamerasrc/src'
make: *** [Makefile:520: install-recursive] Error 1

What am I doing wrong?

lukemarsden commented 9 months ago

Hmm, maybe the build.sh from -hal also installed icamerasrc? Anyway, guessing ./autogen.sh && ./configure && make && sudo make install for https://gitlab.com/vicamo/v4l2-relayd (the commit you linked to seemed to be in main already, and it has an empty readme), and rebooting, I'm now just getting a lot of this in dmesg -w:

[    6.371669] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[    6.371823] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[    8.215767] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16
[    8.215775] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16
[   10.215709] intel-ipu6-isys intel-ipu6-isys0: Device release time out -16
[   10.240410] intel-ipu6-isys intel-ipu6-isys0: Clearing old context
[   11.312568] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16
[   11.312584] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16
[   13.315721] intel-ipu6-isys intel-ipu6-isys0: Device release time out -16
GinaMuuss commented 9 months ago

Does the camera work for you if v4l2-relayd is not running, and you run the manual command yorik proposed before? gst-launch-1.0 -v icamerasrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! video/x-raw,format=YUY2 ! v4l2sink device=/dev/video0 With this command it works for me even though I get the same errors as you. v4l2-relayd does not work though, whether it is running or not does not change that I just get a black image.

lukemarsden commented 9 months ago

Following just the instructions above, I don't end up with a gst-launch-1.0 binary installed. I wonder if I missed something?

lukemarsden commented 9 months ago

Got the ov2740 in my X1 Yoga Gen 8 working reliably using Fedora 38 on kernel 6.5.5-200.fc38.x86_64 following the instructions here: https://hansdegoede.livejournal.com/27276.html

It seemed to be broken at first but I think I just needed to reboot twice!?

I've turned the camera off and on maybe 50 times - only one time I got the dreaded black square and had to sudo systemctl restart v4l2-relayd.service

I'll come back to the X1 Carbon Gen 11 another day. Despite having, I think, an idential sensor it seems to be much flakier, per https://github.com/intel/ipu6-drivers/issues/172#issuecomment-1740521437.