Embedded camera using camera sensors ov02e10 and ov08a10 doesn't work: missing kernel driver

Bug #2072643 reported by Adam Malinowski
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
New
Undecided
Unassigned
ipu6-drivers (Ubuntu)
Status tracked in Oracular
Noble
Fix Committed
High
You-Sheng Yang
Oracular
Fix Released
High
You-Sheng Yang
linux-signed-oem-6.5 (Ubuntu)
Status tracked in Oracular
Noble
New
Undecided
Unassigned
Oracular
New
Undecided
You-Sheng Yang

Bug Description

[SRU Justfication]

[Impact]

Device camera won't work.

[Fix]

The current version in -proposed pocket may skip installation of built kernel module ov02e10 and ov08a10. The fix is to use fixed index numbers in dkms.conf.

[Test Case]

Install the dkms and check if ov02e10.ko and ov08a10.ko have been installed to /lib/modules/<uname -r>/updates/dkms.

[Where problems could occur]

Minimal, as this is restoring driver modules that were previously installed prior to the regression.

[Other Info]

While this happens to ipu6-drivers/{oracualr,noble} only, proposed fixes are therefore nominated accordingly.

========== original bug report =========

Description: Ubuntu 22.04.4 LTS
Release: 22.04
linux-oem-22.04d 6.5.0.1026.28

com.canonical.certification::camera/camera-quality_video0 test fails:

[ WARN:0] global ./modules/videoio/src/cap_gstreamer.cpp (1100) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
/bin/sh: 1: kill: Illegal number: -
Traceback (most recent call last):
  File "/tmp/nest-oh_l6kjy.e6eacba27b81ed7929f808c3af9ceaf803facf6256ab97b917f65943c394f09d/camera_quality_test.py", line 178, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/lib/python3/dist-packages/checkbox_support/helpers/timeout.py", line 93, in _f
    return run_with_timeout(f, timeout_s, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/checkbox_support/helpers/timeout.py", line 78, in run_with_timeout
    raise TimeoutError("Task unable to finish in {}s".format(timeout_s))
TimeoutError: Task unable to finish in 120s

It passed on 6.5.1024.25 on the same device.

It fails on all Dell Oasis MTL machines
202312-33186 (usbio, ov02e10)
202312-33187 (usbio, ov02e10)
202312-33214 (usbio, hi556, checkbox test pass)
202312-33215 (usbio, hi556, checkbox test pass)
202312-32371 (usbio, hi556, checkbox test pass)
202312-32372 (usbio, ov02e10)

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-image-6.5.0-1026-oem 6.5.0-1026.27
ProcVersionSignature: Ubuntu 6.5.0-1026.27-oem 6.5.13
Uname: Linux 6.5.0-1026-oem x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
Date: Wed Jul 10 06:38:38 2024
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for the OEM CDs
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-jammy-amd64-20220504-33+jellyfish-oddish13+X120
InstallationDate: Installed on 2024-02-27 (134 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - somerville-jammy-amd64-20220504-33
SourcePackage: linux-signed-oem-6.5
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Adam Malinowski (amalinowski75) wrote :
tags: added: cert-sru regression-proposed
Revision history for this message
Adam Malinowski (amalinowski75) wrote :

Also a photo of camera app. Not only tests fail but it doesn't work in real life.

Revision history for this message
Adam Malinowski (amalinowski75) wrote :

Dmesg output attached.

Changed in linux-signed-oem-6.5 (Ubuntu):
assignee: nobody → You-Sheng Yang (vicamo)
Revision history for this message
You-Sheng Yang (vicamo) wrote : Re: [Bug 2072643] Re: Embedded camera won't work.

Still investigating, and the problem falls in ipu6-drivers, not
usbio-drivers because:
* oem-6.5-1026 + ipu6 0624 release: fail
* oem-6.5-1026 + ipu6 0329 release: good
* oem-6.5-1026 + ipu6 20231124 release (this matches oem-6.5-1011): good

intel-ipu6-isys is failing to bind camera sensors, and the following
two lines disappear from affected platforms:
> kernel: intel-ipu6-isys intel-ipu6-isys0: bind ov02e10 16-0010 nlanes is 2 port is 1
> kernel: intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.

No error from usbio is found in the meantime.

While the upstream ipu6-drivers repository is always released with a
huge code dump, there is no easy way to perform bisect. Stay tuned.

Revision history for this message
You-Sheng Yang (vicamo) wrote : Re: Embedded camera won't work.

https://launchpadlibrarian.net/737890207/buildlog_ubuntu-jammy-amd64.linux-oem-6.5_6.5.0-9026.27+exp.49_BUILDING.txt.gz
For some reason I don't know yet, the dkms build script did not install all the built modules into the target directory:

8< === 8< === 8< === 8< === 8< === 8< === 8< === 8< === 8< === 8<
LD [M] <<DKMSDIR>>/build/ipu6-drivers/0~git202406240945.aecec2aa-0ubuntu1~24.04.1/build/drivers/media/i2c/ov02e10.ko
...
II: dkms-build installing ipu6 into /<<PKGBUILDDIR>>/debian/linux-modules-ipu6-6.5.0-9026-oem/lib/modules/6.5.0-9026-oem/ubuntu/ipu6
signing ov08x40.ko
signing ov8856.ko
signing ov2740.ko
signing ov01a1s.ko
signing gc5035.ko
signing ov13858.ko
signing intel-ipu6.ko
signing hm11b1.ko
signing hm2170.ko
signing ov01a10.ko
signing hi556.ko
signing intel-ipu6-isys.ko
signing ov02c10.ko
signing intel-ipu6-psys.ko
signing hm2172.ko
II: dkms-build build ipu6 complete
8< === 8< === 8< === 8< === 8< === 8< === 8< === 8< === 8< === 8<

Revision history for this message
You-Sheng Yang (vicamo) wrote (last edit ):

So it appears that the way `dkms` evaluate dkms.conf has changed, such that `$((++i))` can cause problems and skips installation of built kernel modules. While the build itself is done by `make modules`, all the Makefile listed entries will be built, but dkms may not install all of them as expected.

`$((++i))` is used to assign numbers to each built module in dkms.conf automatically and work-around assigning numbers to optional built modules. `dkms` expects no empty seat in the BUILT_MODULE_NAME array.

You-Sheng Yang (vicamo)
summary: - Embedded camera won't work.
+ Embedded camera using camera sensors ov02e10 and ov08a10 doesn't work:
+ missing kernel driver
You-Sheng Yang (vicamo)
description: updated
Revision history for this message
You-Sheng Yang (vicamo) wrote : Re: [Bug 2072643] Re: Embedded camera using camera sensors ov02e10 and ov08a10 doesn't work: missing kernel driver

Prebuilt binaries also uploaded to
https://launchpad.net/~vicamo/+archive/ubuntu/sru. Need sponsor.

Changed in ipu6-drivers (Ubuntu Noble):
status: New → In Progress
importance: Undecided → High
assignee: nobody → You-Sheng Yang (vicamo)
Changed in ipu6-drivers (Ubuntu Oracular):
status: New → In Progress
importance: Undecided → High
assignee: nobody → You-Sheng Yang (vicamo)
You-Sheng Yang (vicamo)
description: updated
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Also working on a fix for bug 2073453. Will re-do the debdiff.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

Uploaded to https://launchpad.net/~vicamo/+archive/ubuntu/sru as well.
Additional suffix to the debian version added to satisfy PPA
versioning policy.

This resolves this issue as well as bug 2073453.

description: updated
Paolo Pisati (p-pisati)
Changed in ipu6-drivers (Ubuntu Oracular):
status: In Progress → Fix Committed
tags: added: regression-release
Paolo Pisati (p-pisati)
Changed in ipu6-drivers (Ubuntu Noble):
status: In Progress → Fix Committed
tags: removed: regression-release
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ipu6-drivers - 0~git202406240945.aecec2aa-0ubuntu2

---------------
ipu6-drivers (0~git202406240945.aecec2aa-0ubuntu2) oracular; urgency=medium

  [ You-Sheng Yang ]
  * Embedded camera using camera sensors ov02e10 and ov08a10 doesn't work:
    missing kernel driver (LP: #2072643)
    - debian: fix index numbers in dkms.conf
  * Failed to enable camera on Dell XPS 9320: ov01a10 i2c-OVTI01A0:00: failed
    to check hwcfg: -22 (LP: #2073453)
    - debian: skip hwcfg checks for Dell XPS 9320 with ov01a10 camera sensor

 -- You-Sheng Yang <email address hidden> Thu, 18 Jul 2024 12:02:47 +0800

Changed in ipu6-drivers (Ubuntu Oracular):
status: Fix Committed → Fix Released
Steve Langasek (vorlon)
description: updated
tags: added: regression-update
removed: regression-proposed
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Adam, or anyone else affected,

Accepted ipu6-drivers into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ipu6-drivers/0~git202406240945.aecec2aa-0ubuntu2~24.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-noble
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.