IMX219 camera installation fails with i2c read probe error -121 on Tegra

Hi, I’m having an installation problem with my cameras. I tried to install the driver but I keep hitting this error and I’m not sure what to do. Here’s what I’m seeing:

imx219_board_setup: error during i2c read probe (-121)
board setup failed
probe of 10-0010 failed with error -121

Do I need to downgrade the kernel? I’m kind of stuck here.

Hi, thanks for posting. Before we go down the kernel route, let’s gather a bit more info so we’re not guessing.

Can you tell me:

  1. What hardware/platform you’re running on?
  2. Which camera you actually have connected right now?
  3. The output of uname -a and grep -V?

Also, could you paste the full output of dmesg | grep -E "imx477|imx219|arducam"? That’ll show us whether a driver loaded and how the probe ended up.

Sure. Hostname is dsup@dsup-desktop.

grep -V gives me:

grep (GNU grep) 3.4
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
Written by Mike Haertel and others; see <https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.

It’s a Tegra platform - I can see tegra-camrtc-capture-vi, tegra210_adma, and nv_imx219 in the loaded modules list.

Good, that helps. Now the important part - please run and paste the full dmesg | grep -E "imx477|imx219|arducam" output. Also, just to be sure, which camera model is physically connected? IMX219 or IMX477?

Here’s the dmesg output:

[   27.593606] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
[   27.622705] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 9-0010 bound
[   27.630753] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[   27.736135] imx219 10-0010: imx219_board_setup: error during i2c read probe (-121)
[   27.752440] imx219 10-0010: board setup failed
[   27.758509] imx219: probe of 10-0010 failed with error -121
[   33.130393]  tegra210_adma snd_hda_tegra snd_hda_codec snd_hda_core nv_imx219 spi_tegra210_qspi spi_tegra114 cfg80211 nvgpu ina3221 ip_tables x_tables

And a screenshot of what I’m seeing: Screenshot

Honestly I’m not 100% sure which one it is, I thought the drivers were the same.

Ok this is the key thing. Looking at your dmesg, the IMX219 driver is definitely loaded and running (imx219_v2.0.6), and it’s probing both at 9-0010 and 10-0010. The second one fails:

imx219 10-0010: imx219_board_setup: error during i2c read probe (-121)
imx219 10-0010: board setup failed
imx219: probe of 10-0010 failed with error -121

Error -121 is basically “no response on the I2C bus” - the driver can’t talk to the sensor it thinks is there.

Here’s the thing though: you mentioned you’re actually using an IMX477 camera. The dmesg only shows IMX219 activity. So the IMX219 driver is enabled while the IMX477 hardware is connected - that mismatch is exactly what causes the board setup / probe failure. You don’t need to downgrade the kernel; you need the matching IMX477 driver installed.

Ah ok that makes sense. So the IMX219 driver being on is the problem. How do I install the IMX477 driver then? I tried “installing the driver” earlier but clearly I installed the wrong one.

Right. You’ll want to follow the IMX477 driver install doc here:

https://www.arducam.com/docs/camera-for-jetson-nano/native-jetson-cameras-imx219-imx477/imx477-how-to-install-the-driver/#4--driver-setup-

And the Jetson hardware setup guide for reference:
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/hw_setup_jetson_io.html#wwpID0E02D0HA

First, verify what’s currently loaded with:

dmesg | grep -E "imx477|imx219|arducam"

If IMX477 shows up correctly you’re good. If you only see imx219 like above, the 477 driver isn’t installed.

For L4T 34.2.3 and later you can use the automatic install script:

cd ~
wget https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.3/install_full.sh
chmod +x install_full.sh
./install_full.sh -m imx477

Thanks. I ran the install script with -m imx477. What should I do afterward to confirm it actually took effect?

After a reboot, run the dmesg grep again and you should see imx477 probe lines instead of imx219. If you want to test the autofocus on the motorized focus version, there’s an alternative path too:

git clone https://github.com/ArduCAM/MIPI_Camera.git
cd /MIPI_Camera/Jetson/IMX477/AF_LENS
python Autofocus.py -i 7

More info on the IMX477 motorized focus camera here:
https://www.arducam.com/docs/camera-for-jetson-nano/native-jetson-cameras-imx219-imx477/imx477-12mp-auto-focus-motorized-focus-camera/

Ok I’ll give that a shot and post back the new dmesg output.

Sounds good. To summarize for anyone following along:

The issue was a driver/hardware mismatch - the IMX219 driver was enabled and probing while an IMX477 camera was connected, which produced the imx219_board_setup: error during i2c read probe (-121) / board setup failed / probe of 10-0010 failed with error -121 errors. No kernel downgrade is needed. The fix is to install the matching IMX477 driver following the Arducam IMX477 install documentation, then verify with dmesg | grep -E "imx477|imx219|arducam" after a reboot.

If you still see the probe failure after installing the 477 driver, post the fresh dmesg output and we’ll dig further.