System designTroubleshooting

MIPI camera probe failed error -121: read the dmesg trail

A MIPI camera probe failed with error -121: no I2C acknowledgement at the sensor address. Read dmesg, then fix power, clock, wiring or the device tree.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01What error -121 actually means
  2. 02Read the dmesg trail first
  3. 03The causes, in order of probability
  4. 04Prove the bus with a runtime scan
  5. 05What the device tree must get right
  6. 06Error -121 versus its neighbours
  7. 07Bring-up order that prevents the next -121
  8. 08When the probe passes
  9. 09Questions

An embedded board boots, your capture stack reports No cameras available, and dmesg ends the camera's story with probe of ... failed with error -121. That one number settles the diagnosis: the kernel's I2C subsystem got no acknowledgement at the sensor's address, so the module was electrically silent at boot. Reinstalling the camera stack will not move it. This guide is for anyone bringing up a MIPI CSI-2 board camera on an embedded Linux board. You will read the probe trail line by line, test the physical causes in order of likelihood, and recognize the one branch where the fault really is in the device tree.

What error -121 actually means

On the ARM64 and x86 kernels that embedded vision boards run, errno 121 is EREMOTEIO, the remote I/O error. Within the I2C subsystem it has one meaning: the target did not acknowledge. The controller clocked out the address, waited for the sensor to pull SDA low for the ninth bit, and nothing came. Some adapters also report it when a data byte goes unacknowledged, but the common case is the address NACK: nobody answered at that address.

A timeout is a different error. On the same kernels it is -110, ETIMEDOUT, and it usually means a bus line is held low while the adapter waits out its budget. Keep the two apart, because the tests differ: -121 sends you to power, clock, wiring and address; -110 sends you to a wedged line.

Because the probe failed, the driver never bound. No subdev registers, no /dev/video* node, so the capture stack reports No cameras available or its equivalent. A MIPI module, unlike a USB camera, does not enumerate when you plug it in: the nodes appear only when a driver probes successfully at boot. That is why reinstalling userspace changes nothing - the failure happened on the bus, about a second and a half into the boot, before any application ran.

Read the dmesg trail first

Boot once and grep the log for the sensor's name - the sensor part number is the usual driver name:

sudo dmesg | grep -i ov5693

A failing boot prints a trail in this shape; the sensor name, bus and address vary with your module:

[    1.500781] ov5693 2-0036: probing v4l2 sensor.
[    1.509215] ov5693 2-0036: sensor driver bound (version 2.0.6)
[    1.534412] ov5693 2-0036: could not read otp bank
[    1.534421] ov5693 2-0036: Error -121 reading otp data
[    1.538667] ov5693 2-0036: board setup failed
[    1.540438] ov5693: probe of 2-0036 failed with error -121

Read it line by line. The first line proves the device tree matched: a driver prints it only once it has claimed a node. The second is the driver's own banner; keep it, because it names the driver version your logs refer to. The third and fourth are the first register reads over I2C - module ID and OTP data, which sensor drivers read to identify what they are driving - and they failed with exactly the -121 NACK. The fifth is the driver abandoning board setup, and the last is the kernel recording the failed probe in its standard form.

That last line also names the client: 2-0036 means I2C bus 2, address 0x36 (54 decimal, 7-bit). You will need both numbers in the next sections.

Now the arithmetic that rules out a hang: 1.540438 - 1.500781 = 0.039657, so the whole failed probe took about 40 ms. That is an instant NACK, not a stuck bus; a genuine timeout lands only after the adapter has burned its whole timeout budget, commonly around a second per transfer. The trail has already decided the first fork for you: the banner printed, so the device tree is present and formatted correctly; the bus answered with silence, so the fault is electrical or structural. Work through the physical causes first.

The causes, in order of probability

With the software side cleared, test these in order. The first three cover almost every -121 at boot; the rest are rarer.

