lkt
Posts: 5
Joined: Sun May 06, 2018 5:42 pm

Pi Camera V2 failed to enable component: ENOSPC - failed imx219.c::imx219_op

Sun May 06, 2018 5:55 pm

Hi,

I'm trying to use the Pi Noir camera V2 on the model A+ but it's not working. I'm using a clean install of Raspbian Lite.

I'm getting the error mmal: mmal_vc_component_enable: failed to enable component: ENOSPC.
I've checked and reseated the ribbon cable on both ends and the small connecter on the camera.

I've done a bit of research and apparently the error assert( 0 ) failed; ../imx219.c::imx219_open is the problem.

Is there a solution for this or should I return it?

Thanks

Full logs:
uname -a:

Code: Select all

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.34+ #1110 Mon Apr 16 14:51:42 BST 2018 armv6l GNU/Linux
raspistill -v -o test.jpg:

Code: Select all

pi@raspberrypi:~ $ raspistill -v -o test.jpg

raspistill Camera App v1.3.11

Width 3280, Height 2464, quality 85, filename image.test
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
config.txt:

Code: Select all

dtparam=audio=on
start_x=1
gpu_mem=160
start_debug=1
vcgencmd get_camera:

Code: Select all

pi@raspberrypi:~ $ vcgencmd get_camera
supported=1 detected=1
sudo vcdbg log msg

Code: Select all

pi@raspberrypi:~ $ sudo vcdbg log msg
001401.974: brfs: File read: /mfs/sd/config.txt
001402.645: brfs: File read: 1625 bytes
001412.530: HDMI:EDID error reading EDID block 0 attempt 0
001413.795: HDMI:EDID error reading EDID block 0 attempt 1
001415.054: HDMI:EDID error reading EDID block 0 attempt 2
001416.313: HDMI:EDID error reading EDID block 0 attempt 3
001417.571: HDMI:EDID error reading EDID block 0 attempt 4
001418.830: HDMI:EDID error reading EDID block 0 attempt 5
001420.088: HDMI:EDID error reading EDID block 0 attempt 6
001421.347: HDMI:EDID error reading EDID block 0 attempt 7
001422.605: HDMI:EDID error reading EDID block 0 attempt 8
001423.864: HDMI:EDID error reading EDID block 0 attempt 9
001424.885: HDMI:EDID giving up on reading EDID block 0
001441.188: brfs: File read: /mfs/sd/config.txt
001441.713: HDMI:Setting property pixel encoding to Default
001441.733: HDMI:Setting property pixel clock type to PAL
001441.752: HDMI:Setting property content type flag to No data
001441.771: HDMI:Setting property fuzzy format match to enabled
001441.856: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
001451.219: gpioman: gpioman_get_pin_num: pin WL_LPO_CLK not defined
001451.245: gpioman: gpioman_get_pin_num: pin BT_ON not defined
001451.265: gpioman: gpioman_get_pin_num: pin WL_ON not defined
001468.943: aphy_drv_slew = 00000223, dphy_drv_slew = 00000223
001474.491: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
001474.549: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001474.576: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<
001474.884: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001476.151: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001477.414: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001478.676: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001479.939: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001481.203: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001482.465: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001483.728: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001484.992: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001486.254: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001487.281: hdmi: HDMI:EDID giving up on reading EDID block 0
001487.311: hdmi: HDMI: No lookup table for resolution group 0
001487.329: hdmi: HDMI: hotplug attached with DVI support
001487.361: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001487.655: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001488.919: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001490.183: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001491.448: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001492.712: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001493.976: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001495.240: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001496.503: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001497.767: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001499.031: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001500.059: hdmi: HDMI:EDID giving up on reading EDID block 0
001500.093: hdmi: HDMI: hotplug deassert
001500.107: hdmi: HDMI: HDMI is currently off
001500.121: hdmi: HDMI: changing mode to unplugged
001500.145: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001500.853: *** Restart logging
001500.880: brfs: File read: 1625 bytes
001504.755: brfs: File read: /mfs/sd/cmdline.txt
001504.805: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=c04ce9b9-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
001505.089: brfs: File read: 142 bytes
001824.104: brfs: File read: /mfs/sd/kernel.img
001824.129: Loading 'kernel.img' to 0x8000 size 0x4759b0
001827.769: No kernel trailer - assuming DT-capable
001827.821: brfs: File read: 4676016 bytes
001831.896: brfs: File read: /mfs/sd/bcm2708-rpi-b-plus.dtb
001831.921: Loading 'bcm2708-rpi-b-plus.dtb' to 0x47d9b0 size 0x5604
001929.009: brfs: File read: 22020 bytes
001933.700: brfs: File read: /mfs/sd/config.txt
001934.010: dtparam: i2c_arm=on
001944.581: dtparam: audio=on
002877.800: gpioman: gpioman_get_pin_num: pin EMMC_ENABLE not defined
002908.195: Device tree loaded to 0x15fea600 (size 0x59d7)
002909.704: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
004617.543: vchiq_core: vchiq_init_state: slot_zero = 0x55580000, is_master = 1
004622.596: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
199443.650: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 32, power enable gpio = 41
199445.286: camsubs: Camera found OK
199447.397: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
199458.117: brfs: File read: 1625 bytes
sudo vcdbg log assert:

Code: Select all

pi@raspberrypi:~ $ sudo vcdbg log assert
001402.917: assert( source ) failed; ../../../../../middleware/confzilla/cp_front_fdt.c::cp_front_fdt_load_builtin line 115 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
199447.420: assert( camera_subsystem_state.power_enable_ref_count[port] > 0 ) failed; ../../../../../vcfw/drivers/device/camera_subsystem/camera_subsystem.c::camera_disable_ctrl line 1116 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
199578.739: assert( 0 ) failed; ../../../../../vcfw/drivers/device/camera/imx219.c::imx219_open line 432 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
199578.792: assert( open_camera_driver: camera open failed ) failed; ../../../../../middleware/camplus/cdi/cdi_camera.c::open_camera_driver line 709 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
199578.847: assert( cdi_camera_open: Failed to open camera driver/perihperal ) failed; ../../../../../middleware/camplus/cdi/cdi_camera.c::cdi_camera_open line 546 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
199578.898: assert( retcode == 0 ) failed; ../../../../../middleware/openmaxil/components/camera.c::load_and_open_cdi line 12048 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
199578.950: assert( id->cdi!=NULL && id->cdi_handle!=NULL ) failed; ../../../../../middleware/openmaxil/components/camera.c::open_camplus line 11392 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6894
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi Camera V2 failed to enable component: ENOSPC - failed imx219.c::imx219_op

Sun May 06, 2018 8:49 pm

Yes, if you are genuinely seeing

Code: Select all

199578.739: assert( 0 ) failed; ../../../../../vcfw/drivers/device/camera/imx219.c::imx219_open line 432 rev af80847
vcdbg_ctx_get_dump_stack: dump_stack failed
then I'm afraid it is a faulty module.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

lkt
Posts: 5
Joined: Sun May 06, 2018 5:42 pm

Re: Pi Camera V2 failed to enable component: ENOSPC - failed imx219.c::imx219_op

Sun May 06, 2018 9:40 pm

That's unfortunate, I will return it.
Thanks for confirming

lopataru
Posts: 1
Joined: Sat Mar 02, 2019 6:55 pm

Re: Pi Camera V2 failed to enable component: ENOSPC - failed imx219.c::imx219_op

Sat Mar 02, 2019 7:06 pm

I have the same problem but without the vcdbg log assert errors (no messages there)
Summary:
- new camera, new Pi Zero
- tried first with a standard MotionEye OS/system. received the ENOSPC error no matter what i did
- tried also with the latest Raspbian OS. no luck, same error
- tried getting the cable in and out for the camera and/or pi

df -h shows enough space
vcgencmd get_camera : supported=1 detected=1
camera is enabled in the Pi settings
no other camera using programs are running (as said this is a very vanilla Raspbian image)
but still.. when i try to do
raspicam -o firstpic.jpg
.... the classic

Code: Select all

mmal: mmal_vc_component_enable: failed to enable component :  ENOSPC
Any ideas how to troubleshoot this further?

itsmereal
Posts: 1
Joined: Wed Apr 10, 2019 1:08 am

Re: Pi Camera V2 failed to enable component: ENOSPC - failed imx219.c::imx219_op

Wed Apr 10, 2019 1:13 am

lopataru wrote:
Sat Mar 02, 2019 7:06 pm
I have the same problem but without the vcdbg log assert errors (no messages there)
Summary:
- new camera, new Pi Zero
- tried first with a standard MotionEye OS/system. received the ENOSPC error no matter what i did
- tried also with the latest Raspbian OS. no luck, same error
- tried getting the cable in and out for the camera and/or pi

df -h shows enough space
vcgencmd get_camera : supported=1 detected=1
camera is enabled in the Pi settings
no other camera using programs are running (as said this is a very vanilla Raspbian image)
but still.. when i try to do
raspicam -o firstpic.jpg
.... the classic

Code: Select all

mmal: mmal_vc_component_enable: failed to enable component :  ENOSPC
Any ideas how to troubleshoot this further?
Same problem here too. No message from vcdbg log assert

tjrob
Posts: 32
Joined: Tue Feb 19, 2013 5:31 pm

Re: Pi Camera V2 failed to enable component: ENOSPC - failed imx219.c::imx219_op

Sun Jun 09, 2019 7:28 pm

I had the same ENOSPC problem when using picamera in python3 for single (still) images. I found two workarounds:
1. reduce the resolution -- it failed at 3280x2464, but succeeded at 1024x768
2. increase the amount of GPU memory. The default is 128 MB; 192MB permits 3280x2464.
(do this in the Performance tab of the graphical configuration tool)

JPEG format seems to need less GPU memory than the bitmapped formats (PNG, GIF, BMP). Of course the final JPEG file is also smaller.

Return to “Camera board”