intel / ipu6-drivers

GNU General Public License v2.0
168 stars 52 forks source link

Not working on Ubuntu 24.04 with kernel 6.8 #228

Open rmasad opened 4 months ago

rmasad commented 4 months ago

Previously, I managed to get the camera working with this guide on Ubuntu 23.04: https://dshedd.com/2023/07/18/fixing-lenovos-mipi-camera-problems-on-ubuntu-22-04/

Today, I updated to Ubuntu 24.04 (kernel 6.8.0-31-generic) and my camera stopped working. I repeated the steps and still have problems.

The9Cat commented 4 months ago

I tried using the dkms v4l2loopback and it tells me that it's the same version of the module as in 6.8.0-35. Which is the same as your dkms status. What do you find for sudo dmesg | grep -i ipu?

The9Cat commented 4 months ago

I purged and reinstalled the kernel. Then the camera started to work again. Yay! @heredia21: thanks for your suggestions and help!

It is still a bit flaky and needs occasional restarts of the v4l2-relayd as before. But that's progress. I'm not sure what was wrong before. Some cruft perhaps?

MarjanHJ commented 4 months ago

@hao-yao I followed this and it is still not working, though my kernel is 6.9 as my audio was not working with kernel 6.8, my laptop is xps 16 and Ubuntu 24.04, kernel 6.9, here is the out put of sudo dmesg | grep -i ipu , can you please advice on how I can fix this, thanks

[ 0.006567] ACPI: SSDT 0x000000006DFDE000 0000F9 (v02 INTEL IpuSsdt 00001000 INTL 20210930) [ 2.348319] intel_ipu6: loading out-of-tree module taints kernel. [ 2.348325] intel_ipu6: module verification failed: signature and/or required key missing - tainting kernel [ 2.368570] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002) [ 2.368974] intel-ipu6 0000:00:05.0: Device 0x7d19 (rev: 0x4) [ 2.368997] intel-ipu6 0000:00:05.0: physical base address 0x5229000000 [ 2.368999] intel-ipu6 0000:00:05.0: mapped as: 0x00000000d4b6d3b0 [ 2.369127] intel-ipu6 0000:00:05.0: IPU in secure mode [ 2.369129] intel-ipu6 0000:00:05.0: IPU secure touch = 0x80000000 [ 2.369131] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0 [ 2.381378] intel-ipu6 0000:00:05.0: IPC reset done [ 2.381685] intel-ipu6 0000:00:05.0: Direct firmware load for intel/ipu6epmtl_fw.bin failed with error -2 [ 2.386450] intel-ipu6 0000:00:05.0: FW version: 20230925 [ 2.388857] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE [ 2.424884] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE [ 2.471875] intel-ipu6 0000:00:05.0: CSE authenticate_run done [ 2.471949] intel-ipu6 0000:00:05.0: IPU6-v4 driver version 1.0 [ 2.920402] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8 [ 2.920567] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0 [ 2.994906] intel-ipu6-isys intel-ipu6-isys0: no subdev found in graph

The9Cat commented 4 months ago

@MarjanHJ Are you patching the kernel? My understanding is that you would need the to patch the 6.9 kernel source with the patches and build the drivers as described https://github.com/intel/ipu6-drivers. I suspect that the patches are not yet in mainline but you could check.

rawler commented 4 months ago

@hao-yao I purged all the existing "ipu6"-packages from my system and followed the instructions to install DKMS from git HEAD.

modinfo intel_ipu6_isys now says its loaded from /lib/modules/6.8.0-35-generic/updates/dkms/intel-ipu6-isys.ko.zst, which whose mtime is now 15 minutes old. (Should be the new DKMS version)

My problem seems similar to that of @yorik. Intermingled with ipu6-initialization are repeated rows from int3472-discrete:

[   31.743876] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
[   31.744342] intel-ipu6 0000:00:05.0: IPC reset done
[   31.746181] intel-ipu6 0000:00:05.0: FW version: 20230925
[   31.750813] int3472-discrete INT3472:06: cannot find GPIO chip INTC100B:00, deferring
[   31.751078] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
[   31.751097] intel-ipu6 0000:00:05.0: physical base address 0x644e000000
[   31.751098] intel-ipu6 0000:00:05.0: mapped as: 0x00000000bec249fb
[   31.751135] intel-ipu6 0000:00:05.0: IPU in secure mode
[   31.751135] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[   31.751136] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[   31.752979] intel-ipu6 0000:00:05.0: IPC reset done
[   31.754103] intel-ipu6 0000:00:05.0: FW version: 20230925
[   31.757521] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
[   31.760352] int3472-discrete INT3472:06: cannot find GPIO chip INTC100B:00, deferring
[   31.760958] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
[   31.760975] intel-ipu6 0000:00:05.0: physical base address 0x644e000000
[   31.760977] intel-ipu6 0000:00:05.0: mapped as: 0x00000000bec249fb
[   31.761020] intel-ipu6 0000:00:05.0: IPU in secure mode

Eventually, int3472-discrete seems to give up

[   32.092349] intel-ipu6 0000:00:05.0: mapped as: 0x00000000239780ce
[   32.092445] intel-ipu6 0000:00:05.0: IPU in secure mode
[   32.092447] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[   32.092448] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[   32.094276] intel-ipu6 0000:00:05.0: IPC reset done
[   32.097579] intel-ipu6 0000:00:05.0: FW version: 20230925
[   32.145271] int3472-discrete INT3472:06: GPIO type 0x02 unknown; the sensor may not work

The ipu6 modules finally finish with

[   44.914306] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
[   44.914382] intel-ipu6 0000:00:05.0: physical base address 0x644e000000
[   44.914387] intel-ipu6 0000:00:05.0: mapped as: 0x00000000b373d712
[   44.914615] intel-ipu6 0000:00:05.0: IPU in secure mode
[   44.914623] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[   44.914629] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[   44.932844] intel-ipu6 0000:00:05.0: IPC reset done
[   44.934479] intel-ipu6 0000:00:05.0: FW version: 20230925
[   44.935607] intel-ipu6 0000:00:05.0: Found supported sensor OVTI02C1:00
[   44.935636] intel-ipu6 0000:00:05.0: Connected 1 cameras
[   44.936470] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[   44.946197] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[   44.967930] ACPI Warning: \_SB.NPCF._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20230628/nsarguments-61)
[   44.968020] ACPI Warning: \_SB.PC00.PEG1.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20230628/nsarguments-61)
[   45.015143] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[   45.015160] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[   45.071644] intel-ipu6-isys intel-ipu6-isys0: bind Intel IVSC CSI nlanes is 2 port is 2
[   45.074478] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   45.074768] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   45.118364] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.

