Arducam 64MP camera requires reinstall after every apt update on Raspberry Pi kernel 5.15.61

Hi, I’m having trouble with my Arducam 64MP camera on a Raspberry Pi 4. Every time I run apt to update the system, I seem to have to reinstall the camera code again, following the directions here: https://www.arducam.com/docs/cameras-for-raspberry-pi/64mp-camera-for-raspberry-pi/how-to-use-arducam-64mp-camera-on-rapberry-pi/

There’s also a driver message that shows up in syslog about updating the driver. And one more thing that’s bugging me: my older camera app build (based on the upstream apps) produces output when I use --verbose 0, but the newer one that uses the default raspberry cameras doesn’t produce anything. Not sure if these are related or separate issues.

Thanks for reaching out. Can you share a bit more about your setup so I can get a clearer picture?

Specifically:

  • What kernel version is the Pi running?
  • The exact syslog lines you’re seeing about the driver
  • The libcamera-still command you’re running

Also, just to confirm, you’re using the Arducam 64MP camera, correct?

Yep, Arducam 64MP camera. Here’s what I’ve got:

Kernel version is 5.15.61. I was already on 5.15.61 — I mention this because the drivers are apparently merged into the linux kernel as of version 5.15.38.

Hostname: WimPi4-Dev

Syslog shows these lines:
Sep 1 11:49:46 WimPi4-Dev kernel: [ 8.933918] arducam_64mp 10-001a: Device found Arducam 64MP.
Sep 1 11:49:46 WimPi4-Dev kernel: [ 8.939155] arducam_64mp 10-001a: Consider updating driver arducam_64mp to match on endpoints

I’ve been referencing these two pages:
https://www.arducam.com/docs/cameras-for-raspberry-pi/64mp-camera-for-raspberry-pi/how-to-use-arducam-64mp-camera-on-rapberry-pi/

Got it, thanks. What command are you actually running with libcamera-still, and what output are you seeing?

Here’s the command:

libcamera-still --nopreview --thumb none --width 1920 --height 1080 --timeout 28860000 --timelapse 60000 --output /media/WimPi4-Dev/DCIM/20220901/0901%04d.jpg --framestart 1 --verbose 0 --continue-autofocus

It just outputs ‘Still capture image received’ once every minute. The images do get saved, so it works, but the console output is odd to me.

A couple of things going on here, let me break it down.

First, about the driver situation. Raspberry Pi releases new kernel versions every now and then, and different kernel versions correspond to different camera drivers. Arducam’s camera drivers have been officially merged under raspberrypi/linux, but the merge is not yet complete — there are still some features that haven’t been merged. So even on 5.15.61 you still need to perform the steps in the linked document rather than using some alternative enable command. This won’t last long; Arducam is working on getting it fully merged to official.

Second, it is NOT normal for Raspberry Pi to use libcamera-still with no output. That part needs to be investigated properly, and we should probably file a bug report for it.

Can you clarify — when you say ‘no output,’ are you talking about the console output, or is there no saved image?

Sorry, I should have been clearer. The ‘no output’ is on the console, not the saved image. The images save fine.

What I mean is: my customized libcamera-still produces console output even with --verbose 0, while the stock raspbian software with the latest libcamera-still produces no console output at all with --verbose 0.

Also, I noticed the ‘no output’ thing on my other Pi, not the 64MP one. On the other pi with the default distribution, the libcamera-still command has no output.

Ah that clears it up. So to summarize:

  • The customized build (with --verbose 0) still prints to the console.
  • The stock raspbian build (with --verbose 0) prints nothing.

That’s an interesting discrepancy. Can you tell me the hostname of the stock system and share the version output from both systems? Run these on each:

libcamera-still --version
libcamera-still --list-cameras

That’ll help me compare the builds.

Stock system hostname: WimPiZeroW-Wim (stock raspian software, latest libcamera-still)
64MP system hostname: WimPi4-Dev

