Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find DevName for cameraId: 0 || setup Link ov13b10 [-1:0] ==> Intel IPU6 CSI-2 [-1x0] enable 1 failed #26

Open
vpodzime opened this issue Nov 30, 2022 · 18 comments

Comments

@vpodzime
Copy link

This is the output I get when trying to use the icamerasrc plugin the way suggested for Alder Lake devices in the README:

$ sudo gst-launch-1.0 --gst-debug-level=3 -m icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink
Setting pipeline to PAUSED ...
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov13b10
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov13b10
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov8856.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov8856
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov8856.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov8856
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-30 19:11:31.362] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-30 19:11:31.362] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-30 19:11:31.362] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-30 19:11:31.362] 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 ...
Got message #12 from element "ximagesink0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #13 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
0:00:00.609886890 37743 0x55b1de5bf120 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<camerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Got message #14 from element "capsfilter0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #15 from element "camerasrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #16 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #18 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #19 from element "capsfilter0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #22 from pad "camerasrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"\(Gstcamerasrc\)\ camerasrc0", object=(GstTask)"\(GstTask\)\ camerasrc0:src";
Got message #23 from element "camerasrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #24 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Got message #25 from pad "camerasrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"\(Gstcamerasrc\)\ camerasrc0", object=(GstTask)"\(GstTask\)\ camerasrc0:src";
Got message #26 from element "pipeline0" (stream-start): GstMessageStreamStart, group-id=(uint)1;
Got message #29 from element "pipeline0" (new-clock): GstMessageNewClock, clock=(GstClock)"\(GstSystemClock\)\ GstSystemClock";
New clock: GstSystemClock
Got message #31 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #32 from element "capsfilter0" (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #33 from element "camerasrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
[11-30 19:11:31.374] CamHAL[ERR] Get entity fail for calling getEntityById
[11-30 19:11:31.374] CamHAL[ERR] Get entity fail for calling getEntityById
[11-30 19:11:31.374] CamHAL[ERR] setup Link ov13b10  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
[11-30 19:11:31.374] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[11-30 19:11:31.374] CamHAL[ERR] set up mediaCtl failed
[11-30 19:11:31.374] CamHAL[ERR] @configure Device Configure failed
[11-30 19:11:31.374] CamHAL[ERR] failed to config streams.
0:00:00.617267443 37743 0x55b1de5bf120 ERROR             icamerasrc gstcamerasrc.cpp:2763:gst_camerasrc_set_caps: CameraId=0, StreamId=0 failed to config stream for format NV12 1280x720.
0:00:00.617286386 37743 0x55b1de5bf120 WARN              CamBaseSrc gstcambasesrc.cpp:3143:gst_cam_base_src_loop:<camerasrc0> error: src pad: Internal data flow error.
0:00:00.617292300 37743 0x55b1de5bf120 WARN              CamBaseSrc gstcambasesrc.cpp:3143:gst_cam_base_src_loop:<camerasrc0> error: streaming task paused, reason not-negotiated (-4)
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)
Got message #35 from element "camerasrc0" (error): 0:00:00.617481166 37743 0x55b1de5d04f0 WARN               structure gststructure.c:2091:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
GstMessageError, gerror=(GError)NULL, debug=(string)"gstcambasesrc.cpp\(3143\):\ gst_cam_base_src_loop\ \(\):\ /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:\012streaming\ task\ paused\,\ reason\ not-negotiated\ \(-4\)";
Execution ended after 0:00:00.007495419
Setting pipeline to NULL ...
Freeing pipeline ...

I have no idea what the problem is or even where to start looking/debugging. I tried checking ldd /usr/lib64/gstreamer-1.0/libgsticamerasrc.so and there are no missing libraries. I also tried running gst-launch-1.0 with strace, but I didn't see any obvious error there. 😞

@vpodzime vpodzime changed the title Failed to find DevName for cameraId: 0 Failed to find DevName for cameraId: 0 || setup Link ov13b10 [-1:0] ==> Intel IPU6 CSI-2 [-1x0] enable 1 failed Nov 30, 2022
@brmarkus
Copy link

brmarkus commented Dec 1, 2022

Can you provide more details about your environment first, please?
Which OS, which HW are you running on?
Which versions have you installed?
How have you build/compiled your environment?
Have you installed the IPU-drivers from the repos mentioned under "https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api#icamerasrc", in which version, and how have you built and installed them?
Which camera/sensor do you use, how is it connected and integrated into your environment?
Each sensor/type of sensor has a set of config-files; if your camera/sensor is different/special/exotic, then you might need to add new config-files, something like under "https://github.com/intel/ipu6-camera-hal/tree/main/config/linux/ipu6ep".

@vpodzime
Copy link
Author

vpodzime commented Dec 2, 2022

Can you provide more details about your environment first, please?

Sure thing! Sorry for not doing that right away...

Hardware

Dell XPS 13 9320 (Alder Lake)
CPU: i7-1260P
Multimedia HW:

        *-multimedia:0
             description: Multimedia controller
             product: Intel Corporation
             vendor: Intel Corporation
             physical id: 5
             bus info: pci@0000:00:05.0
             version: 02
             width: 64 bits
             clock: 33MHz
             capabilities: pciexpress pm bus_master cap_list
             configuration: driver=intel-ipu6 latency=0
             resources: iomemory:600-5ff irq:16 memory:603e000000-603effffff

Software

OS: Fedora 36
GStreamer: gstreamer1-1.20.3-1.fc36.x86_64

Built and installed from git revisions:

  • ipu6-drivers: 278b7e3d0670f653944cf208cea044620c4c11a1
  • ipu6-camera-bins: 4694ba7ee51652d29ef41e7fde846b83a2a1c53b
  • ipu6-camera-hal: cc0b859daeb5fdcdf23ed066ce0b6e313225fbb1
  • icamerasrc: 3b7cdb9

Kernel modules:

$ sudo lsmod|grep intel_ipu6
intel_ipu6_isys       155648  0
videobuf2_dma_contig    24576  1 intel_ipu6_isys
videobuf2_v4l2         40960  1 intel_ipu6_isys
videobuf2_common       86016  4 videobuf2_dma_contig,videobuf2_v4l2,intel_ipu6_isys,videobuf2_memops
intel_ipu6_psys       110592  0
intel_ipu6            131072  2 intel_ipu6_isys,intel_ipu6_psys
v4l2_fwnode            32768  2 ov01a10,intel_ipu6_isys
v4l2_async             32768  3 v4l2_fwnode,ov01a10,intel_ipu6_isys
videodev              311296  5 v4l2_async,videobuf2_v4l2,ov01a10,intel_ipu6_isys,videobuf2_common
mc                     69632  6 v4l2_async,videodev,videobuf2_v4l2,ov01a10,intel_ipu6_isys,videobuf2_common

/sys contents

$ ll /sys/class/video4linux/
total 0
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev0 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev0
lrwxrwxrwx. 1 root root 0 Nov 28 07:55 v4l-subdev1 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev1
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev2 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev2
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev3 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev3
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev4 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev4
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev5 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev5
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev6 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev6
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev7 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev7
lrwxrwxrwx. 1 root root 0 Dec  2 23:39 v4l-subdev8 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/v4l-subdev8
lrwxrwxrwx. 1 root root 0 Nov 28 07:55 video0 -> ../../devices/pci0000:00/0000:00:05.0/intel-ipu6-isys0/video4linux/video0
$ cat /sys/class/video4linux/video0/name 
Intel IPU6 BE SOC capture 0
$ grep '.*' /sys/class/video4linux/v4l-subdev?/name 
/sys/class/video4linux/v4l-subdev0/name:Intel IPU6 CSI-2 0
/sys/class/video4linux/v4l-subdev1/name:Intel IPU6 CSI-2 1
/sys/class/video4linux/v4l-subdev2/name:Intel IPU6 CSI-2 2
/sys/class/video4linux/v4l-subdev3/name:Intel IPU6 CSI-2 3
/sys/class/video4linux/v4l-subdev4/name:Intel IPU6 CSI-2 4
/sys/class/video4linux/v4l-subdev5/name:Intel IPU6 CSI-2 5
/sys/class/video4linux/v4l-subdev6/name:Intel IPU6 CSI-2 6
/sys/class/video4linux/v4l-subdev7/name:Intel IPU6 CSI-2 7
/sys/class/video4linux/v4l-subdev8/name:Intel IPU6 CSI2 BE SOC 0

@vpodzime
Copy link
Author

vpodzime commented Dec 2, 2022

Each sensor/type of sensor has a set of config-files; if your camera/sensor is different/special/exotic, then you might need to add new config-files, something like under "https://github.com/intel/ipu6-camera-hal/tree/main/config/linux/ipu6ep".

Sorry, I don't even have a good idea about my sensor/type, let alone how to add a new config file. The ov01a10 is loaded on my laptop (as can be seen above), but that doesn't prove anything.

@vpodzime
Copy link
Author

vpodzime commented Dec 3, 2022

The relevant part of dmesg:

[   13.067581] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[   13.067695] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[   13.067707] intel-ipu6 intel-ipu: physical base address 0x603e000000
[   13.067708] intel-ipu6 intel-ipu: mapped as: 0x00000000ee78802f
[   13.067769] intel-ipu6 intel-ipu: Unable to set secure mode
[   13.067772] intel-ipu6 intel-ipu: IPU in non-secure mode
[   13.067773] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[   13.067775] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[   13.067779] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[   13.067780] intel-ipu6 intel-ipu: IPC reset done
[   13.067781] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[   13.069507] intel-ipu6 intel-ipu: FW version: 20220510
[   13.070492] intel-ipu6 intel-ipu: IPU6-v3 driver version 1.0
[   13.095475] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   13.095675] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0

@kervel
Copy link

kervel commented Feb 21, 2023

Hello,

did you ever get this fixed ? I'm in a same situation. The touchpad of my xps 9320 failed, so i now got an identical replacement laptop. I installed ubuntu, just like on the previous one. On the previous one ipu6 worked fine, the new one fails with the error messages as listed here.

Completely puzzled why one works and the other one fails, maybe the camera module is of a new hw revision ...

Package: libcamhal-ipu6ep0
Source: ipu6-camera-hal
Priority: optional
Section: libs
Installed-Size: 3561
Maintainer: Commercial Engineering <[email protected]>
Architecture: amd64
Version: 0~git202302070245.a359c1e~ubuntu22.04.2
Recommends: gstreamer1.0-icamera, v4l2-relayd, linux-modules-ipu6-oem-22.04b, linux-modules-ivsc-oem-22.04b
Provides: libcamhal.so.0
Depends: libc6 (>= 2.34), libexpat1 (>= 2.0.1), libgcc-s1 (>= 3.3.1), libipu6ep (>= 0~git202302081011.d1330e8), libstdc++6 (>= 12), libcamhal-ipu6ep-common (= 0~git202302070245.a359c1e~ubuntu22.04.2)
Conflicts: libcamhal.so.0
Filename: pool/main/i/ipu6-camera-hal/libcamhal-ipu6ep0_0~git202302070245.a359c1e~ubuntu22.04.2_amd64.deb
Size: 1149778
MD5sum: 08fbbdb67b771c293717639eab3058dc
SHA1: b5f927581743d34b4c7b66b9308b8bb104140c1b
SHA256: b9f728d0e067ac219d79c919aa642b2dfe8ee78414dabaf67ed0e72f87dc9f4f
Description-en: HAL library for MIPI camera through Intel IPU6
 This package contains the main runtime library on Intel Alder Lake platform
 (ipu6ep).
Description-md5: ce3df080144c889cb3057574616e16ac
Modaliases: oem(pci:v00008086d0000465Dsv00001028sd00000AF3bc*sc*i*, pci:v00008086d0000465Dsv00001028sd00000B11bc*sc*i*, pci:v00008086d0000465Dsv00001028sd00000B14bc*sc*i*, pci:v00008086d0000465Dsv00001028sd00000B29bc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C08bc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C0Abc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C0Bbc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C0Dbc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C0Ebc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C10bc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C11bc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C40bc*sc*i*, pci:v00008086d0000A75Dsv00001028sd00000C4Fbc*sc*i*)

@vpodzime
Copy link
Author

No, unfortunately, this

I have no idea what the problem is or even where to start looking/debugging.

still applies.

@patrakov
Copy link

The place to start debugging is to identify the hardware. Here is a useful command that prints out all ACPI IDs except some known generic (and therefore irrelevant) ones:

find /sys/devices -name modalias | xargs grep -h acpi | grep -Ev 'PNP|LNX' | sort -u

Please paste its output.

@kervel
Copy link

kervel commented Feb 21, 2023

this is the output here:

acpi:ACPI0003:
acpi:ACPI0007:
acpi:ACPI000C:
acpi:ACPI000E:
acpi:INT3472:
acpi:INTC1041:
acpi:INTC1046:
acpi:INTC1055:
acpi:INTC1070:
acpi:INTC1094:
acpi:INTC1095:
acpi:INTC1096:
acpi:INTC1097:
acpi:INTC1098:
acpi:OVTI01A0:
acpi:OVTI01AB:
acpi:STM0125:MSFT0101:

the output is identical on the working and non-working xps13 plus. I still have the nonworking one for two weeks before dell picks it up, i'm going to do some more tests to find exactly what is different between the two:

  • both systems run ubuntu 22.04 with kernel 5.19.0-32-generic

this is the dmesg output for the working system:

[    4.958108] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[    4.958253] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[    4.958443] intel-ipu6 intel-ipu: physical base address 0x603c000000
[    4.958445] intel-ipu6 intel-ipu: mapped as: 0x000000005e4a6637
[    4.958549] intel-ipu6 intel-ipu: Unable to set secure mode
[    4.958551] intel-ipu6 intel-ipu: IPU in non-secure mode
[    4.958552] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[    4.958553] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[    4.958591] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[    4.958592] intel-ipu6 intel-ipu: IPC reset done
[    4.958593] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[    4.959949] intel-ipu6 intel-ipu: FW version: 20220510
[    4.962623] intel-ipu6 intel-ipu: IPU6-v3 driver version 1.0
[    5.006069] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[    5.006260] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   15.558343] intel-ipu6-isys intel-ipu6-isys0: bind ov01a10 17-0036 nlanes is 1 port is 2
[   15.558528] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.

this is the dmesg output for the non-working system:

[   70.816402] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[   70.816759] intel-ipu6 intel-ipu: Device 0x465d (rev: 0x2)
[   70.816776] intel-ipu6 intel-ipu: physical base address 0x603c000000
[   70.816778] intel-ipu6 intel-ipu: mapped as: 0x00000000cb7fe56f
[   70.816820] intel-ipu6 intel-ipu: Unable to set secure mode
[   70.816822] intel-ipu6 intel-ipu: IPU in non-secure mode
[   70.816823] intel-ipu6 intel-ipu: IPU secure touch = 0x0
[   70.816823] intel-ipu6 intel-ipu: IPU camera mask = 0xff
[   70.816961] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[   70.816964] intel-ipu6 intel-ipu: IPC reset done
[   70.816966] intel-ipu6 intel-ipu: cpd file name: intel/ipu6ep_fw.bin
[   70.818655] intel-ipu6 intel-ipu: FW version: 20220510
[   70.822366] intel-ipu6 intel-ipu: IPU6-v3 driver version 1.0
[   70.863378] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   70.863485] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[ 1002.585603] intel-ipu6 intel-ipu: IPU in non-secure mode
[ 1002.585611] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode
[12336.171476] intel-ipu6 intel-ipu: IPU in non-secure mode
[12336.171483] intel-ipu6 intel-ipu: Skip ipc reset for non-secure mode

both have userspace 0git202302070245.a359c1eubuntu22.04.2 libcamhal-ipu6ep0
they both have the same kernel modules.
i verified the correct working of both cameras in windows to exclude hardware problems.

is there anything else i could do to dig deeper into why i get the failure on the new machine ?

@vpodzime
Copy link
Author

My output is here:

acpi:ACPI0003:
acpi:ACPI0007:
acpi:ACPI000C:
acpi:ACPI000E:
acpi:INT3472:
acpi:INTC1041:
acpi:INTC1046:
acpi:INTC1055:
acpi:INTC1070:
acpi:INTC1094:
acpi:INTC1095:
acpi:INTC1096:
acpi:INTC1097:
acpi:INTC1098:
acpi:OVTI01A0:
acpi:OVTI01AB:
acpi:STM0125:MSFT0101:

@alesrebec
Copy link

I get the same fail with DevName for cameraId after building through all the steps.

Device: Lenovo X1 Carbon gen 10
Ubuntu 22.04
Kernel 6.1.15

find /sys/devices -name modalias | xargs grep -h acpi | grep -Ev 'PNP|LNX' | sort -u
grep: /sys/devices/platform/Fixed: No such file or directory
grep: MDIO: No such file or directory
grep: bus.0/modalias: No such file or directory
acpi:ACPI0003:
acpi:ACPI0007:
acpi:ACPI000C:
acpi:ACPI000E:
acpi:INT3472:
acpi:INT3474:
acpi:INT347D:
acpi:INTC1041:
acpi:INTC1046:
acpi:INTC1055:
acpi:INTC1070:
acpi:INTC1094:
acpi:INTC1095:
acpi:INTC1096:
acpi:INTC1097:
acpi:INTC1098:
acpi:LATT2021:
acpi:LEN0100:
acpi:LEN0111:
acpi:LEN0113:
acpi:LEN0130:
acpi:LEN0268:
acpi:NXP1001:
acpi:OVTI9234:
acpi:STM0151:MSFT0101:
platform:thinkpad_acpi

What would be my sensor from this list?

@patrakov
Copy link

patrakov commented Mar 4, 2023

@alesrebec The IR sensor is OV9234 (unsupported), and the RGB sensor is OV2740.

@alesrebec
Copy link

Thanks for the answer @patrakov
I have the MIPI camera model so at least this tells me it's not one of those two.

@zarnovican
Copy link

I have the same ACPI output as @alesrebec. My hw is Lenovo ThinkPad X1 Gen 10, model 21CB007WCK.

While trying to get webcam working on Fedora 38 (kernel 6.2.14-300.fc38.x86_64), following SO comment https://askubuntu.com/a/1461869, I'm getting similar error(s) as the author of this issue:

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=/dev/video0
...
[05-05 12:36:24.301] CamHAL[INF] aiqb file name ov01a1s.aiqb
[05-05 12:36:24.301] CamHAL[ERR] Failed to find DevName for cameraId: 12, get video node: ov2740 , devname: /dev/v4l-subdev1
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[05-05 12:36:24.310] CamHAL[ERR] Get entity fail for calling getEntityById
[05-05 12:36:24.310] CamHAL[ERR] Get entity fail for calling getEntityById
[05-05 12:36:24.310] CamHAL[ERR] setup Link ov2740  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
[05-05 12:36:24.310] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[05-05 12:36:24.310] CamHAL[ERR] set up mediaCtl failed
[05-05 12:36:24.310] CamHAL[ERR] @configure Device Configure failed
[05-05 12:36:24.310] CamHAL[ERR] failed to config streams.
ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
...

@alesrebec The IR sensor is OV9234 (unsupported), and the RGB sensor is OV2740.

@patrakov does it mean that until IR sensor OV9234 is supported, we won't be able to get RGB working neither ?

@patrakov
Copy link

patrakov commented May 5, 2023

No, it doesn't mean this.

@zarnovican
Copy link

I have added more debugging into code to figure out what those errors mean.. Here are the findings, but unfortunatelly, no conclusion.

[05-05 12:36:24.301] CamHAL[ERR] Failed to find DevName for cameraId: 12, get video node: ov2740 , devname: /dev/v4l-subdev1

Code is trying to find a device with name ov2740 (notice the space at the end). It is scanning this directory:

$ grep . /sys/class/video4linux/v4l-subdev*/name
/sys/class/video4linux/v4l-subdev0/name:Intel IPU6 CSI-2 0
/sys/class/video4linux/v4l-subdev1/name:Intel IPU6 CSI-2 1
/sys/class/video4linux/v4l-subdev2/name:Intel IPU6 CSI-2 2
/sys/class/video4linux/v4l-subdev3/name:Intel IPU6 CSI-2 3
/sys/class/video4linux/v4l-subdev4/name:Intel IPU6 CSI-2 4
/sys/class/video4linux/v4l-subdev5/name:Intel IPU6 CSI-2 5
/sys/class/video4linux/v4l-subdev6/name:Intel IPU6 CSI-2 6
/sys/class/video4linux/v4l-subdev7/name:Intel IPU6 CSI-2 7
/sys/class/video4linux/v4l-subdev8/name:Intel IPU6 CSI2 BE SOC 0

Those names looks totally different to ov2740 😕

[05-05 12:36:24.310] CamHAL[ERR] Get entity fail for calling getEntityById
[05-05 12:36:24.310] CamHAL[ERR] Get entity fail for calling getEntityById

It looks to me that code is iterating over the list of formats from this XML: https://github.com/intel/ipu6-camera-hal/blob/main/config/linux/ipu6ep/sensors/ov2740-uf.xml#L20-L22. First two formats map to entity id -1. The third one maps to id 25. Later, the code tried to lookup back the Entity from id. It will produce those two errors.. The third format worked (no log message).

So, where is the -1 id originating from ? It seems to me that XML parser will take the name tag from format element and map it via some external table https://github.com/intel/ipu6-camera-hal/blob/main/src/platformdata/CameraParser.cpp#L1168. I haven't found where is it originating from.

Also, format names in the xml file don't match names in-memory:

  • "ov2740 $I2CBUS" (xml), "ov2740 " (mem), entity id -1
  • "Intel IPU6 CSI-2 $CSI_PORT" (xml) "Intel IPU6 CSI-2 " (mem), entity id -1
  • "Intel IPU6 CSI2 BE SOC 0" (xml) "Intel IPU6 CSI2 BE SOC 0" (mem), entity id 25

I find it suspicious that those two which mapped to -1, also have $foo in name, which was stripped 🤔 .

[05-05 12:36:24.310] CamHAL[ERR] setup Link ov2740 [-1:0] ==> Intel IPU6 CSI-2 [-1x0] enable 1 failed.
[05-05 12:36:24.310] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[05-05 12:36:24.310] CamHAL[ERR] set up mediaCtl failed

Later, the code will iterate over "links", which looks like coming from this XML: https://github.com/intel/ipu6-camera-hal/blob/main/config/linux/ipu6ep/sensors/ov2740-uf.xml#L24-L26. That code will fail here as well, because the links reference entities that were mapped to id -1.

@jersteth
Copy link