sudo v4l2-ctl --list-devices outputs a big list of devices

ipu6 (PCI:pci:pci0000:00):
    /dev/video0
    /dev/video1
    /dev/video2
    /dev/video3
    /dev/video4
    /dev/video5
    /dev/video6
    /dev/video7

ipu6 (pci:pci0000:00):
    /dev/media0

But sudo gst-launch-1.0 icamerasrc ! autovideosink fails the same way it does with the (non-dkms) module from 6.8.0-35-generic:

[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE eExposure time range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE gain range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE eExposure time range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE gain range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE eExposure time range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE gain range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE eExposure time range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE gain range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE eExposure time range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE gain range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE eExposure time range failed
[06-06 20:40:16.861] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-06 20:40:16.861] CamHAL[ERR] Parse AE gain range failed
Setting pipeline to PAUSED ...
[06-06 20:40:16.943] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-06 20:40:16.943] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-06 20:40:16.944] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-06 20:40:16.944] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-06 20:40:16.944] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-06 20:40:16.944] CamHAL[ERR] invalid media format, default value used.
[06-06 20:40:16.944] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-06 20:40:16.944] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-06 20:40:16.944] CamHAL[ERR] invalid media format, default value used.
[06-06 20:40:16.944] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-06 20:40:16.945] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-06 20:40:16.945] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-06 20:40:16.945] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-06 20:40:16.945] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-06 20:40:16.945] CamHAL[ERR] invalid media format, default value used.
[06-06 20:40:16.945] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-06 20:40:16.945] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-06 20:40:16.945] CamHAL[ERR] invalid media format, default value used.
[06-06 20:40:16.945] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev17 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[06-06 20:40:16.954] CamHAL[ERR] setup Link Intel IVSC CSI [225:0] ==> Intel IPU6 CSI-2 2 [7x0] enable 1 failed.
[06-06 20:40:16.954] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[06-06 20:40:16.954] CamHAL[ERR] set up mediaCtl failed
[06-06 20:40:16.954] CamHAL[ERR] @configure Device Configure failed
[06-06 20:40:16.954] 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.005514349
Setting pipeline to NULL ...
[06-06 20:40:17.15] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev17 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
[06-06 20:40:17.15] CamHAL[ERR] Couldn't get V4L2_CID_PRIVACY, status:-1
[06-06 20:40:17.15] CamHAL[INF] threadLoop: mCameraStreams[0] == 0x77d230003ae0
[06-06 20:40:17.15] CamHAL[INF] threadLoop: getPrivacyBuffer returned nullptr
Freeing pipeline ...

Anything obvious that is wrong here?

hao-yao commented 4 months ago

@MarjanHJ I didn't test the compatibility on kernel v6.9, but as @The9Cat commented you need at lease patch your v6.9 kernel following README.md.

[ 2.994906] intel-ipu6-isys intel-ipu6-isys0: no subdev found in graph

This means ipu-bridge.c didn't include the changes under patch/v6.8/*.patch.

hao-yao commented 4 months ago

@rawler For ipu6-drivers, when you see intel-ipu6-isys prints:

intel-ipu6-isys intel-ipu6-isys0: bind Intel IVSC CSI nlanes is 2 port is 2 intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.

It is loaded correctly, and no need to care other warnings of INT3472.

For this error:

CamHAL[ERR] Couldn't get V4L2_CID_PRIVACY, status:-1

Please try to hack the configuration at maybe /etc/camera/ipu6ep/sensors/ov02c10-uf.xml, by changing

<supportPrivacy value="1"/>

to

<supportPrivacy value="0"/>

This actually need a fix to ipu6-camera-hal to make it work with upstream IVSC driver + privacy mode support. I have fixed it internally, but release to Github and integration won't be so soon so please try this hack first.

juletx commented 4 months ago

I have followed the instructions here but camera is still not working. I have installed ipu6-drivers and v4l2loopback.

dkms status

ipu6-drivers/0.0.0, 6.8.0-35-generic, x86_64: installed
v4l2loopback/0.12.7, 6.8.0-35-generic, x86_64: installed (WARNING! Diff between built and installed module!)

sudo v4l2-ctl --list-devices

ipu6 (PCI:pci:pci0000:00):
    /dev/video1
    /dev/video2
    /dev/video3
    /dev/video4
    /dev/video5
    /dev/video6
    /dev/video7
    /dev/video8

ipu6 (pci:pci0000:00):
    /dev/media0

Intel MIPI Camera (platform:v4l2loopback-000):
    /dev/video0

sudo dmesg | grep -i ipu

[    0.005259] ACPI: SSDT 0x000000004D74D000 000150 (v02 INTEL  IpuSsdt  00001000 INTL 20200717)
[    0.708290] pci 0000:00:05.0: DMAR: Passthrough IOMMU for integrated Intel IPU
[    5.324918] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[    5.325226] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0)
[    5.325246] intel-ipu6 0000:00:05.0: physical base address 0x628e000000
[    5.325247] intel-ipu6 0000:00:05.0: mapped as: 0x000000004af357eb
[    5.325281] intel-ipu6 0000:00:05.0: IPU in secure mode
[    5.325282] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[    5.325283] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[    5.344380] intel-ipu6 0000:00:05.0: IPC reset done
[    5.347132] intel-ipu6 0000:00:05.0: Direct firmware load for intel/ipu6ep_fw.bin failed with error -2
[    5.350908] intel-ipu6 0000:00:05.0: FW version: 20230925
[    5.351762] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[    5.365237] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[    5.444427] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[    5.444466] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[    6.040263] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[    6.041833] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0

sudo gst-launch-1.0 icamerasrc ! autovideosink

