RaspberryPi Camera not detected – Ubuntu 20.04.5 LTS

Hi everyone,

I ran into a bit of an issue with a RaspberryPi 4 running Ubuntu 20.04.5 this morning. Running vcgencmd get_camera should have returned supported=1 detected=1 but instead I was getting supported=0 detected=0.

This was a bit of a hard one to track down with Google but I eventually came across a stackoverflow post suggesting the following:

  • Run sudo nano /boot/firmware/config.txt
  • Add start_x=1 at the end
  • Reboot

Check out this post for more info: https://askubuntu.com/a/1244259/770194.

If you’re using a new camera you may also run into this error:

mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Only 76M of gpu_mem is configured. Try running "sudo raspi-config" and ensure that "memory_split" has a value of 128 or greater

The fix for this one is to simply append another line to /boot/firmware/config.txt. All you’ll need is gpu_mem=128.

Another issue you might run into is VHCI initialization failed. Generally, that just means you need to add your current user to the video group.

# Check your current user's groups.
groups

# Add your user to the video group.
sudo usermod -aG video <username>

Once you’ve added the group, rebooting should be enough to get past that error.

Advertisement

Posted

in

,

by

Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

%d bloggers like this: