intel / ipu6-drivers

152 stars 49 forks source link

HP Spectre x360 (2023): webcam INT3537 does not work #202

Open MrTomRod opened 7 months ago

MrTomRod commented 7 months ago

I'm having trouble to get my webcam to work on my new laptop running Fedora 39.

I'm using Fedora 39 and installed the latest kernel and ipu6 as explained here. ```bash sudo dnf update \ --enablerepo=updates-testing \ --enablerepo=rpmfusion-free-updates-testing \ --enablerepo=rpmfusion-nonfree-updates-testing \ 'kernel*' '*v4l2loopback' # And now things are ready to install the IPU6 driver stack: sudo dnf install \ --enablerepo=updates-testing \ --enablerepo=rpmfusion-free-updates-testing \ --enablerepo=rpmfusion-nonfree-updates-testing \ akmod-intel-ipu6 # Secure boot must be disabled. # Reboot. ```

Installed packages:

The webcam seems to be detected:

Output of v4l2-ctl ```bash $ v4l2-ctl --list-devices ipu6 (PCI:pci:pci0000:00): /dev/video7 ipu6 (pci:pci0000:00): /dev/media0 Intel MIPI Camera (platform:v4l2loopback-000): /dev/video0 $ v4l2-ctl --device=/dev/video0 --all Driver Info: Driver name : v4l2 loopback Card type : Intel MIPI Camera Bus info : platform:v4l2loopback-000 Driver version : 6.6.2 Capabilities : 0x85200001 Video Capture Read/Write Streaming Extended Pix Format Device Capabilities Device Caps : 0x05200001 Video Capture Read/Write Streaming Extended Pix Format Priority: 2 Video input : 0 (loopback: ok) Format Video Capture: Width/Height : 1280/720 Pixel Format : 'YU12' (Planar YUV 4:2:0) Field : None Bytes per Line : 1280 Size Image : 1382400 Colorspace : Rec. 709 Transfer Function : sRGB YCbCr/HSV Encoding: ITU-R 601 Quantization : Limited Range Flags : Format Video Output: Width/Height : 1280/720 Pixel Format : 'YU12' (Planar YUV 4:2:0) Field : None Bytes per Line : 1280 Size Image : 1382400 Colorspace : Rec. 709 Transfer Function : sRGB YCbCr/HSV Encoding: ITU-R 601 Quantization : Limited Range Flags : Streaming Parameters Video Capture: Frames per second: 30.000 (30/1) Read buffers : 2 Streaming Parameters Video Output: Frames per second: 30.000 (30/1) Write buffers : 2 User Controls keep_format 0x0098f900 (bool) : default=0 value=0 sustain_framerate 0x0098f901 (bool) : default=0 value=0 timeout 0x0098f902 (int) : min=0 max=100000 step=1 default=0 value=0 timeout_image_io 0x0098f903 (button) : value=0 flags=write-only, execute-on-write ```

However, it doesn't work with Cheese nor Firefox.

$ cheese
...
stream error: can't negotiate buffers on port: ../src/gst/gstpipewiresrc.c(689): on_state_changed (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin36/GstPipeWireSrc:pipewiresrc1
...

dmesg seems to detect a problem:

$ dmesg | grep ipu6
[    8.045838] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[    8.046155] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x1)
[    8.046182] intel-ipu6 0000:00:05.0: physical base address 0x601c000000
[    8.046184] intel-ipu6 0000:00:05.0: mapped as: 0x000000008acf977f
[    8.046898] intel-ipu6 0000:00:05.0: IPU in secure mode
[    8.046902] intel-ipu6 0000:00:05.0: IPU secure touch = 0x80000000
[    8.046904] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[    8.064533] intel-ipu6 0000:00:05.0: IPC reset done
[    8.064537] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[    8.067861] intel-ipu6 0000:00:05.0: FW version: 20220510
[    8.068682] intel-ipu6 0000:00:05.0: Found supported sensor INT3537:00
[    8.068804] intel-ipu6 0000:00:05.0: Connected 1 cameras
[    8.070216] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[    8.093284] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[    8.162665] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[    8.162885] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[    8.200939] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[    8.201941] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   10.089105] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16
[   10.089110] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16
[   12.088705] intel-ipu6-isys intel-ipu6-isys0: Device release time out -16
[   12.135337] intel-ipu6-isys intel-ipu6-isys0: Clearing old context
Output of sudo -E gst-launch-1.0 icamerasrc device-name=ov13b10-wf af-mode=2 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink ```text $ sudo -E gst-launch-1.0 icamerasrc device-name=ov13b10-wf af-mode=2 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink Setting pipeline to PAUSED ... [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov13b10.aiqb [11-27 21:18:06.662] CamHAL[ERR] there is no aiqb file:ov13b10 [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov13b10.aiqb [11-27 21:18:06.662] CamHAL[ERR] there is no aiqb file:ov13b10 [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov8856.aiqb [11-27 21:18:06.662] CamHAL[ERR] there is no aiqb file:ov8856 [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov8856.aiqb [11-27 21:18:06.662] CamHAL[ERR] there is no aiqb file:ov8856 [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov01a10.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov01a10.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov01a10.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name ov01a10.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [11-27 21:18:06.662] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb [11-27 21:18:06.663] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb [11-27 21:18:06.664] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb [11-27 21:18:06.664] CamHAL[INF] aiqb file name ov01a1s.aiqb [11-27 21:18:06.664] CamHAL[INF] aiqb file name ov01a1s.aiqb [11-27 21:18:06.664] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1 Pipeline is live and does not need PREROLL ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock [11-27 21:18:06.671] CamHAL[ERR] Get entity fail for calling getEntityById [11-27 21:18:06.671] CamHAL[ERR] Get entity fail for calling getEntityById [11-27 21:18:06.671] CamHAL[ERR] setup Link ov13b10 [-1:0] ==> Intel IPU6 CSI-2 [-1x0] enable 1 failed. [11-27 21:18:06.671] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1 [11-27 21:18:06.671] CamHAL[ERR] set up mediaCtl failed [11-27 21:18:06.671] CamHAL[ERR] @configure Device Configure failed [11-27 21:18:06.671] CamHAL[ERR] failed to config streams. ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error. Additional debug info: 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.004439587 Setting pipeline to NULL ... Freeing pipeline ... ```
Output of ls /sys/bus/i2c/devices ```text $ ls /sys/bus/i2c/devices i2c-0 i2c-11 i2c-14 i2c-17 i2c-2 i2c-5 i2c-8 i2c-INT3537:00 i2c-TXNW3643:01 i2c-1 i2c-12 i2c-15 i2c-18 i2c-3 i2c-6 i2c-9 i2c-OVTI00AB:00 i2c-10 i2c-13 i2c-16 i2c-19 i2c-4 i2c-7 i2c-ELAN2513:00 i2c-SYNA32E9:00 ```

Can you please help me get it to work?

odanoburu commented 7 months ago

I had it working on Fedora 38, but I just updated to 39 and it doesn't work anymore. Maybe it's the Fedora update per se, just the new kernel. The driver has been stable lately (until this upgrade, that is), but I've been using it for some time now and it was overall pretty unstable, with kernel/package updates often breaking it, to the point that I can't rely on the camera to be working if/when I need it.

So maybe it will just fix itself in a few updates? My hardware is different, however, so it's not exactly the same sensor; maybe you could downgrade to 38 and see if it works?

odanoburu commented 7 months ago

You could try posting here, or opening another bug report. For me, restarting the v4l2-relayd service with systemctl restart v4l2-relayd restored the camera functionality on kernel 6.6.4-200 (Fedora 39).

MrTomRod commented 6 months ago

