I have been following the tutorial on this page on setting up the raspbery pi https://www.raspberrypi.org/documentation/configuration/camera.md and when I run sudo vcgencmd get_camera I get supported=1 detected=1

however when I run raspistill -v -o test.jpg I get:

raspistill Camera App v1.3.11

Width 3280, Height 2464, quality 85, filename test.jpg
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

things i have tried: 1. Enabled the camera through a terminal on the PI via "sudo raspi-config" 2. Restarted

  1. Updated the Raspberry PI firmware through a terminal with "sudo rpi-update"

  2. Increased the GPU memory available from the default of 128 to 256

  3. ran sudo ps aux|grep raspi" got:

    pi 1605 0.0 0.0 4376 508 pts/0 S+ 15:08 0:00 grep --color=auto raspi

I also tried running a program I found online:

from time import sleep
from picamera import PiCamera

camera = PiCamera()
camera.resolution = (1024, 768)


but it gives me the folliwing errors:

mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC
mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x23439e0 (ENOSPC)
mmal: mmal_connection_enable: output port couldn't be enabled
Traceback (most recent call last):
  File "camera.py", line 6, in <module>
    camera = PiCamera()
  File "/home/pi/.local/lib/python2.7/site-packages/picamera/camera.py", line 433, in __init__
  File "/home/pi/.local/lib/python2.7/site-packages/picamera/camera.py", line 513, in _init_preview
    self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
  File "/home/pi/.local/lib/python2.7/site-packages/picamera/renderers.py", line 558, in __init__
  File "/home/pi/.local/lib/python2.7/site-packages/picamera/mmalobj.py", line 2212, in enable
    prefix="Failed to enable connection")
  File "/home/pi/.local/lib/python2.7/site-packages/picamera/exc.py", line 184, in mmal_check
    raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

I am new to Linux and raspberry pi, please let me know if there is anything else I could try other than changing the camera module. because right know I think the camera modual is faulty but can that be if sudo vcgencmd get_camera returns supported=1 detected=1? any help will be appreciated. thank you and have a nice day!

1 Answer 1


Camera driver supports only one client at a time. Have you something running that uses camera in background? Any installed programs/scripts on startup?

Also please read this answer: What causes ENOSPC error when using the Raspberry Pi camera module?

If nothing helps then make fresh system install and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.