libcamera-org / libcamera

This is an unofficial mirror of https://git.libcamera.org/libcamera/libcamera.git/ Issue tracking at https://bugs.libcamera.org
Other
63 stars 21 forks source link

Mmap permission issue on Android 14 & RPi5 #13

Open janzwiegers opened 5 months ago

janzwiegers commented 5 months ago

Having a problem capturing an image on Android 14 (& 13). Tombstone looks like this:

06-03 15:13:03.880 308 578 I DMABUFHEAPS: Using : Non-legacy ION heaps 06-03 15:13:03.880 308 578 I [minigbm:gbm_mesa_internals.cpp(233)]: Found GPU v3d 06-03 15:13:04.052 308 359 E libcamera: ERROR Buffer mapped_framebuffer.cpp:230 Failed to mmap plane: Permission denied .... lots of Permission denied! 06-03 15:13:11.282 308 359 E libcamera: ERROR Buffer mapped_framebuffer.cpp:230 Failed to mmap plane: Permission denied 06-03 15:13:12.008 308 579 E libcamera: ERROR Camera camera.cpp:675 Camera in Running state trying acquire() requiring state Available 06-03 15:13:12.008 308 579 E libcamera: ERROR HAL camera_device.cpp:390 '/base/axi/pcie@120000/rp1/i2c@88000/imx708@1a': Failed to acquire the camera 06-03 15:13:12.008 308 579 E libcamera: ERROR HAL camera3_hal.cpp:81 Failed to open camera module '0' 06-03 15:13:12.008 308 579 E libcamera: FATAL HAL generic_frame_buffer_allocator.cpp:106 gralloc_open() failed: -87

MLKIT Streaming & analyzing works until trying to capture an image the above happens. The various Android versions for Rpi5 I could find gave the same issue. Android built from Raspberry Vanilla and even replacing with later libcamera had the same issue.

kbingham commented 5 months ago

Hi Jan,

As suggested by Naush - please use the libcamera maililng list at https://lists.libcamera.org/listinfo/libcamera-devel

This repository is only monitored by me, not the whole project team. And I should probably close it to prevent this confusion.

I saw you mentioned your concern about us sending it back to Raspberry Pi. I don't think that's the case here. But I suspect your issue will be about your system configuration due to the permission denied errors rather than libcamera directly.

janzwiegers commented 5 months ago

Wrt: "But I suspect your issue will be about your system configuration due to the permission denied errors rather than libcamera directly."

This issue happens on all Android variant for 13 & 14 I could test. I tried Emteria, AOSP & LineageOS. Also self built version of RaspVanilla changing permissions etc

I suspect it is only a configuration issue specific to Rpi 4 & 5