Thanks for the tips. Unfortunately, systemctl restart v4l2-relayd doesn't help and the alternative package didn't solve the problem either. I don't have the time to test the stack on Fedora 38 atm.

jeffreyfq commented 5 months ago

Hi, I have a 16" HP spectre x360 ( 16-f1xxx ) with the same camera. I installed the driver recently (yesterday) from github via DKMS and I am on kernel version "6.6.4-060604-generic"

Same problem, and same intel-ipu6 error messages!

Further dmesg | grep hi556 returns:

[    5.322990] hi556 i2c-INT3537:00: failed to find sensor: -5
[    5.323694] hi556: probe of i2c-INT3537:00 failed with error -5

The driver can not find the sensor, I assume this causes later errors of the IPU6 module.

I am not sure if the following entries in dmesg are related to the problem, dmesg | grep mei returns:

[    5.269611] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
[    5.328964] mei_gsc i915.mei-gscfi.768: FW not ready: resetting: dev_state = 2 pxp = 0
[    5.328994] mei_gsc i915.mei-gscfi.768: unexpected reset: dev_state = ENABLED fw status = 00000345 84670000 00000000 00000000 E0020002 00000000
[    5.329012] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: Could not read FW version ret = -19
[    5.329013] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: FW version command failed -5
[    5.329759] mei_gsc i915.mei-gsc.768: FW not ready: resetting: dev_state = 2 pxp = 2
[    5.329797] mei_gsc i915.mei-gsc.768: unexpected reset: dev_state = ENABLED fw status = 00000345 84670000 00000000 00000000 E0020002 00000000
[    5.389717] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[    5.390552] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
paulmenzel commented 5 months ago

To my knowledge, for full support specific knowledge about the hardware design is needed, that only HP has. Did you contact their support?

PS: As HP already made money by selling the device, in my opinion, you should return the devices to HP and buy a device with full GNU/Linux support.

MrTomRod commented 5 months ago

@jeffreyfq I get different dmesg errors for mei and hi556:

$ dmesg | grep hi556
[   11.089283] hi556 i2c-INT3537:00: can't get clock frequency
[   11.089288] hi556 i2c-INT3537:00: failed to check HW configuration: -22
[   11.089334] hi556: probe of i2c-INT3537:00 failed with error -22
$ dmesg | grep mei
[   11.146932] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
[   11.255533] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[   11.260689] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
jwrdegoede commented 5 months ago

For Fedora users with this issue, please try running:

sudo rm "/lib/modules/$(uname -r)/kernel/drivers/media/i2c/hi556.ko.xz"

This will cause the kmod-intel-ipu6-... version of the hi556 driver to get used instead of the one from the mainline kernel, hopefully this will help.

After running the rm command reboot. After rebooting first run the rm command again, it should now fail with a "No such file or directory" error. If it does not fail you have rebooted into another kernel (likely due to a kernel update) in this case reboot again and run the rm command again until it does fail.

Once the rm command fails after a reboot, check dmesg for messages about the hi556 driver:

sudo dmesg | grep hi556

This should no longer show any errors and now your camera will hopefully work.

MrTomRod commented 5 months ago

That seems to fix something, that much is clear! However, it still doesn't work. The picture is always black.

dmesg now looks reasonable:

$ dmesg | grep -E 'ipu|mei|hi556'
[   10.973377] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[   10.973737] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x1)
[   10.973762] intel-ipu6 0000:00:05.0: physical base address 0x601c000000
[   10.973763] intel-ipu6 0000:00:05.0: mapped as: 0x000000008d90f41c
[   10.977161] intel-ipu6 0000:00:05.0: IPU in secure mode
[   10.977166] intel-ipu6 0000:00:05.0: IPU secure touch = 0x80000000
[   10.977167] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[   10.994236] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
[   10.994523] intel-ipu6 0000:00:05.0: IPC reset done
[   10.994527] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[   10.996643] intel-ipu6 0000:00:05.0: FW version: 20220510
[   10.997634] intel-ipu6 0000:00:05.0: Found supported sensor INT3537:00
[   10.997702] intel-ipu6 0000:00:05.0: Connected 1 cameras
[   11.004792] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[   11.018600] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[   11.091676] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[   11.091718] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[   11.102711] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[   11.115954] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   11.116139] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   11.136954] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])