[06-07 21:12:07.23] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.23] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.23] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.23] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.23] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.23] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.23] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.23] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.23] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.23] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.23] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.23] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.24] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.24] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.25] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.25] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE gain range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE eExposure time range failed
[06-07 21:12:07.26] CamHAL[ERR] Malformed ET range in exposure time range configuration
[06-07 21:12:07.26] CamHAL[ERR] Parse AE gain range failed
Setting pipeline to PAUSED ...
[06-07 21:12:07.718] CamHAL[INF] aiqb file name ov13b10.aiqb
[06-07 21:12:07.718] CamHAL[INF] aiqb file name ov13b10.aiqb
[06-07 21:12:07.719] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov13b10.aiqb
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov13b10.aiqb
[06-07 21:12:07.719] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov8856.aiqb
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov8856.aiqb
[06-07 21:12:07.719] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov8856.aiqb
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov8856.aiqb
[06-07 21:12:07.719] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov01a10.aiqb
[06-07 21:12:07.719] CamHAL[INF] aiqb file name ov01a10.aiqb
[06-07 21:12:07.720] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.720] CamHAL[INF] aiqb file name ov01a10.aiqb
[06-07 21:12:07.720] CamHAL[INF] aiqb file name ov01a10.aiqb
[06-07 21:12:07.720] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.720] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-07 21:12:07.720] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-07 21:12:07.721] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-07 21:12:07.721] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-07 21:12:07.721] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[06-07 21:12:07.721] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[06-07 21:12:07.721] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-07 21:12:07.721] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-07 21:12:07.722] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.722] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[06-07 21:12:07.722] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[06-07 21:12:07.722] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[06-07 21:12:07.722] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[06-07 21:12:07.722] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[06-07 21:12:07.722] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[06-07 21:12:07.722] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.722] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[06-07 21:12:07.723] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[06-07 21:12:07.723] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.723] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[06-07 21:12:07.723] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[06-07 21:12:07.723] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.723] CamHAL[INF] aiqb file name ov01a1s.aiqb
[06-07 21:12:07.723] CamHAL[INF] aiqb file name ov01a1s.aiqb
[06-07 21:12:07.723] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.723] CamHAL[INF] aiqb file name OV08A10_YHUT_ADL.aiqb
[06-07 21:12:07.723] CamHAL[INF] aiqb file name OV08A10_YHUT_ADL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.724] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[INF] aiqb file name IMX390_HDR_TGL.aiqb
[06-07 21:12:07.725] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.725] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.725] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.725] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.725] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.725] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.726] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.727] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.727] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.727] CamHAL[INF] aiqb file name AR0234_TGL_10bits.aiqb
[06-07 21:12:07.727] CamHAL[ERR] invalid media format, default value used.
[06-07 21:12:07.727] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.727] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.727] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.727] CamHAL[INF] (null), media format in tuning: 0, media format for aic 0.
[06-07 21:12:07.727] 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
[06-07 21:12:07.737] CamHAL[ERR] Get entity fail for calling getEntityById
[06-07 21:12:07.737] CamHAL[ERR] Get entity fail for calling getEntityById
[06-07 21:12:07.737] CamHAL[ERR] setup Link ov13b10  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
[06-07 21:12:07.737] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[06-07 21:12:07.737] CamHAL[ERR] set up mediaCtl failed
[06-07 21:12:07.737] CamHAL[ERR] @configure Device Configure failed
[06-07 21:12:07.737] 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.007706088
Setting pipeline to NULL ...
Freeing pipeline ...
rawler commented 4 months ago

CamHAL[ERR] Couldn't get V4L2_CID_PRIVACY, status:-1

Please try to hack the configuration at maybe /etc/camera/ipu6ep/sensors/ov02c10-uf.xml, by changing

to

<supportPrivacy value="0"/> Tried this. It got rid of this specific error, but it still no working camera. It seems something critical crashes even before reaching this stage;

[06-06 20:40:16.945] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-06 20:40:16.945] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[06-06 20:40:16.945] CamHAL[ERR] invalid media format, default value used.
[06-06 20:40:16.945] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev17 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[06-06 20:40:16.954] CamHAL[ERR] setup Link Intel IVSC CSI [225:0] ==> Intel IPU6 CSI-2 2 [7x0] enable 1 failed.
[06-06 20:40:16.954] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[06-06 20:40:16.954] CamHAL[ERR] set up mediaCtl failed
[06-06 20:40:16.954] CamHAL[ERR] @configure Device Configure failed
[06-06 20:40:16.954] 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.005514349
Setting pipeline to NULL ...
[06-06 20:40:17.15] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev17 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
[06-06 20:40:17.15] CamHAL[ERR] Couldn't get V4L2_CID_PRIVACY, status:-1

Like @juletx, I'm also seeing many different v4l2 devices detected, which I found kindof strange, though I don't know enough about the v4l2 model to understand if that's sign of a problem or not:

sudo v4l2-ctl --list-devices

ipu6 (PCI:pci:pci0000:00):
    /dev/video1
    /dev/video2
    /dev/video3
    /dev/video4
    /dev/video5
    /dev/video6
    /dev/video7
    /dev/video8

ipu6 (pci:pci0000:00):
    /dev/media0
The9Cat commented 3 months ago

@rawler I don't think those multiple devnodes are a problem; they are the v4l2 metadata interfaces. I have them as well, and the ipu6 camera works (most of the time) on my hardware. In addition to those, I have the v4l2-loopback device which you do not seem to have. Maybe check whether the v4l2loopback device is configured (e.g. check dmesg it should be reported as kernel: v4l2loopback driver version 0.12.7 loaded)? I believe that it's in the kernel modules by default for 6.8.0-35, although some earlier versions required v4l2loopback-dkms.

linuxcf commented 3 months ago

Running 6.8.0-35 on Lenovo Yoga Gen 8 (64GB RAM, Raptor Lake CPU). Initially, on stock 24.04LTS, I got only /dev/video0. I followed @hao-yao 's advice, unistalled Ubuntu's stock antiquated intel-ipu6-dkms and installed the current one from github. Now, I get the full gamut of devices, and /dev/video0 is listed as Virtual Camera (platform:v4l2loopback-000)' However, I can find no directory /etc/camera @hao-yao refers to, above. And the camera does the exact weird thing it was doing before: It outputs rectangles of different colors and sizes (color bars), and, on the bottom right, a small rectangle with "snow," like when the old analog TVs had no signal. Programs recognize the camera: vlc does not complain, skype outputs the same thing (but mirrored, as it should in a real situation), and the web site testing the camera recognizes it, outputs the same thing, but displays NaN for the frame rate. Prior to doing a clean install of 24.04LTS, I was running 22.04LTS, with kernel 6.5, and the camera was working, although I had to run v4l2-ctl -d 0 -D and then restart service v4l2-relayd a couple of times to get it to work right (I found out by accident that only restarting v4l2-relayd was not enough; I had to run v4l2-ctl -d 0 -D first for some unknown reason). Doing this in my 24.04LTS now does not get the camera working. sudo dmesg | grep v4l2 indeed shows kernel: v4l2loopback driver version 0.12.7 loaded, as @rawler mentions above. Crazy! To me it looks that the camera is outputting a test pattern stored in a file instead of an actual image. My dkms status is as follows:

acpi-call/1.2.2, 6.8.0-31-generic, x86_64: installed

acpi-call/1.2.2, 6.8.0-35-generic, x86_64: installed

ipu6-drivers/0.0.0, 6.8.0-35-generic, x86_64: installed

ivsc-driver/0~git202311021215.73a044d9-0ubuntu2, 6.8.0-31-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)

ivsc-driver/0~git202311021215.73a044d9-0ubuntu2, 6.8.0-35-generic, x86_64: installed

usbio-drivers/0~git202312141918.78ffb706-0ubuntu2, 6.8.0-31-generic, x86_64: installed

usbio-drivers/0~git202312141918.78ffb706-0ubuntu2, 6.8.0-35-generic, x86_64: installed

v4l2loopback/0.12.7, 6.8.0-35-generic, x86_64: installed (WARNING! Diff between built and installed module!)

Meanwhile, sudo gst-launch-1.0 icamerasrc ! autovideosink results in the one-liner WARNING: erroneous pipeline: no element "icamerasrc", which may explain why the directory /etc/camera does not exist on my system?

UPDATE: I did some more digging. 'libcamhal0' does not exist among the available options to install on my system. Also, on synaptic (apt GUI), if I pick SettingsRepostioriesAdditional Drivers, it lets me pick "Continue using a manually installed driver," but the "Apply Changes" button is not selectable, so I cannot activate my choice. (When my camera was working, with quirks, in kernel 6.5 in 22.04LTS, the top option was marked and selectable.) So, the choice there (obviously referring to the MIPI camera), remains stuck at "Do not use this device." Why?

rmasad commented 3 months ago

I had to reinstall Ubuntu on this machine and since I installed Ubuntu 24.04 directly, the 6.5.0-generic kernel is no longer available. I tried to follow this blog, but it didn't work: https://dshedd.com/2023/07/18/fixing-lenovos-mipi-camera-problems-on-ubuntu-22-04/

An element that caught my attention is that unlike the 6.5 kernel, with 6.8 it cannot be installed (the package is not there): linux-modules-ivsc-

Does anyone know how to install the 6.5.0-generic kernel on Ubuntu 24.04?

The9Cat commented 3 months ago

@rmasad I'm guessing that the problem with using 6.5.0 is incompatibility with the dkms packages in 24.04. In other words, that kernel needs different versions of the modules and drivers than in the 24.04 repo. If you want to make it work, I'd start with the same commits from the intel-ipu6 repo used by the Ubuntu packages from 22.04 in that list of steps from your previous post.

That said, this is strange. I also have a Carbon X1 Gen 11 (same sensor device as in your dmesg output earlier in the post). It mostly works for me. Is yours also a Gen 11? I wonder what's different here?

linuxcf commented 3 months ago

That said, this is strange. I also have a Carbon X1 Gen 11 (same sensor device as in your dmesg output earlier in the post). It mostly works for me. Is yours also a Gen 11? I wonder what's different here?

@The9Cat, the plot thickens. My X1 Yoga Gen 8 should be identical to your X1 Carbon gen 11, except for the touch screen, which I enjoy very much. What is your Carbon's CPU, if you don't mind? Mine is listed as "Intel 13th Gen Core i7-1370P," the most powerful CPU offered for this box at the time of order.

The9Cat commented 3 months ago

@linuxcf Yes, my X1C has the same CPU. A Lenovo person on the Lenovo users' site made the same comment about X1 Yoga Gen8: it's the same chassis.

I also have to systemctl restart v4l2-relayd.service before or after using the camera about 20% of the time. Not every time. I suspect that the driver still needs some timing work to support the diversity of different MIPI sensor devices. But it mostly works for me.

I'm not knowledgeable enough about the hardware and driver details to help fix this, alas. Curious situation. I do appreciate all of the work that the developers are doing and suspect that wrinkles will get ironed out.

The9Cat commented 3 months ago

Just to add: I have not seen the 'test pattern' or 'snow' failure mode. My failure mode, when it fails, is no video at all often with the camera in use indicator stuck on.

linuxcf commented 3 months ago

Just to add: I have not seen the 'test pattern' or 'snow' failure mode. My failure mode, when it fails, is no video at all often with the camera in use indicator stuck on.

@The9Cat, thank you for taking the time to discuss this problem here while this is not too much of a problem for you. We have the same CPU and, presumably, the same camera. Yet yours works, at least most of the time, while mine doesn't. I think some program must be installed in my system. In the interest of everybody monitoring this thread, I am attaching a snapshot of vlc "showing" video from my camera. The "snow" on the bottom right is dynamic: the black dots move around randomly. Skype shows the same, but like mirrored over a vertical mirror. I, too, hope the developers iron out the wrinkles because this laptop I am using is supposed to be Ubuntu certified. vlcsnap-20240609

The9Cat commented 3 months ago

Crazy. This is from icamerasrc or some other application? Have you tried the gUM test page or vlc? Is the behavior the same?

linuxcf commented 3 months ago

Crazy. This is from icamerasrc or some other application? Have you tried the gUM test page or vlc? Is the behavior the same?

The above picture is a snapshot from vlc. The gUM test page gives me the same video, declares a success(!!!!!!!!), but as for fps gives me this underneath the "live" video: FPS now: NaN , entire capture: NaN. That is why I think I am either missing a module (I see no libcamhal0 available for installation) or I have a wrong version of a module installed. If, on synaptic (apt GUI), I pick Settings → Repostiories → Additional Drivers, it lets me pick "Continue using a manually installed driver," but the "Apply Changes" button is not selectable, so I cannot activate my choice, as per the attached snapshot. (When my camera was working, with quirks, in kernel 6.5 in 22.04LTS, the top option was marked and selectable.) So, the choice there (obviously referring to the MIPI camera), remains stuck at "Do not use this device." image

The9Cat commented 3 months ago

Okay, this might be useful to you. When I first got the X1C11, I followed the instructions from the Ubuntu Lenovo wiki page. This didn't work. But I believe I installed the ppa:oem-solutions-group/intel-ipu6 and went through the steps. Currently I have a version of libcamhal0 originating from ipu6-camera-hal, version, 0~git202404150109.ed12d90~ubuntu24.04.1. I since deleted the ppa, but I'll bet that this is where I got the package. I can see it in the ppa here: `https://launchpad.net/~oem-solutions-group/+archive/ubuntu/intel-ipu6

Maybe try installing that?

linuxcf commented 3 months ago

@The9Cat, I installed libcamhal0 from the repository you suggested. That pulled in dozens and dozens of dependencies. Now, "Additional Drivers" is telling me the camera is using the open-source HAL at the top option (which did not exist before at the top option). /dev/video is listed now as Intel MIPI camera on the v4l2loopback platform. Almost there, it seems. Almost but not quite yet. vlc now shows the black screen when accessing /dev/video0 (no crazy color bars, nor "snow"). I no longer see /dev/video[1-8]. So, the installation of libcamhal0 did change things drastically.

I vaguely remember that on kernel 6.5 in 22.04LTS, I had to get to a file or somewhere (maybe a kernel module?) and declare the MIPI camera explicitly. I don't quite remember what I did then. I can't find what camera sensor this laptop has because sudo lshw and sudo lspci are so confusing. If I knew, maybe I could apply @hao-yao 's recipe, above, and turn privacy off in the corresponding .xml config file.

Again, thank you for your time.

The9Cat commented 3 months ago

Hm. I assume that you rebooted after this? If not, maybe try that? If so, maybe try restarting the relayd. You should be able to get the sensor from the kernel log or dmesg output. On the devices, I have:

$ v4l2-ctl --list-devices
ipu6 (PCI:pci:pci0000:00):
    /dev/video1
    /dev/video2
    /dev/video3
    /dev/video4
    /dev/video5
    /dev/video6
    /dev/video7
    /dev/video8

ipu6 (pci:pci0000:00):
    /dev/media0

Intel MIPI Camera (platform:v4l2loopback-000):
    /dev/video0

v4l2 uses a bunch of devices for metadata, so they should be there.

linuxcf commented 3 months ago

I am only getting `ipu6 (pci:pci0000:00): /dev/media0

Intel MIPI Camera (platform:v4l2loopback-000): /dev/video0`

I think that after I installed libcamhal0, I did see /dev/video[1-8], but after rebooting I don't... I am considering purging all ipu6* modules.

The9Cat commented 3 months ago

@linuxcf At one point, I had to purge the 6.8.0-35 kernel image and reinstall to get rid of cruft after including the latest driver source for the dkms build. So yes, I agree that purging and reinstalling the kernel and modules is worth trying.

pgouv commented 3 months ago

I have the 6.8.0-35 kernel and camera doesn't work. I tried some of the above workarounds without any luck. I hope it will get fixed. Laptop is Dell 7450 latitude

sivarcot commented 3 months ago

same issues faced on Dell Inc. XPS 9315/0GNN3X,

The9Cat commented 3 months ago

@pgouv @sivarcot I do think that this situation will improve. If it's any consolation: even though I've managed to get the camera to work somehow, it is not all that reliable. For example, it will stop sometimes during the middle of a Zoom session. I still carry an external UVC camera for real work.

AntiNSA commented 3 months ago

Also on my Dell precision 5680 I-9/32 ada RTX 4000/ Ubuntu lts

On Wed, Jun 12, 2024, 00:53 sivarcot @.***> wrote:

same issues faced on Dell Inc. XPS 9315/0GNN3X,

— Reply to this email directly, view it on GitHub https://github.com/intel/ipu6-drivers/issues/228#issuecomment-2162346590, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAETWKCFMED4GTM7RKCPSMLZG746VAVCNFSM6AAAAABH2YM5WSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRSGM2DMNJZGA . You are receiving this because you commented.Message ID: @.***>

MarjanHJ commented 3 months ago

For now I gave up on this, though my kernel is 6.9 and my laptop is DELL XPS, but saw this in Ubuntu release notes (https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890) which I hope this will be fixed soon : "The ipu6 driver shipped with the 24.04 GA kernel (6.8.0-31) has known issues which cause some Intel MIPI cameras to fail to initialize. The Kernel Team is working on providing the fixes as a future kernel SRU update. (LP# 2061747 112)"

The9Cat commented 3 months ago

@MarjanHJ The SRU update with the drivers from this intel-ipu6 repo is the same one we are testing here (6.8.0-35). It's getting there but not there yet...

MarjanHJ commented 3 months ago

I understand, it is disappointing for me since I needed to upgrade to kernel 6.9 so my audio would work and it seems that this will take a very long time to be fixed for kernel 6.9 as it seems it hasn't been even fixed for 6.8 as well.

hao-yao commented 3 months ago

[06-06 20:40:16.954] CamHAL[ERR] setup Link Intel IVSC CSI [225:0] ==> Intel IPU6 CSI-2 2 [7x0] enable 1 failed. [06-06 20:40:16.954] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1 [06-06 20:40:16.954] CamHAL[ERR] set up mediaCtl failed

@rawler This is because Canonical added this patch media: ivsc: csi: Swap SINK and SOURCE pads after our release. Although I did a fix internally but still no chance to publish it. I just created PR114 to ipu6-camera-hal, if you know how to build & install IPU6 userspace drivers please directly try my main branch or dfsg branch.

The9Cat commented 3 months ago

@hao-yao Do you any thoughts about this kernel problem:

2024-06-12T19:19:07.945037-07:00 raven kernel: intel-ipu6-isys intel-ipu6-isys0: PM: dpm_run_callback(): isys_suspend+0x0/0x30 [intel_ipu6_isys] returns -16
2024-06-12T19:19:07.945038-07:00 raven kernel: intel-ipu6-isys intel-ipu6-isys0: PM: failed to suspend: error -16
2024-06-12T19:19:07.945039-07:00 raven kernel: PM: Some devices failed to suspend, or early wake event detected

Once it starts, the system requires a reboot...(of course).

hao-yao commented 3 months ago

@The9Cat IPU6 don't support suspend when streaming as driver need OS to send suspend signal to applications, then applications to record the stream status and close it and restore it when resume (which is designed because kernel MIPI camera/ISP drivers can be too heavy to handle such case).

However you say the system requires a reboot. Did intel_ipu6_isys caused kernel panic? If so, I think we need a fix. Please share the full dmesg log.

The9Cat commented 3 months ago

@hao-yao The problem is not suspending while streaming, but suspending from the stopped state/off state. It is only a problem after the device driver has timed out during streaming session at some earlier time before trying to suspend. 70% of the time it works correctly. There is no kernel panic when this happens.

I suppose this might suggest that the driver itself is confused about the state of the device which may be consistent with the tendency of the driver to time out midstream during operation.

linuxcf commented 3 months ago

UPDATE: Tonight, Ubuntu issued updates, among them Linux firmware. After the update, the camera in my Yoga Gen8 now works in kernel 6.8.0-1006-oem, but not in kernel 6.8.35. Strangely enough, v4l2-ctl --list-devices lists only two devices:

ipu6 (pci:pci0000:00): /dev/media0

Intel MIPI Camera (platform:v4l2loopback-000): /dev/video0

However, vlc gives me the option to set up /dev/video[0-8]. Vlc and skype recognize the camera, which starts reliably even after suspend, and shows video from it. In both vlc and skype, I pick /dev/video0. I verified that the camera works with skype fully. Like in 22.04LTS, I had to restart v4l2-relayd once. I think I see some shading in the bottom right quadrant of the video, though. I am not 100% certain about this because so far I have tried the camera only in low-lighting conditions.

I harbor no illusions that I am not 100% certain about the state of my system after my numerous hacks. I will be carrying an external USB camera in my computer bag, just in case, because things may still break. For whatever it's worth, here is the output of dkms status; why does it not mention kernel 6.8.0-1006-oem, which I am running?

acpi-call/1.2.2, 6.8.0-31-generic, x86_64: installed
acpi-call/1.2.2, 6.8.0-35-generic, x86_64: installed
ipu6-drivers/0.0.0, 6.8.0-35-generic, x86_64: installed
ivsc-driver/0~git202311021215.73a044d9-0ubuntu2, 6.8.0-31-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
ivsc-driver/0~git202311021215.73a044d9-0ubuntu2, 6.8.0-35-generic, x86_64: installed
usbio-drivers/0~git202312141918.78ffb706-0ubuntu2, 6.8.0-31-generic, x86_64: installed
usbio-drivers/0~git202312141918.78ffb706-0ubuntu2, 6.8.0-35-generic, x86_64: installed
v4l2loopback/0.12.7, 6.8.0-35-generic, x86_64: installed (WARNING! Diff between built and installed module!)
pgouv commented 3 months ago

`ipu6 (PCI:pci:pci0000:00): /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/video4 /dev/video5 /dev/video6 /dev/video7

