I am happy to report that the camera "failed to set mode" and "device
busy/brownout" issues are now fully resolved. The root cause was a
hardware race condition where rapid power cycling (e.g., refreshing a
browser permission prompt) would re-enable the regulators before the
sensor's capacitors had fully discharged or its internal state machine
had reset. This left the sensor in a latched-up/brownout state that
persisted until a reboot.
- Issue: Camera fails with "failed to set mode" and "device busy" errors
when accessing it rapidly (e.g., refreshing a browser page or restarting
qcam quickly). This leaves the sensor in a persistent brownout/latched-
up state that requires a full system reboot to recover. The root cause
is that the sensor regulators are re-enabled before the capacitors fully
discharge, preventing a clean Power-On Reset (POR).
- What fixed it: Two sets of changes were required:
- Driver (ov02c10.c): Implemented a mandatory 3-second cool-down period.
The driver now tracks the timestamp of the last power-off and forces a
sleep if a power-on request comes too soon. This guarantees physical
discharge regardless of userspace behavior. We also corrected the power-
off sequence to disable MCLK before regulators to prevent current back-
feeding (latch-up).
- DTS: Increased the off-on-delay-us to 50ms for the camera regulators
as an additional safety margin.
- Remaining issues: Userspace color tuning. The camera stream is stable
and reliable now, but the colors are incorrect (Warmer Tint). This is a
libcamera/IPA tuning file issue and is unrelated to the kernel stability
fixes.
Attached are the patches which I have used.
--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2138756
Title:
[ov02c10] Camera unusable on Lenovo Yoga Slim 7x - system hangs, I2C
timeouts, color artifacts
Status in linux package in Ubuntu:
New
Bug description:
Impact:
The OV02C10 camera sensor on Lenovo Yoga Slim 7x is completely unusable due to system hangs, I2C timeouts, and severe color corruption.
Affected Hardware:
- Device: Lenovo Yoga Slim 7x (Snapdragon X Elite / x1e80100)
- Camera sensor: OmniVision OV02C10 (RGB, 2MP)
- Platform: Qualcomm Camera Control Interface (CCI)
Ubuntu Version:
Ubuntu 25.10
Symptoms:
1. System Hangs/Crashes (Critical):
- System hangs or kernel oops during camera initialization or usage
- "master 1 queue 0 timeout" errors from CCI/I2C
- Hangs persist across camera app launches (Cheese, qcam, PipeWire)
2. Initialization Failures:
- Camera fails to probe or initialize
- Regulator supply errors in dmesg
3. Color Artifacts:
- Severe green/incorrect color tint in all images
- Cannot be corrected by white balance adjustments
- Raw Bayer pattern mismatch
Root Causes:
Issue 1 - System Hang (Critical):
Race condition in ov02c10_remove() where resources are freed before sensor power-off, causing use-after-free errors when Runtime PM or PipeWire/WirePlumber interact with the device. Additionally, internal sensor reset timings are too aggressive for reliable hardware initialization.
Issue 2 - Color Pattern:
Driver reports incorrect Bayer pattern (SBGGR10 or SGBRG10), but the physical sensor layout on this device is SGRBG10, causing color channel misalignment.
Issue 3 - DTS Configuration:
Missing regulator supplies for RGB sensor and camera privacy LED not configured.
Fix:
A patch series of 4 commits addresses all issues:
1. DTS: Fix regulator supplies for RGB sensor
- Adds missing vdda/vddd supplies
- Fixes camera initialization failures
2. DTS: Enable Camera Privacy LED
- Configures GPIO 110 for privacy indicator
3. Driver: Update Bayer pattern to SGRBG10
- Changes MEDIA_BUS_FMT_SBGGR10_1X10 → MEDIA_BUS_FMT_SGRBG10_1X10
- Fixes severe green color cast
4. Driver: Fix race condition and relax reset timings
- Reorders cleanup in ov02c10_remove(): disable Runtime PM *before* freeing resources
- Increases reset timing: 5ms assert, 20ms post-delay (was 1ms/2ms)
- Fixes system hangs and "master 1 queue 0 timeout" errors
Testing Results:
- Camera stable across repeated sessions (no hangs/crashes)
- Proper initialization on every boot
- Sharp images with correct orientation
- Color accuracy significantly improved (green tint eliminated)
- Userspace color tuning still needed for perfect white balance (libcamera YAML)
Configuration Requirements:
Kernel config:
CONFIG_VIDEO_OV02C10=m
Userspace packages:
libcamera-tools libcamera-ipa gstreamer1.0-libcamera
Pipeline: libcamera 'simple' pipeline with SoftISP (Software Image
Signal Processor)
Reference:
Camera stack setup for X1E: https://github.com/alexVinarskis/linux-x1e80100-zenbook-a14#camera-configuration
Complete Technical Details:
Full description, patches, and optional YAML tuning file available at:
https://bugs.launchpad.net/ubuntu-concept/+bug/2138706
Patches attached as lenovo-yoga-slim7x-camera-fixes.zip
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2138756/+subscriptions
Комментариев нет:
Отправить комментарий