Some error seems to be picked up using v4l2-compliance -d /dev/video0:

Output of v4l2-compliance -d /dev/video0 ```text $ v4l2-compliance -d /dev/video0 v4l2-compliance 1.25.0, 64 bits, 64-bit time_t Compliance test for v4l2 loopback device /dev/video0: Driver Info: Driver name : v4l2 loopback Card type : Intel MIPI Camera Bus info : platform:v4l2loopback-000 Driver version : 6.6.11 Capabilities : 0x85200001 Video Capture Read/Write Streaming Extended Pix Format Device Capabilities Device Caps : 0x05200001 Video Capture Read/Write Streaming Extended Pix Format Required ioctls: test VIDIOC_QUERYCAP: OK test invalid ioctls: OK Allow for multiple opens: test second /dev/video0 open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK fail: ../utils/v4l2-compliance/v4l2-compliance.cpp(753): !ok test for unlimited opens: FAIL Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 1 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Control ioctls (Input 0): fail: ../utils/v4l2-compliance/v4l2-test-controls.cpp(101): non-zero min/max/step/def fail: ../utils/v4l2-compliance/v4l2-test-controls.cpp(201): invalid control 0098f903 test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL fail: ../utils/v4l2-compliance/v4l2-test-controls.cpp(352): node->controls.find(qctrl.id) == node->controls.end() test VIDIOC_QUERYCTRL: FAIL test VIDIOC_G/S_CTRL: OK test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 1 Private Controls: 3 Format ioctls (Input 0): fail: ../utils/v4l2-compliance/v4l2-test-formats.cpp(337): Video Output cap not set, but Video Output formats defined test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL fail: ../utils/v4l2-compliance/v4l2-test-formats.cpp(1300): node->has_frmintervals && !cap->capability test VIDIOC_G/S_PARM: FAIL test VIDIOC_G_FBUF: OK (Not Supported) fail: ../utils/v4l2-compliance/v4l2-test-formats.cpp(633): Video Output cap not set, but Video Output formats defined test VIDIOC_G_FMT: FAIL test VIDIOC_TRY_FMT: OK fail: ../utils/v4l2-compliance/v4l2-test-formats.cpp(462): expected EINVAL, but got 16 when getting format for buftype 2 test VIDIOC_S_FMT: FAIL test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported) test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls (Input 0): test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls (Input 0): fail: ../utils/v4l2-compliance/v4l2-test-buffers.cpp(456): g_timestamp().tv_sec || g_timestamp().tv_usec fail: ../utils/v4l2-compliance/v4l2-test-buffers.cpp(483): buf.check(Unqueued, i) fail: ../utils/v4l2-compliance/v4l2-test-buffers.cpp(612): testQueryBuf(node, i, q.g_buffers()) test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL test VIDIOC_EXPBUF: OK (Not Supported) test Requests: OK (Not Supported) Total for v4l2 loopback device /dev/video0: 45, Succeeded: 37, Failed: 8, Warnings: 0 ```

The rest looks unchanged, I think:

Output of sudo -E gst-launch-1.0 icamerasrc device-name=ov13b10-wf af-mode=2 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink ```text Setting pipeline to PAUSED ... [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov13b10.aiqb [01-21 19:50:27.801] CamHAL[ERR] there is no aiqb file:ov13b10 [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov13b10.aiqb [01-21 19:50:27.801] CamHAL[ERR] there is no aiqb file:ov13b10 [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov8856.aiqb [01-21 19:50:27.801] CamHAL[ERR] there is no aiqb file:ov8856 [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov8856.aiqb [01-21 19:50:27.801] CamHAL[ERR] there is no aiqb file:ov8856 [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov01a10.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov01a10.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov01a10.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name ov01a10.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [01-21 19:50:27.801] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb [01-21 19:50:27.802] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb [01-21 19:50:27.803] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb [01-21 19:50:27.803] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb [01-21 19:50:27.803] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb [01-21 19:50:27.803] CamHAL[INF] aiqb file name ov01a1s.aiqb [01-21 19:50:27.803] CamHAL[INF] aiqb file name ov01a1s.aiqb [01-21 19:50:27.803] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1 Pipeline is live and does not need PREROLL ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock [01-21 19:50:27.810] CamHAL[ERR] Get entity fail for calling getEntityById [01-21 19:50:27.810] CamHAL[ERR] Get entity fail for calling getEntityById [01-21 19:50:27.810] CamHAL[ERR] setup Link ov13b10 [-1:0] ==> Intel IPU6 CSI-2 [-1x0] enable 1 failed. [01-21 19:50:27.810] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1 [01-21 19:50:27.810] CamHAL[ERR] set up mediaCtl failed [01-21 19:50:27.810] CamHAL[ERR] @configure Device Configure failed [01-21 19:50:27.810] CamHAL[ERR] failed to config streams. ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error. Additional debug info: 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.004269363 Setting pipeline to NULL ... Freeing pipeline ... ```
Output of v4l2-ctl --device=/dev/video0 --all ```text Driver Info: Driver name : v4l2 loopback Card type : Intel MIPI Camera Bus info : platform:v4l2loopback-000 Driver version : 6.6.11 Capabilities : 0x85200001 Video Capture Read/Write Streaming Extended Pix Format Device Capabilities Device Caps : 0x05200001 Video Capture Read/Write Streaming Extended Pix Format Priority: 2 Video input : 0 (loopback: ok) Format Video Capture: Width/Height : 1280/720 Pixel Format : 'YU12' (Planar YUV 4:2:0) Field : None Bytes per Line : 1280 Size Image : 1382400 Colorspace : Rec. 709 Transfer Function : sRGB YCbCr/HSV Encoding: ITU-R 601 Quantization : Limited Range Flags : Format Video Output: Width/Height : 1280/720 Pixel Format : 'YU12' (Planar YUV 4:2:0) Field : None Bytes per Line : 1280 Size Image : 1382400 Colorspace : Rec. 709 Transfer Function : sRGB YCbCr/HSV Encoding: ITU-R 601 Quantization : Limited Range Flags : Streaming Parameters Video Capture: Frames per second: 30.000 (30/1) Read buffers : 2 Streaming Parameters Video Output: Frames per second: 30.000 (30/1) Write buffers : 2 User Controls keep_format 0x0098f900 (bool) : default=0 value=0 sustain_framerate 0x0098f901 (bool) : default=0 value=0 timeout 0x0098f902 (int) : min=0 max=100000 step=1 default=0 value=0 timeout_image_io 0x0098f903 (button) : value=0 flags=write-only, execute-on-write ```
Output of cheese ```text $ cheese ... stream error: can't negotiate buffers on port: ../src/gst/gstpipewiresrc.c(689): on_state_changed (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin36/GstPipeWireSrc:pipewiresrc1 ... ```
jwrdegoede commented 5 months ago

@MrTomRod ok so it looks like we are getting somewhere.

Cheese is known to not work with the proprietary userspace stack from Intel, not even with the v4l2loopback /dev/video0 compat support.

The best test to just test the camera stack and not v4l2-relayd is using gst-launch as you did. But your commandline is wrong, specifically the device-name parameter points to another sensor then you have.

Please try this commandline instead:

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