ipu6 (pci:pci0000:00): /dev/media0

`

I get these after the latest update, but apps like team do not recognize any camera Previously it was empty

olafurw commented 3 months ago

I tried

sudo apt install linux-modules-ipu6-6.8.0-1006-oem
sudo apt install linux-headers-6.8.0-1006-oem
sudo apt reinstall intel-ipu6-dkms

And then a reboot and now I get the same output as the comment above me but camera still doesn't work. The hwe packages in -proposed were already installed.

linuxcf commented 3 months ago

And then a reboot and now I get the same output as the comment above me but camera still doesn't work. The hwe packages in -proposed were already installed.

Maybe a couple of successive restarts of v4l2-relayd can fix this? Have you tried @hao-yao 's version of intel-ipu6-dkms from github?

The9Cat commented 3 months ago

@linuxcf Curious! I would have guessed that the kernel patches would be the same... Question: did you use the ipu6 module package or did you make the ipu-drivers using dkms from master?

BTW, I have found that the issue with suspending is intermittent. Seems to occur after the ipu6 video stream has experienced an bunch of time outs. This has happened after, say, 15 minutes of Zoom. Some timing issue in there somewhere, I suspect.

mnovozhylov commented 3 months ago

Have the same snow-camera effect like above (reproducible in Google Meet), using ipu6 for 6.8.0-1006-oem. (tried also w/ intel-ipu6-dkms from github). Zoom, Meet, and Ubuntu display the webcam as "Virtual Camera". I suspect that the internal microphone, located near the webcam) doesn't work for the same reason?

upd: and my sound had gone once I installed suggested updates. Though, I found out that "S/PDIF" became muted, and I managed to re-enable it using alsamixer

linuxcf commented 3 months ago

@The9Cat, I installed the ipu6 drivers using dkms from master. But, as I said, the camera started working only after I installed the linux firmware updates Ubuntu had just pushed for 24.04, and only on kernel 6.8.0-1006-oem. @mnovozhylov, if by "snow camera effect" you mean what seems to be test patterns I show above, [https://dshedd.com/2023/07/18/fixing-lenovos-mipi-camera-problems-on-ubuntu-22-04/](this url), although about 22.04, talks about a test-pattern file. I know this does not solve your problem, but there seems to be a file with a test pattern. Have you also made links from /lib/firmware/ipu/* to lib/firmware/intel/? I have done that, too, although, if I understand correctly, that may no longer be needed.

From this thread it is obvious that drivers which can get these cameras to work do exist, but our problem is we don't know which of the many to install where. If Ubuntu/Intel or whoever else could only get their act together and issue precise instructions referencing the correct drivers and installation... Intel has been dragging its feet on these MIPI cameras for over two years now.

The9Cat commented 3 months ago

@linuxcf After you use this for a while, please report back on your experience, if you would. I wondering if the oem series has some critical fix that the generic series does not. I would have thought: same drivers, same experience. But perhaps not...

linuxcf commented 3 months ago

@linuxcf After you use this for a while, please report back on your experience, if you would. I wondering if the oem series has some critical fix that the generic series does not. I would thought: same drivers, same experience. But perhaps not...

@The9Cat, yes, I sure will continue reporting my experiences. So far, I think that the reasons my camera is now working are:

  1. Making the soft links /lib/firmware/ipu/* to lib/firmware/intel/, per your recommendation, above;
  2. dkms-compiling the ipu6 drivers from github;
  3. Using the oem kernel;
  4. Updating linux firmware last night, after seeing Ubuntu's update notification for 24.04.

Are we sure all cameras discussed in this thread are the same? For example, Archwiki says that Yogas may also come in a version which Lenovo calls "no OS," with USB cameras which work out of the box. Is it possible that Lenovo and Dell (and whoever else) use slightly different cameras without telling the buyer? For whatever it's worth, here is the output of sudo lshw on my Yoga Gen8. I don't see there any reference to a camera, which I know it exists. hw.txt

And, for good measure, here is the output of apt list --installed '*ipu*', so we can all compare notes and make sure the people whose cameras are not working are not missing any modules:

iputils-ping/noble,now 3:20240117-1build1 amd64 [installed,automatic]
iputils-tracepath/noble,now 3:20240117-1build1 amd64 [installed,automatic]
libbroxton-ia-pal-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libbroxton-ia-pal-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libcamhal-ipu6ep-dev/noble,now 0~git202404150109.ed12d90~ubuntu24.04.1 amd64 [installed]
libcamhal-ipu6ep0/noble,now 0~git202404150109.ed12d90~ubuntu24.04.1 amd64 [installed]
libgcss-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libgcss-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiq-file-debug-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiq-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiq-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiqb-parser-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiqb-parser-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-bcomp-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-bcomp-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cca-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cca-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ccat-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ccat-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cmc-parser-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cmc-parser-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-coordinate-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-coordinate-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-dvs-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-dvs-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-emd-decoder-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-emd-decoder-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-exc-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-exc-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-isp-bxt-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-isp-bxt-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-lard-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-lard-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-log-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-log-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ltm-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ltm-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-mkn-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-mkn-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-nvm-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-nvm-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libipu6ep/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed]
linux-modules-ipu6-6.8.0-1006-oem/noble-updates,noble-security,now 6.8.0-1006.6 amd64 [installed]
linux-modules-ipu6-6.8.0-35-generic/noble-updates,noble-security,now 6.8.0-35.35 amd64 [installed,automatic]
linux-modules-ipu6-generic-hwe-24.04-edge/noble-updates,noble-security,now 6.8.0-35.35 amd64 [installed]
linux-modules-ipu6-generic-hwe-24.04/noble-updates,noble-security,now 6.8.0-35.35 amd64 [installed]
linux-modules-ipu6-generic/noble-updates,noble-security,now 6.8.0-35.35 amd64 [installed]
linux-modules-ipu6-oem-24.04/noble-updates,noble-security,now 6.8.0-1006.6+1 amd64 [installed]
The9Cat commented 3 months ago

@linuxcf I think we want to look for the MIPI device on the PCI bus. For example:

$ lspci -nnk -d ::0480
00:05.0 Multimedia controller [0480]: Intel Corporation Device [8086:a75d]`
    Subsystem: Lenovo Device [17aa:2315]
    Kernel driver in use: intel-ipu6
    Kernel modules: intel_ipu6, intel_ipu6_psys, intel_ipu6_isys