Hi @zarnovican I'm debugging the same issue as you with ov08x40 driver from a Lenovo X1 Carbon Gen 12 which has ov08x40 and SMO55F0 IR.
$ grep . /sys/class/video4linux/*/name /sys/class/video4linux/v4l-subdev0/name:Intel IPU6 CSI-2 0 /sys/class/video4linux/v4l-subdev10/name:Intel IPU6 CSI2 BE SOC 2 /sys/class/video4linux/v4l-subdev11/name:Intel IPU6 CSI2 BE SOC 3 /sys/class/video4linux/v4l-subdev12/name:Intel IPU6 CSI2 BE SOC 4 /sys/class/video4linux/v4l-subdev13/name:Intel IPU6 CSI2 BE SOC 5 /sys/class/video4linux/v4l-subdev14/name:Intel IPU6 CSI2 BE SOC 6 /sys/class/video4linux/v4l-subdev15/name:Intel IPU6 CSI2 BE SOC 7 /sys/class/video4linux/v4l-subdev1/name:Intel IPU6 CSI-2 1 /sys/class/video4linux/v4l-subdev2/name:Intel IPU6 CSI-2 2 /sys/class/video4linux/v4l-subdev3/name:Intel IPU6 CSI-2 3 /sys/class/video4linux/v4l-subdev4/name:Intel IPU6 CSI-2 4 /sys/class/video4linux/v4l-subdev5/name:Intel IPU6 CSI-2 5 /sys/class/video4linux/v4l-subdev6/name:Intel IPU6 CSI-2 6 /sys/class/video4linux/v4l-subdev7/name:Intel IPU6 CSI-2 7 /sys/class/video4linux/v4l-subdev8/name:Intel IPU6 CSI2 BE SOC 0 /sys/class/video4linux/v4l-subdev9/name:Intel IPU6 CSI2 BE SOC 1 /sys/class/video4linux/video0/name:Intel IPU6 BE SOC capture 0 /sys/class/video4linux/video1/name:Intel IPU6 BE SOC capture 1 /sys/class/video4linux/video2/name:Intel IPU6 BE SOC capture 2 /sys/class/video4linux/video3/name:Intel IPU6 BE SOC capture 3 /sys/class/video4linux/video4/name:Intel IPU6 BE SOC capture 4 /sys/class/video4linux/video5/name:Intel IPU6 BE SOC capture 5 /sys/class/video4linux/video6/name:Intel IPU6 BE SOC capture 6 /sys/class/video4linux/video7/name:Intel IPU6 BE SOC capture 7
Also here I see the driver is looking for a video4linux subdevice name 'ov08x40' which is clearly not in the list. I also get
CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov08x40, devname: /dev/v4l-subdev1
Did you get through this? Have you tried since your last post from a year ago? I am on the latest ipu6-drivers and binaries and icamera but no progress. Have modified the device names in ov08x40-uf.xml to better match the device names (CSI2 instead of CSI-2 for the BE SOC device), but that didn't help either

@zarnovican
Copy link

I'm afraind I won't be able to help, @jersteth. I gave up and Instead of following Intel's instructions step-by-step, I used a pre-packaged solution. See Hans de Goede blog series on https://hansdegoede.livejournal.com/. That worked for a while, but I could not get it working again on later Fedora. 😞

There is still some progress on getting IPU6 support to Linux (see FOSDEM 2024 video). I would also suggest to subscribe to intel/ipu6-drivers#22, where people occasionally post updates.

@Chickenmarkus
Copy link

Chickenmarkus commented Aug 22, 2024

I experience the same issue on my Dell XPS13 9315 after the following update of my Xubuntu 22.04 on 15.08.2024:

# /var/log/apt/history.log
Start-Date: 2024-08-15  10:42:46
Commandline: aptdaemon role='role-commit-packages' sender=':1.1314'
Install: linux-tools-common:amd64 (5.15.0-118.128, automatic), linux-hwe-6.8-headers-6.8.0-40:amd64 (6.8.0-40.40~22.04.3, automatic), linux-hwe-6.8-tools-6.8.0-40:amd64 (6.8.0-40.40~22.04.3, automatic), linux-modules-ipu6-6.8.0-40-generic:amd64 (6.8.0-40.40~22.04.3, automatic), linux-modules-6.8.0-40-generic:amd64 (6.8.0-40.40~22.04.3, automatic), hwdata:amd64 (0.357-1, automatic), linux-image-6.8.0-40-generic:amd64 (6.8.0-40.40~22.04.3, automatic), linux-headers-6.8.0-40-generic:amd64 (6.8.0-40.40~22.04.3, automatic), linux-tools-6.8.0-40-generic:amd64 (6.8.0-40.40~22.04.3, automatic), linux-modules-extra-6.8.0-40-generic:amd64 (6.8.0-40.40~22.04.3, automatic)
Upgrade: containerd.io:amd64 (1.7.19-1, 1.7.20-1), docker-ce-cli:amd64 (5:27.1.1-1~ubuntu.22.04~jammy, 5:27.1.2-1~ubuntu.22.04~jammy), google-chrome-stable:amd64 (127.0.6533.99-1, 127.0.6533.119-1), busybox-static:amd64 (1:1.30.1-7ubuntu3, 1:1.30.1-7ubuntu3.1), linux-image-generic-hwe-22.04:amd64 (6.5.0.45.45~22.04.1, 6.8.0-40.40~22.04.3), docker-buildx-plugin:amd64 (0.16.1-1~ubuntu.22.04~jammy, 0.16.2-1~ubuntu.22.04~jammy), docker-ce:amd64 (5:27.1.1-1~ubuntu.22.04~jammy, 5:27.1.2-1~ubuntu.22.04~jammy), ubuntu-desktop:amd64 (1.481.2, 1.481.3), linux-modules-ipu6-generic-hwe-22.04:amd64 (6.5.0.45.45~22.04.1, 6.8.0-40.40~22.04.3), docker-ce-rootless-extras:amd64 (5:27.1.1-1~ubuntu.22.04~jammy, 5:27.1.2-1~ubuntu.22.04~jammy), busybox-initramfs:amd64 (1:1.30.1-7ubuntu3, 1:1.30.1-7ubuntu3.1), linux-headers-generic-hwe-22.04:amd64 (6.5.0.45.45~22.04.1, 6.8.0-40.40~22.04.3), linux-generic-hwe-22.04:amd64 (6.5.0.45.45~22.04.1, 6.8.0-40.40~22.04.3), ubuntu-standard:amd64 (1.481.2, 1.481.3), ubuntu-desktop-minimal:amd64 (1.481.2, 1.481.3), ubuntu-minimal:amd64 (1.481.2, 1.481.3)
End-Date: 2024-08-15  10:44:05

Start-Date: 2024-08-15  10:44:42
Commandline: aptdaemon role='role-commit-packages' sender=':1.1314'
Remove: linux-modules-ipu6-6.5.0-44-generic:amd64 (6.5.0-44.44~22.04.1), linux-modules-6.5.0-44-generic:amd64 (6.5.0-44.44~22.04.1), linux-image-6.5.0-44-generic:amd64 (6.5.0-44.44~22.04.1), linux-headers-6.5.0-44-generic:amd64 (6.5.0-44.44~22.04.1), linux-modules-ivsc-6.5.0-44-generic:amd64 (6.5.0-44.44~22.04.1), linux-hwe-6.5-headers-6.5.0-44:amd64 (6.5.0-44.44~22.04.1), linux-modules-extra-6.5.0-44-generic:amd64 (6.5.0-44.44~22.04.1)
End-Date: 2024-08-15  10:44:51

This suggests two potential causes:

  1. The update of the kernel module linux-modules-ipu6 from 6.5.0 to 6.8.0.
  2. The update of the kernel itself from 6.5.0 to 6.8.0.

Both updates came from Ubuntu's official package source jammy-updates.

After a rollback of the update above (downgrade back to 6.5.0-45), my webcam is working again. Obviously, this is a temporary workaround only and not a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants