Raspberry Pi online course

Enable Raspberry Pi Camera Support with raspi-config

Learn how to enable or disable Raspberry Pi CSI camera support with raspi-config, reboot safely, test modern libcamera tools, and troubleshoot detection problems.

raspi-config is Raspberry Pi OS's text-based configuration utility. On older Raspberry Pi OS releases, its Camera setting could enable or disable support for a connected Raspberry Pi Camera Module. Current releases generally use the libcamera stack and may detect compatible cameras automatically, so the old Camera menu item may not appear.

This guide covers both workflows: the legacy raspi-config setting and camera verification on current Raspberry Pi OS versions.

What the Camera option does

The Camera option in raspi-config provides a menu-driven way to turn support for the Raspberry Pi camera interface on or off. Enabling it prepares the operating system to use a camera module connected through the board's CSI connector.

CSI means Camera Serial Interface. It is the dedicated interface used by Raspberry Pi camera modules. The setting does not configure an ordinary USB webcam. A USB webcam uses a different USB video driver and troubleshooting path.

Before enabling or connecting the camera

  1. Shut down the Raspberry Pi and disconnect its power before attaching, removing, or reseating a CSI ribbon cable. Do not insert or remove the cable while the board is powered.
  2. Locate the CSI camera connector. On boards with separate camera and display connectors, do not confuse the camera connector with the display connector. Use the connector identified for the camera in the documentation for your board.
  3. Release the connector latch, insert the ribbon cable fully, and secure the latch. The exposed contacts must face the correct direction for both the board and camera module; orientation varies between board and camera designs.
  4. Confirm that the camera module and ribbon cable match your Raspberry Pi model. Cable width, connector type, and camera support can vary.
  5. Reconnect power only after the cable is fully inserted and the latch is closed.

A ribbon cable is a flat, flexible cable that connects the camera module to the CSI connector. A cable that is partly inserted, reversed, or connected to the wrong port can produce the same symptoms as a missing software configuration.

Open raspi-config

Open a terminal locally or through a remote shell, then run:

sudo raspi-config

sudo runs the utility with administrator privileges. In the text interface:

  • Use the arrow keys to move through menus.
  • Press Enter to open a highlighted item or accept a choice.
  • Use Tab to move between controls such as buttons.
  • Use the displayed selection keys, often the arrow keys or the space bar, to choose an option.

Menu names and locations differ between Raspberry Pi OS releases. Look for a camera-related item in the interface rather than assuming that every release uses the same menu path.

Enable camera support on a legacy system

  1. Run sudo raspi-config.
  2. Open the camera-related setting if it is present.
  3. Choose Enable.
  4. Accept the confirmation prompt.
  5. Finish the utility and reboot:
sudo reboot

A reboot is normally required so that the changed configuration and related drivers are applied. After the system starts, test the camera using the tools available on that Raspberry Pi OS release.

On systems that support the noninteractive legacy function, the equivalent enable command is:

sudo raspi-config nonint do_camera 0

This command is version-dependent. If it reports that the function is unavailable, use the current camera stack and its test tools instead of trying to add an old configuration manually.

Disable camera support

To disable the legacy setting, reopen the utility:

  1. Run sudo raspi-config.
  2. Return to the same camera-related option.
  3. Choose Disable and accept the confirmation.
  4. Restart the Raspberry Pi if the utility requests it, or run sudo reboot.

Disabling may be useful while troubleshooting, when removing unused legacy configuration, or when the camera is no longer installed. It does not disable an ordinary USB webcam, because that device follows a separate driver path.

Legacy camera settings and GPU memory

The GPU, or Graphics Processing Unit, handles graphics work. The GPU memory split is the division of the Raspberry Pi's memory between the CPU and GPU.

On older Raspberry Pi OS camera configurations, enabling the legacy camera stack reserved a minimum of 128 MB for the GPU. That memory could be used for graphics and camera processing but was unavailable to normal applications. The trade-off could reduce the memory available to desktop programs, servers, or other workloads.

This behavior belongs to the legacy camera stack. Current Raspberry Pi OS releases generally use libcamera, and the old Camera option may be absent or unnecessary. Do not change GPU memory settings simply because an old tutorial mentions them; first identify the operating system generation and camera software in use.

Modern Raspberry Pi OS and libcamera

libcamera is the modern Linux camera software stack used by current Raspberry Pi OS releases. The command-line applications supplied for Raspberry Pi cameras are commonly provided by rpicam-apps.

On a current release, a supported CSI camera may be detected automatically after it is connected correctly. The absence of a legacy Camera menu entry in raspi-config is therefore not proof that camera support is disabled. Use a camera application to verify operation.

Verify the camera after reboot