# Cause Test Fix
1 Flex or connector not seated, or damaged pins Power down, reseat, inspect contacts under magnification Reseat or replace the flex, re-boot, re-grep
2 Rails off when the probe runs Meter or scope the module's supply pins during the first seconds of boot Bind the sensor's supplies and clock in the device tree, or fix the enable line that never fired
3 Master clock not running Scope the clock pad during boot Assign the clock to a real provider; check the carrier oscillator and its enable
4 Wrong bus or address in the device tree Compare the node's reg with the client name; scan the bus at runtime (next section) Correct reg, or move the node under the right controller
5 Missing level shifting or pull-ups Both lines should idle high at the module's own rail; look for a shifter between 1.8 V and 3.3 V domains Add or repair the level shifter; pull the bus up to the module's rail
6 Module's I2C interface damaged Rails and clock present, runtime scan still empty, a known-good module works Replace the module

Power sequencing deserves a word of its own. MIPI modules typically combine a 2.8 V analog rail, a 1.8 V I/O rail and a lower core rail, and a sensor with a dead I/O rail cannot answer even a correctly addressed read. Meter at the module's connector, not at the regulator, so the measurement includes the flex.

The master clock is the usual silent culprit. Sensor master clocks commonly run between 6 and 27 MHz, and some sensors gate their whole I2C interface on that clock: no clock, no acknowledgement, even with perfect power. A flat clock line during boot is as often a device-tree problem as a hardware one, because the clock starts only if the node assigns it to a provider the kernel controls.

Prove the bus with a runtime scan

With the board fully booted, ask the bus directly whether the module answers now.

  1. Take the bus number from the client name: 2-0036 means bus 2. The same entry sits under /sys/bus/i2c/devices/2-0036 even after a failed probe, because the client is registered whether or not a driver bound to it.
  2. Confirm the matching /dev/i2c-2 node exists; on most boards the bus number is also the N in /dev/i2c-N.
  3. Scan the bus with sudo i2cdetect -y 2. On a bus that also carries a PMIC or another live device, add -r so the scan uses read-byte probes, and never scan while the sensor is streaming.
  4. Interpret the result against this table.
Scan at the failed address 0x36 Meaning Next move
Empty The module is silent even fully booted Back to causes 1, 2, 3, then 6, in the table above
36 shows The module answers now but did not at boot Sequencing: rails or clock came up after the probe; fix the device tree (next section)
A different address shows The sensor sits elsewhere; reg is wrong or the address differs on your module revision Correct reg and re-boot

The middle row is the valuable one. A module that answers a runtime scan but NACKed at boot was not alive yet when the driver knocked: the regulator came up late, the enable line fired late, or the clock provider had not started. The kernel has a mechanism for exactly this - a driver whose supplies and clocks are wired to real providers gets its probe deferred until they exist, instead of failing at 1.5 s. Forcing the rails always-on is a legitimate bench test to prove that diagnosis; it is not a fix to ship.

If the scan is empty with rails measured present and a clock visible on the scope, swap in a known-good module. When the known-good module probes cleanly in the same slot, the first module's I2C pads are the fault, and that is the end of the trail for that board.

What the device tree must get right

If the trail printed the probing banner, the compatible string matched and the node's basic form is correct, so resist the urge to rewrite the driver or the framework. Four node details still produce a -121, and all of them starve the bus rather than break the format:

  • reg - the 7-bit address. 2-0036 means the kernel knocks at 0x36; if your module answers at another address, every read is a NACK.
  • Supplies - the analog, I/O and core supplies must point at regulators the kernel controls, so they are on before the probe and can hold the probe back if they come up late.
  • Clocks - the master clock must be assigned from a provider the kernel starts; an unassigned clock may never run.
  • Status and placement - cat /proc/device-tree/<bus-node>/<sensor-node>/status should read okay, and the node must sit under the controller the module is physically wired to. On the failing board in the example, the node i2c@3180000/ov5693_c@36 and its okay status were both fine, which is exactly why the trail reached the bus at all.

Lane count lives in this layer too. A module wired for two data lanes that the node declares as four can fail the probe as well as the stream, because the stack validates the configuration when it sets the sensor up. The 2-lane vs 4-lane mode guide covers that branch.

Error -121 versus its neighbours

A probe can fail in ways that look similar and are not. Match your trail against these signatures before touching hardware:

Trail signature Meaning Where to go
Banner, then a wrong ID or module value The sensor answered I2C, but it is not who the driver expects sensor ID mismatch guide
Probe succeeds, streaming then fails The bus works; power, clocks or lane setup for capture do not probe-passes, stream-fails guide
Probe succeeds, nodes exist, userspace lists nothing Kernel side is fine; the userspace stack or permissions are not kernel detects the sensor guide
No banner at all The compatible matched no driver, or the node is missing device-tree mismatch guide
timed out, or error -110 A line is held low; the bus is wedged, not silent Full power cycle of board and module; the I2C bus startup failure cured by a probe on SDA walkthrough shows the unwedging sequence
Nodes vanish when a second application opens the camera A binding or resource conflict after a successful probe device nodes disappear guide
I2C errors while streaming on a bound sensor The runtime bus has its own failure modes I2C communication failure guide
-121, as in this guide Nothing answered the address at boot The causes table above, in order

When the trail matches yours but the physical link itself is the suspect - corroded contacts, a cracked flex, a pad lifted by a reseat - the companion guide to fixing the physical link takes over where this one stops.

Bring-up order that prevents the next -121

Prevention is mostly sequence discipline. A bring-up that measures before it configures never spends a day chasing a dead probe:

  • Measure the rails at the module connector, flex unplugged and then plugged, before the first boot.
  • Scope or otherwise check the master clock before pointing a driver at the module.
  • Run i2cdetect on the camera bus before configuring the sensor node; a silent module found at this stage costs minutes, not days.
  • Save every boot's dmesg to persistent storage or a serial console, and keep the trail of a known-good boot beside it.
  • Change one thing per boot - module, flex, rail, device tree. Two changes make a passing boot useless as evidence.

When the probe passes

The trail you want ends with the sensor bound: the same first two lines, then the driver reading its ID without the -121, then the camera framework registering its nodes and the capture stack finding them. From there the bring-up moves downstream to lane configuration, pixel formats and streaming, which the guides linked above cover.

If you are specifying hardware rather than repairing it, apply the same checks at purchase time: pick the sensor and module first, then the carrier's camera support. Start from the board-level cameras, filter them in the camera finder, or step through the camera stage of the configurator. The systems topic page collects the rest of the bring-up guides, and our applications team answers bring-up questions through the contact page when an order needs a second pair of eyes.

Questions

Why is there no /dev/video* node when the probe failed?

The kernel creates video and media nodes only after a driver binds successfully. A probe that stops at error -121 leaves the I2C client registered but unbound, so no subdev and no video node appear, and the capture stack reports that no cameras are available. Fix the probe first; streaming-side settings cannot bring the node back.

Can a wrong device tree cause error -121?

Yes, in one specific way. If the driver printed its probing banner, the compatible matched and the node format is fine; the remaining device-tree causes are a wrong reg address (the driver knocks on an unoccupied address), a missing or inactive clock provider, and unbound regulator supplies. Each starves the bus so nothing acknowledges. A missing node or bad compatible fails earlier, with no banner at all.

What is the difference between I2C error -121 and error -110?

On ARM64 and x86 kernels, -121 is EREMOTEIO: the adapter got no acknowledgement, so nobody answered at that address. -110 is ETIMEDOUT: the adapter waited out its timeout, usually because SDA or SCL is held low by a wedged transfer. -121 points at power, clock, wiring, address or a dead chip; -110 points at a stuck line and clears with a full power cycle.

How do I find which I2C bus my MIPI camera sits on?

Read it from the client name in the probe log: in `ov5693 2-0036`, the leading 2 is the bus number and 0036 is the 7-bit address 0x36 in hexadecimal, 54 decimal. Check /sys/bus/i2c/devices/ for the same entry, then scan that bus with i2cdetect. If your platform aliases renumber the buses, trust the client name from dmesg over assumptions.

The camera probed fine yesterday and fails with -121 today. What changed?

Treat it as physical before software: reseating after vibration or a case rebuild is the most common trigger, followed by a rail that no longer powers up (a changed enable line or regulator state) and a clock that no longer starts. Diff today's dmesg against your saved good boot; identical software with a new -121 is a wiring, power or module fault.