I also allowed apt to update the firmware and rebooted; no difference. I do notice you have a different libcamhal0 package set. Are you pulling from the OEM Solutions Group PPA actively?

mnovozhylov commented 3 months ago

@linuxcf , yes, created the links:

/lib/firmware/intel/ipu6_fw.bin.zst ⇒ /lib/firmware/intel/ipu/ipu6_fw.bin.zst
/lib/firmware/intel/ipu6ep_fw.bin.zst ⇒ /lib/firmware/intel/ipu/ipu6ep_fw.bin.zst
/lib/firmware/intel/ipu6epadln_fw.bin.zst ⇒ /lib/firmware/intel/ipu/ipu6epadln_fw.bin.zst
/lib/firmware/intel/ipu6epmtl_fw.bin.zst ⇒ /lib/firmware/intel/ipu/ipu6epmtl_fw.bin.zst
/lib/firmware/intel/ipu6se_fw.bin.zst ⇒ /lib/firmware/intel/ipu/ipu6se_fw.bin.zst
/lib/firmware/intel/shisp_2400b0_v21.bin.zst ⇒ /lib/firmware/intel/ipu/shisp_2400b0_v21.bin.zst
/lib/firmware/intel/shisp_2401a0_v21.bin.zst ⇒ /lib/firmware/intel/ipu/shisp_2401a0_v21.bin.zst

Here is my output for lspci -nnk -d ::0480

00:05.0 Multimedia controller [0480]: Intel Corporation Device [8086:7d19] (rev 04)
    Subsystem: Huawei Technologies Co., Ltd. Device [19e5:3e70]
    Kernel modules: intel_ipu6, intel_ipu6_psys, intel_ipu6_isys
juletx commented 3 months ago

@linuxcf I've followed your instructions and still not working on Dell Precision 5480.

In Additional Drivers I have "Using HAL library for MIPI camera though Intel IPU6 from libcamhal0 (open source)" selected.

uname -r

6.8.0-1006-oem

apt list linux-firmware

linux-firmware/noble-updates,now 20240318.git3b128b60-0ubuntu2.1 amd64 [installed,automatic]

v4l2-ctl --list-devices

ipu6 (pci:pci0000:00):
    /dev/media0

Intel MIPI Camera (platform:v4l2loopback-000):
    /dev/video0`

dkms status

ipu6-drivers/0.0.0, 6.8.0-1006-oem, x86_64: installed
ipu6-drivers/0.0.0, 6.8.0-35-generic, x86_64: installed
ivsc-driver/0~git202311021215.73a044d9-0ubuntu2, 6.8.0-1006-oem, x86_64: installed
ivsc-driver/0~git202311021215.73a044d9-0ubuntu2, 6.8.0-35-generic, x86_64: installed
nvidia/535.171.04, 6.8.0-1006-oem, x86_64: installed
usbio-drivers/0~git202312141918.78ffb706-0ubuntu2, 6.8.0-1006-oem, x86_64: installed
usbio-drivers/0~git202312141918.78ffb706-0ubuntu2, 6.8.0-35-generic, x86_64: installed
v4l2loopback/0.12.7, 6.8.0-1006-oem, x86_64: installed (WARNING! Diff between built and installed module!)
v4l2loopback/0.12.7, 6.8.0-35-generic, x86_64: installed (WARNING! Diff between built and installed module!)

apt list --installed '*ipu*'

iputils-ping/noble,now 3:20240117-1build1 amd64 [installed,automatic]
iputils-tracepath/noble,now 3:20240117-1build1 amd64 [installed,automatic]
libbroxton-ia-pal-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libbroxton-ia-pal-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libcamhal-ipu6ep-dev/noble,now 0~git202404150109.ed12d90~ubuntu24.04.1 amd64 [installed]
libcamhal-ipu6ep0/noble,now 0~git202404150109.ed12d90~ubuntu24.04.1 amd64 [installed]
libgcss-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libgcss-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiq-file-debug-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiq-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiq-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiqb-parser-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-aiqb-parser-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-bcomp-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-bcomp-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cca-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cca-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ccat-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ccat-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cmc-parser-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-cmc-parser-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-coordinate-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-coordinate-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-dvs-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-dvs-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-emd-decoder-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-emd-decoder-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-exc-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-exc-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-isp-bxt-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-isp-bxt-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-lard-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-lard-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-log-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-log-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ltm-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-ltm-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-mkn-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-mkn-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-nvm-ipu6ep0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libia-nvm-ipu6epmtl0/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed,automatic]
libipu6ep/noble,now 0~git202310270317.0dad591-1~ubuntu24.04.1 amd64 [installed]
linux-modules-ipu6-6.8.0-1006-oem/noble-updates,noble-security,now 6.8.0-1006.6 amd64 [installed]
linux-modules-ipu6-6.8.0-35-generic/noble-updates,noble-security,now 6.8.0-35.35 amd64 [installed,automatic]
linux-modules-ipu6-oem-24.04/noble-updates,noble-security,now 6.8.0-1006.6+1 amd64 [installed]

lspci -nnk -d ::0480

0000:00:05.0 Multimedia controller [0480]: Intel Corporation Device [8086:a75d]
    Subsystem: Dell Device [1028:0c40]
    Kernel driver in use: intel-ipu6
    Kernel modules: intel_ipu6, intel_ipu6_psys, intel_ipu6_isys

In the gum test page I get this and black screen

FPS now: NaN , entire capture: NaN
Success!

I've tried using cheese and vlc and none work.

vlc

Driver does not support the 0xa7a0 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
Driver does not support the 0xa7a0 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
VLC media player 3.0.20 Vetinari (revision 3.0.20-1-g2617de71b6)
[00005944692a7b10] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Qt: Session management error: Could not open network socket
Driver does not support the 0xa7a0 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
Driver does not support the 0xa7a0 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
[0000594469349e20] main playlist: playlist is empty

cheese

Gtk-Message: 13:35:10.637: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(cheese:12260): Gtk-WARNING **: 13:35:10.715: GTK+ module /snap/cheese/40/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 13:35:10.715: Failed to load module "canberra-gtk-module"

(cheese:12260): Gtk-WARNING **: 13:35:10.716: GTK+ module /snap/cheese/40/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 13:35:10.716: Failed to load module "canberra-gtk-module"

(cheese:12260): cheese-WARNING **: 13:35:10.977: Can't find vp8enc preset: "Profile Realtime", using alternate preset: "Cheese Realtime". If you see this, make a bug report!

(cheese:12260): GStreamer-WARNING **: 13:35:10.977: gst_value_deserialize_g_value_array: unimplemented

(cheese:12260): GStreamer-WARNING **: 13:35:10.977: gst_value_deserialize_g_value_array: unimplemented

(cheese:12260): GStreamer-WARNING **: 13:35:10.977: gst_value_deserialize_g_value_array: unimplemented

(cheese:12260): GStreamer-WARNING **: 13:35:10.982: gst_value_deserialize_g_value_array: unimplemented

(cheese:12260): GStreamer-WARNING **: 13:35:10.982: gst_value_deserialize_g_value_array: unimplemented

(cheese:12260): GStreamer-WARNING **: 13:35:10.982: gst_value_deserialize_g_value_array: unimplemented
The9Cat commented 3 months ago

I tried to duplicate the state reported @linuxcf ... I was able to do that, but for me, it worked no better or differently than 6.8.0-35-generic. Same timeouts, intermittancy and occasional problems that inhibit suspend.

I also noticed something else when I installed the packages from the OEM solutions group: the ipu6 drivers would not load until I turned off SecureBoot in UEFI. Curious. Must be a signing problem somewhere. This might help some of the people that have not been able to drivers to load at all?

The9Cat commented 3 months ago

@juletx You might want to check the kernel messages (e.g. sudo dmesg | grep -i ipu) to look for problems with the driver detecting the device and configuring the relay.

linuxcf commented 3 months ago

...

I also noticed something else when I installed the packages from the OEM solutions group: the ipu6 drivers would not load until I turned off SecureBoot in UEFI. Curious. Must be a signing problem somewhere. This might help some of the people that have not been able to drivers to load at all?

@The9Cat, very strange! I have SecureBoot active. efibootmgr outputs the following:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,001D,001E,001F,0020,0021,0022,0023,0024,0025,0002
Boot0000* Ubuntu    HD(1,GPT,961e1166-b58f-41d2-a3c2-6d73dbce96e0,0x800,0x219800)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager  HD(1,GPT,0adb05c4-4a7c-4316-bc1d-fdf90267589a,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0002* Linux-Firmware-Updater    HD(1,GPT,a85f827e-70f4-4dde-88fc-88279b9d7caa,0x800,0x106000)/File(\EFI\ubuntu\fwupdx64.efi)
Boot0010  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen  FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics    FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Asset Information FvFile(da465b87-a26f-4c12-b78a-0361428fa026)
Boot0015  Regulatory Information    FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
Boot0016  ThinkShield secure wipe   FvFile(3593a0d5-bd52-43a0-808e-cbff5ece2477)
Boot0017  ThinkShield Passwordless Power-On Device Manager  FvFile(08448b41-7f83-49be-82a7-0e84790ab133)
Boot0018  Wi-Fi Configuration   FvFile(d3aaff0f-cb22-4792-896c-802c2e9383ba)2d004100700070000000
Boot0019  Reinstall Windows from Cloud  FvFile(3edbaac4-5017-4870-8cc4-721f9ef1974f)2d004100700070000000
Boot001A  Intel(R) MEBx FvFile(29a70110-7762-4211-ae88-fab19b7665be)
Boot001B  Startup Interrupt Menu    FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot001C  Rescue and Recovery   FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot001D* USB CD    VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot001E* USB FDD   VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001F* NVMe0 VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot0020* USB HDD   VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot0021* PXE BOOT  VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot0022* LENOVO CLOUD  VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri(https://download.lenovo.com/pccbbs/cdeploy/efi/boot.efi)
Boot0023* ON-PREMISE    VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri()
Boot0024  Other CD  VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35400)
Boot0025  Other HDD VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ca88c2349e7ae947beeb43038a5aeae700)
Boot0026* IDER BOOT CDROM   PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
Boot0027* IDER BOOT Floppy  PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
Boot0028* ATA HDD   VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0029* ATAPI CD  VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot002A  Lenovo Memory Self Repair FvFile(4ddd67e7-bdf5-4473-8ab0-02821c084338)