Krumelmonsta
Posts: 1
Joined: Thu Dec 01, 2016 8:49 am

Camera V2.1: failed to enable component: ENOSPC

Thu Dec 01, 2016 10:12 am

Hi,
I just started with a Raspberry PI 3 Model B V1.2 and tried to get the Raspberry PI Camera V2.1 running. I got the camera and the PI just a few days ago.

But as I am running raspistill -o pic.jpg
I get this error:
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


I googled and searched in the forum a lot but couldn't find anything helpful.

Further information and things I've tried:
vcgencmd get_camera

Code: Select all

[email protected]:~ $ vcgencmd get_camera
supported=1 detected=1
vcgencmd version

Code: Select all

[email protected]:~ $ vcgencmd version
May 16 2016 12:14:30
Copyright (c) 2012 Broadcom
version c5777b98b41de8a44d62718c1fc8b57f03510c7a (clean) (release)
uname -a

Code: Select all

[email protected]:~ $ uname -a
Linux raspberrypi 4.4.35-v7+ #931 SMP Sat Nov 26 13:05:09 GMT 2016 armv7l GNU/Linux
sudo vcdbg log msg

Code: Select all

[email protected]:~ $ sudo vcdbg log msg
001197.169: HDMI:EDID error reading EDID block 0 attempt 0
001198.432: HDMI:EDID error reading EDID block 0 attempt 1
001199.691: HDMI:EDID error reading EDID block 0 attempt 2
001200.949: HDMI:EDID error reading EDID block 0 attempt 3
001202.208: HDMI:EDID error reading EDID block 0 attempt 4
001203.466: HDMI:EDID error reading EDID block 0 attempt 5
001204.725: HDMI:EDID error reading EDID block 0 attempt 6
001205.983: HDMI:EDID error reading EDID block 0 attempt 7
001207.242: HDMI:EDID error reading EDID block 0 attempt 8
001208.500: HDMI:EDID error reading EDID block 0 attempt 9
001209.522: HDMI:EDID giving up on reading EDID block 0
001226.453: HDMI:Setting property pixel encoding to Default
001226.476: HDMI:Setting property pixel clock type to PAL
001226.494: HDMI:Setting property content type flag to No data
001226.514: HDMI:Setting property fuzzy format match to enabled
001415.138: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001415.164: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<
001415.555: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001416.824: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001418.087: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001419.351: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001420.614: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001421.878: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001423.142: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001424.406: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001425.670: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001426.934: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001427.961: hdmi: HDMI:EDID giving up on reading EDID block 0
001427.992: hdmi: HDMI: No lookup table for resolution group 0
001428.008: hdmi: HDMI: hotplug attached with DVI support
001428.069: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001428.436: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001429.698: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001430.960: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001432.223: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001433.486: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001434.748: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001436.011: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001437.274: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001438.537: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001439.799: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001440.825: hdmi: HDMI:EDID giving up on reading EDID block 0
001441.313: hdmi: HDMI: hotplug deassert
001441.328: hdmi: HDMI: HDMI is currently off
001441.343: hdmi: HDMI: changing mode to unplugged
001441.365: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001442.608: *** Restart logging
001444.249: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
001699.683: Loading 'kernel7.img' to 0x8000 size 0x4090f0
001703.337: Kernel trailer DTOK property says yes
001703.352: Kernel trailer DDTK property says yes
001707.030: Loading 'bcm2710-rpi-3-b.dtb' to 0x4110f0 size 0x3e78
001802.788: dtparam: i2c_arm=on
001812.760: dtparam: audio=on
001973.512: Device tree loaded to 0x2effbc00 (size 0x4354)
001975.794: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
003472.463: vchiq_core: vchiq_init_state: slot_zero = 0xf6c80000, is_master = 1
003476.769: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
047872.266: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 134, power enable gpio = 133
047873.902: camsubs: Camera found OK
047876.633: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
/boot/config.txt

Code: Select all

# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
#dtoverlay=vc4-kms-v3d

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
start_x=1
gpu_mem=128
start_debug=1
I activated start_debug=1 in /boot/config.txt and executed sudo vcdbg log assert after the error accured.

Code: Select all

[email protected]:~ $ sudo vcdbg log assert
001194.486: assert( source ) failed; ../../../../../middleware/confzilla/cp_fron                                     t_fdt.c::cp_front_fdt_load_builtin line 115 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
001991.275: assert( card not initialised ) failed; ../../../../../filesystem/med                                     ia/sdcard/sdcard.c::sdhost_close line 1045 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
002669.011: assert( 0 ) failed; ../../../../../helpers/arm_loader/arm_loader.c::                                     handle_mbox_property line 2800 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
212891.342: assert( camera_subsystem_state.power_enable_ref_count[port] > 0 ) fa                                     iled; ../../../../../vcfw/drivers/device/camera_subsystem/camera_subsystem.c::ca                                     mera_disable_ctrl line 1116 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
213014.922: assert( 0 ) failed; ../../../../../vcfw/drivers/device/camera/imx219                                     .c::imx219_open line 431 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
213014.956: assert( open_camera_driver: camera open failed ) failed; ../../../..                                     /../middleware/camplus/cdi/cdi_camera.c::open_camera_driver line 716 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
213014.992: assert( cdi_camera_open: Failed to open camera driver/perihperal ) f                                     ailed; ../../../../../middleware/camplus/cdi/cdi_camera.c::cdi_camera_open line                                      541 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
213015.023: assert( retcode == 0 ) failed; ../../../../../middleware/openmaxil/c                                     omponents/camera.c::load_and_open_cdi line 11817 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
213015.054: assert( id->cdi!=NULL && id->cdi_handle!=NULL ) failed; ../../../../                                     ../middleware/openmaxil/components/camera.c::open_camplus line 11193 rev c5777b9
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
The camera never worked before. I also tried a Raspberry Pi Model B+ V1.2 causing the same problem.
Thank you for any help!

KnarfB
Posts: 198
Joined: Wed Dec 14, 2016 10:47 am
Location: Germany

Re: Camera V2.1: failed to enable component: ENOSPC

Wed Dec 14, 2016 7:39 pm

Have exactly the same situation here: 2016-11-25 Raspbian 6587483c9... out-of-the-box, update, upgrade, but get the same error with raspivid. Have access to a Pi NoIR V 2.1 which works with my Pi, so it's obviously an issue with my camera module. Will send it back.

JPNewbie
Posts: 1
Joined: Thu May 02, 2019 2:47 am

Re: Camera V2.1: failed to enable component: ENOSPC

Thu May 02, 2019 2:52 am

I am having the same issue 'failed to enable component: ENOSPC' from command line but the camera works fine from Python.

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

Re: Camera V2.1: failed to enable component: ENOSPC

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.

bear73
Posts: 2
Joined: Sun Jun 23, 2019 2:04 pm

Re: Camera V2.1: failed to enable component: ENOSPC

Sun Jun 23, 2019 2:13 pm

Weirdly enough, I have the exact same issue, but even more weird, after following the instructions on some random pages, it then worked, for a while, and then stopped and started giving me the exact same issue. I then decided to try a spare Raspberry Pi with the same camera, and annyoingly, the same situation, a pi zero with a different cable and the same camera, also worked, but then after a reboot, it then stopped. Is there something that I am doing wrong ?

I thought that I should check the following :
  • Fresh install of raspbian.
  • Check that the cable is correctly installed in the camera and on the board (mainly by unplugging it and replugging it)
  • Running the normal updates (sudo apt-get update && sudo apt-get upgrade) as well as the firmware update
  • Changing my memory split from 128MB to 256MB
And yet, there seems to be something wrong. Could it be the camera itself ? But then if so, why did it work sometimes and not others ? I am totally confused. :? Any help would be greatly appreciated !

Return to “Camera board”