Run a preview test

On current systems, run:

rpicam-hello

This opens a short camera preview and reports whether a camera is available. Some releases use the older equivalent name:

libcamera-hello

A successful detection means the software can find and initialize the camera. It is useful evidence that the CSI connection and driver are working, but it is not the same as proving that an image was saved successfully.

Capture a still image

Test an actual capture with:

rpicam-still -o image.jpg

On some releases, the older equivalent is:

libcamera-still -o image.jpg

A successful command should create image.jpg in the current directory. Locate that file with your file manager or terminal and open it. A saved, viewable image confirms both camera initialization and image capture; a preview alone confirms less.

Camera configuration differences by Raspberry Pi OS generation

System generationCamera enablement approachTypical verification toolGPU memory considerations
Older legacy systemsEnable or disable the Camera option in raspi-config.Legacy camera applications, or the tools supplied by that release.Enabling camera support historically reserved at least 128 MB for the GPU.
Current systemsUse the libcamera stack; a manual Camera option may not be present or needed.rpicam-hello and rpicam-still; some releases use the libcamera- names.The old legacy GPU memory reservation is generally not the enablement method.

Troubleshoot a camera that is not detected

SymptomLikely causeCheck or corrective actionExpected result
The Camera option is missing.The system uses the modern libcamera stack.Run rpicam-hello or rpicam-still, and verify the physical connection.A supported, correctly connected camera is detected without the old menu.
No cameras are available.The ribbon cable is loose, reversed, in the wrong connector, or incompatible.Power off, reseat both ends, check orientation and the CSI port, then boot and retry.The camera appears in the test application's detected-camera list.
The camera was enabled but does not work immediately.The configuration requires a restart.Run sudo reboot, then repeat the test.The new configuration is loaded after boot.
Applications have less available memory after enabling an older setup.Legacy support reserved GPU memory.Check whether the workload needs the legacy stack and review memory settings cautiously.Memory allocation matches the graphics and application workload.
A USB webcam is not detected.The CSI Camera option does not configure USB webcams.Use USB video-device tools and USB webcam troubleshooting instead.The webcam is handled through its USB video driver.
The camera works on one OS image but not another.The operating system or firmware may lack support for the camera model.Update Raspberry Pi OS and firmware where appropriate, and confirm model compatibility.The installed software supports the camera hardware.

Inspect boot and kernel messages

When a CSI camera is still missing, inspect messages related to the camera, connector, or common sensor driver names:

dmesg | grep -iE 'camera|csi|imx|ov'

The exact driver name depends on the camera sensor. Messages about a failed sensor probe, an unavailable device, or a CSI error can support a hardware or compatibility diagnosis, while no useful message does not rule out a cable problem.

Practical workflows

Legacy camera configuration

  1. Power off the Raspberry Pi and connect the camera to the correct CSI connector.
  2. Boot Raspberry Pi OS and run sudo raspi-config.
  3. Locate the version-dependent camera setting and select Enable.
  4. Accept the prompt, finish the utility, and run sudo reboot.
  5. Run an available preview or still-capture tool and check the result.

Current Raspberry Pi OS with no Camera menu

  1. Power off the Pi and verify cable seating, orientation, connector choice, and compatibility.
  2. Boot the system without trying to add a legacy setting.
  3. Run rpicam-hello, or use libcamera-hello if that is the command supplied by the release.
  4. Run rpicam-still -o image.jpg or its libcamera-still equivalent.
  5. Interpret a successful preview and saved image as evidence that no legacy enable step was needed.

Resolve a camera-not-detected result

  1. Power down the Raspberry Pi and disconnect power.
  2. Reseat the ribbon cable at the camera and board ends.
  3. Verify the contacts face the correct direction and that the latch is closed.
  4. Ensure the cable is in the CSI camera connector, not a display connector.
  5. Confirm the camera and cable are compatible, then update Raspberry Pi OS if necessary.
  6. Boot, retry the rpicam or libcamera test, and inspect dmesg messages if detection still fails.

Exam-relevant notes

  • raspi-config is a text-based Raspberry Pi OS configuration utility that can expose command-line options as well as menus.
  • CSI is the dedicated camera interface; it is different from USB.
  • Legacy camera enablement normally requires a reboot.
  • The historical legacy configuration reserved at least 128 MB of GPU memory.
  • Current Raspberry Pi OS commonly uses libcamera and rpicam-apps, so the old Camera menu may be absent.
  • Detection and capture are different tests: a camera can be detected yet fail during image capture because of configuration, permissions, or application errors.

For related terminal and Raspberry Pi configuration skills, see Raspi-config, Terminal In Raspbian, Record Pictures And Videos, and Memory Split Option.