I assume the customized libcamera-still is built from the upstream project with patches for the additional features.

Here you go:

Stock system:

wim@WimPiZeroW-Wim:~ $ libcamera-still --version
libcamera-apps build: 1bf0ccacf2ef 31-08-2022 (16:16:31)
libcamera build: v0.0.0+3866-0c55e522
wim@WimPiZeroW-Wim:~ $ libcamera-still --list-cameras

64MP system:

wim@WimPi4-Dev:~ $ libcamera-still --version
libcamera-apps build: f047a5b01578-intree 12-07-2022 (03:19:50)
libcamera build: v0.0.0+3730-67300b62
wim@WimPi4-Dev:~ $ libcamera-still --list-cameras

Perfect, thanks. Can you paste the full --list-cameras output for both? I want to compare the detected sensors and modes.

Sure thing.

Stock system (WimPiZeroW-Wim) --list-cameras:

Available cameras
-----------------
0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1/ov5647@36)
    Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
                             1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
                             1920x1080 [30.62 fps - (348, 434)/1928x1080 crop]
                             2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]

64MP system (WimPi4-Dev) --list-cameras:

Available cameras
-----------------
0 : arducam_64mp [9248x6944] (/base/soc/i2c0mux/i2c@1/arducam_64mp@1a)
    Modes: 'SRGGB10_CSI2P' : 1280x720 [120.03 fps - (2064, 2032)/5120x2880 crop]
                             1920x1080 [60.04 fps - (784, 1312)/7680x4320 crop]
                             2312x1736 [30.00 fps - (0, 0)/9248x6944 crop]
                             3840x2160 [20.00 fps - (784, 1312)/7680x4320 crop]
                             4624x3472 [10.00 fps - (0, 0)/9248x6944 crop]
                             9152x6944 [2.70 fps - (0, 0)/9152x6944 crop]

So the stock Pi is detecting an ov5647 (that’s a different camera), and the 64MP Pi is detecting arducam_64mp as expected.

That all looks consistent with what I’d expect for the 64MP sensor on the Pi 4. The key takeaways here:

  1. About the apt/reinstall loop and the syslog driver message: different kernel versions correspond to different camera drivers. Even though the drivers were merged into the linux kernel (as noted, the merge started with version 5.15.38 per the Arducam-Pivariety-V4L2-Driver repo), the merge is not yet fully complete. So users on newer kernels like your 5.15.61-v8+ still need to run the manual setup steps rather than some alternative enable command. Just continue following the setup steps in the document: Redirecting...

  2. About the missing console output: since that’s abnormal, we need to dig into it. Can you run the bug report tool so we can analyze your system? On the Raspberry Pi (it may run without display/output), run:

wget -O arducam-camera-bug-report https://github.com/ketai-dhr/arducam-camera-bug-report/releases/download/tools/arducam-camera-bug-report
chmod +x ./arducam-camera-bug-report
./arducam-camera-bug-report

This will produce an arducam-bug-report.txt in the current directory. Please send that file as an attachment and we’ll take it from there.

OK ran the bug report script. Here’s the attachment: arducam-bug-report.txt

I also did the version/list-cameras comparison between the stock Pi (ov5647) and the 64MP Pi (arducam_64mp) as we discussed.

Thanks for attaching that. Current picture, to tie it together:

  • Root cause of the driver behavior: different kernel versions map to different camera drivers, and the official merge into raspberrypi/linux isn’t complete yet (some features still missing), so the manual driver installation steps from the documentation are still required. That’s also why an apt update makes it look like you have to reinstall the camera code.
  • Workspace/workaround for now: keep following the setup steps at Redirecting...
  • Open issue: the missing console output with libcamera-still on the stock build is abnormal. We’ll use the arducam-bug-report.txt you attached for further analysis. Once we have something on that, we’ll update this thread.

Thanks for the detailed diagnostics and the version/list-cameras comparison — that helped a lot.