64MP sensor memory issues on Raspberry Pi: can Arducam address buffer allocation?

Hi everyone, I’m working on a smart retail camera project and I’m trying to use the newly released 64MP sensor with a Raspberry Pi. I keep hitting the “64MP failed to allocate buffers” error and it’s basically blocking me right now. Before I sink more time into this, I wanted to ask: is Arducam actually going to be able to solve these memory issues on this sensor? I’m following a couple of threads that report the same thing:

https://forums.raspberrypi.com/viewtopic.php?t=339182

If there’s a plan or an ETA for a more stable driver, that would really help me decide whether to keep going with this setup. Thanks.

Hi, thanks for reaching out and sorry you’re stuck on this. Can you let me know a bit more about your setup first so I can point you in the right direction?

  • Which exact Raspberry Pi board are you using (e.g. Pi 4 Model B)?
  • What OS image / kernel version are you running?
  • Are you using the Arducam 64MP camera (the one using the libcamera-based driver), or another 64MP module?
  • Roughly how much RAM does the board have, and are you running anything heavy on it (display, other services, etc.)?

Both of the threads you linked are the same issue we’ve been tracking, so once I know your board + OS I can confirm what’s going on.

Sure. It’s a Raspberry Pi 4 Model B, standard Raspberry Pi OS build, and yes it’s the Arducam 64MP sensor (the newer one). The board is a 4GB model. The whole point of this is a smart retail camera product (browzzin.ai), so I can’t have it crashing on buffer allocation.

I don’t have a specific crash log handy right now, it’s just consistently giving me the “failed to allocate buffers” error when I try to start the camera. That’s basically why I’m asking about driver plans — right now I can’t even get to evaluating image quality.

Thanks, that’s helpful. So you’re on a Pi 4 Model B with the 64MP sensor, hitting “failed to allocate buffers” — this matches the reports in the threads you linked.

Before I get into the root cause, a couple of quick things to try so we have data:

  1. Run vcgencmd get_mem cma and tell me what it reports.
  2. Check dmesg | grep -i cma right after you try to start the camera — look for anything about CMA allocation failures.
  3. Are you doing anything else on the Pi at the same time (running a GUI, other camera apps, etc.)?

The 64MP sensor needs a large contiguous buffer, so the CMA values are the important part here.

ok, so vcgencmd get_mem cma reports about 256M. And in dmesg I do see CMA-related messages but I’m not really sure how to read them, they kind of scroll by. It’s a headless-ish setup but I do have some services running. This is the same error everyone in those threads seems to get, so I assume it’s a known thing.

Honestly I’d rather know if this is fixable at all before I go deep into tweaking.

I get it, let me save you the time. The short answer: this is not a problem with the Arducam camera itself, and it’s not something we can fix by tweaking our driver.

What’s happening is a CMA (Contiguous Memory Allocator) discontinuity problem on the Raspberry Pi side. Raspberry Pi has officially explained this as a CMA discontinuity issue — the Pi isn’t able to hand out a large enough contiguous block for the 64MP buffers, which is why you get “failed to allocate buffers” regardless of what the camera is doing. Because the root cause lives in the Pi’s memory allocation, we can’t optimize it away from the driver. In other words, from the driver side there’s nothing we can change to make those allocations succeed.

So the direction to push on is the CMA/Pi side, not the camera driver.

That’s… not the answer I was hoping for, but at least it’s clear. So just to confirm — there is no driver-level fix coming, and the buffer allocation failure is a Pi/CMA thing, not Arducam’s sensor?

Is there anything at all I can do in the meantime, or is the 64MP basically not usable on a Pi 4 for something like my use case right now?

Correct on both counts: the failure is caused by CMA discontinuity on the Raspberry Pi, as officially explained by Raspberry Pi, and it’s not something we can fix through driver optimization. So there’s no driver update that will resolve it on our end.

On the practical side, what people generally try is increasing the CMA allocation on the Pi and reducing memory pressure from other processes — that sometimes gives the allocator enough room, but it treats the symptom rather than the cause, and results vary depending on the exact Pi/OS and what else is running. It doesn’t change the underlying limitation.

Let me double-check the current status of this on our side and get back to you — I’ll reply here once I have more info.

Alright, thanks. I’ll try bumping CMA and cutting down what’s running and see if it gets me anywhere, but I’ll keep expectations low. If you hear anything new about this on Arducam’s side, please post it here.

Will do. Summary of where we are so the thread has it in one place:

  • The “64MP failed to allocate buffers” error on the Pi 4 Model B with the 64MP sensor is caused by CMA discontinuity on the Raspberry Pi, per Raspberry Pi’s official explanation.
  • This is not a defect in the Arducam camera, and it cannot be fixed via driver optimization — so there’s no stable-driver update that resolves it.
  • The only practical mitigations are on the Pi side (increasing CMA, lowering memory pressure), which address the symptom, not the root cause.

I’m checking on this with the team and will post an update in this thread when I have something concrete. If you do get CMA changes to help, feel free to share your settings here — might help others with the same setup.