If that works, then you can try the v4l2relayd/v4l2loopback /dev/video0 compatibility by opening https://mozilla.github.io/webrtc-landing/gum_test.html in firefox. If the gst-launch command works, but firefox does not then try running:

sudo systemctl restart v4l2-relayd

and then try the gum_test page in firefox again.

MrTomRod commented 5 months ago

This is the output, seems like the device is not found (Failed to find DevName for cameraId: 0):

$ gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink
Setting pipeline to PAUSED ...
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov13b10.aiqb
[01-21 22:42:33.151] CamHAL[ERR] there is no aiqb file:ov13b10
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov13b10.aiqb
[01-21 22:42:33.151] CamHAL[ERR] there is no aiqb file:ov13b10
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov8856.aiqb
[01-21 22:42:33.151] CamHAL[ERR] there is no aiqb file:ov8856
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov8856.aiqb
[01-21 22:42:33.151] CamHAL[ERR] there is no aiqb file:ov8856
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov01a10.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov01a10.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov01a10.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name ov01a10.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[01-21 22:42:33.151] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[01-21 22:42:33.152] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[01-21 22:42:33.153] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[01-21 22:42:33.153] CamHAL[INF] aiqb file name ov01a1s.aiqb
[01-21 22:42:33.153] CamHAL[INF] aiqb file name ov01a1s.aiqb
[01-21 22:42:33.153] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[01-21 22:42:33.162] CamHAL[ERR] Get entity fail for calling getEntityById
[01-21 22:42:33.162] CamHAL[ERR] Get entity fail for calling getEntityById
[01-21 22:42:33.162] CamHAL[ERR] setup Link ov13b10  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
[01-21 22:42:33.162] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[01-21 22:42:33.162] CamHAL[ERR] set up mediaCtl failed
[01-21 22:42:33.162] CamHAL[ERR] @configure Device Configure failed
[01-21 22:42:33.162] CamHAL[ERR] failed to config streams.
ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Additional debug info:
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.007305264
Setting pipeline to NULL ...
Freeing pipeline ...
jwrdegoede commented 5 months ago

@MrTomRod ok so it looks like the proprietary userspace stack does not recognize your specific camera module (sensor + lens module) even though there is support for some hi556 modules, that is unfortunate.

In that case there is nothing we can do.

MrTomRod commented 5 months ago

Thanks again for your efforts.

If I wanted to escalate this, whom should I talk to, HP or Intel? Maybe ipu6-camera-bins? Do you think the issue will not be fixed and I should return my laptop?

jwrdegoede commented 5 months ago

If I wanted to escalate this, whom should I talk to, HP or Intel? Maybe ipu6-camera-bins? Do you think the issue will not be fixed and I should return my laptop?

You should talk to HP, specifically you should ask HP to request official Linux support for the camera from Intel. AFAIK Intel will only prioritize improving IPU6 support if they get requests to do so from hardware vendors selling Intel based laptops.

MrTomRod commented 5 months ago

Thanks to @jwrdegoede, the camera is now working thanks to a new, fully open source software stack! Here's the link and the installation instructions: https://copr.fedorainfracloud.org/coprs/jwrdegoede/ipu6-softisp

Here's @jwrdegoede 's blog on the subject: https://hansdegoede.dreamwidth.org/28153.html

Without the proprietary AI magic, the image quality isn't fantastic, but at least there is an image! I still have trouble with Firefox pipewire camera support, but I'm confident this will be fixed soon. (Update: it's fixed with a new patch in Koji: koji-tool install 112617345, then log in again.)

image

sterlingdcs-damian commented 5 months ago

Where might i find simple steps for getting this working on ubuntu?

ChocolateLoverRaj commented 4 months ago

@MrTomRod I have a Redrix #182 which also has a hi556 sensor. WHen I use the open source MIPI stack I also get that beige tint to the image. It's nice to know that this is normal, and it seems like there are plans / possibility of further improvements to the image.