Can't modprobe bcm2835-v4l2 to use RPi2 camera module

Bug #1532217 reported by Chris J Arges
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi2 (Ubuntu)
New
Undecided
Paolo Pisati

Bug Description

I have the RPi camera module for my RPi2, and I'm using the following kernel:
ubuntu@raspi2:~$ uname -a
Linux raspi2 4.3.0-1006-raspi2 #6-Ubuntu SMP Tue Dec 8 03:45:57 UTC 2015 armv7l armv7l armv7l GNU/Linux

I tried to modprobe the camera and got the following:
ubuntu@raspi2:~$ sudo modprobe bcm2835-v4l2
modprobe: ERROR: could not insert 'bcm2835_v4l2': Operation not permitted

dmesg shows:
[ 48.302953] media: Linux media interface: v0.10
[ 48.365596] Linux video capture interface: v2.00
[ 48.455186] : bcm2835-v4l2: error -1 while loading driver

If I use raspi-config to enable the camera I get the following error:
    Your firmware appears to be out of date (no start_x.elf). Please update

Revision history for this message
Paolo Pisati (p-pisati) wrote :

Edit /boot/firmware/config.txt (or wherever you mounted the vfat boot partition) and comment out these lines:

#dtparam=i2c_arm=on
#dtparam=i2c_vc=on

and add these:

gpu_mem=128
start_x=1

Reboot the board, and install:

apt-get install libraspberrypi-bin libraspberrypi-dev

Then, if the camera module is correctly connected you should be able to snap a picture with:

sudo raspistill -o foobar.jpg

To avoid using 'sudo' everytime, the default user should be added to the video group.

Revision history for this message
Chris J Arges (arges) wrote :

This still does not work for me. I did a clean dd of the ubuntu-embedded image, and followed the above steps and it did not work. I was unable to get a a snapshot using raspistill. Nor was I able to use raspi-config to 'enable camera'.
$ sudo raspistill -o foobar.jpg
mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board

However after doing the following:
sudo modprobe bcm2835-v4l2
I was able to get a /dev/video0, but I can't seem to grab a frame from that device, I tried to grab using mplayer but it just shows a green screen.

Revision history for this message
Paolo Pisati (p-pisati) wrote :

Chris, i just tested it on a clean system:

1) download and dd on a sd card this image: http://people.canonical.com/~ppisati/ubuntu_embedded/ubuntu-embedded-16.04-raspi2.img.xz
2) sudo apt-get update
3) sudo apt-get install libraspberrypi-bin libraspberrypi-dev
4) modify /boot/firmware/config.txt, and comment out these two lines:

#dtparam=i2c_arm=on
#dtparam=i2c_vc=on

and append these at the end:

gpu_mem=128
start_x=1

5) reboot
6) sudo raspistill -o foobar.jpg

It works.

If it still doesn't work for you, i think you might have a setup problem - can you try your board with the raspbian image?

https://downloads.raspberrypi.org/raspbian_latest

Do not use raspi-config with our image: it's a tool tailored for the raspbian image (we don't mount stuff in the same place, we don't have lua or whiptail, etc) and all it does when you enable the camera through it is to just modify config.txt as mentioned above.

Paolo Pisati (p-pisati)
Changed in linux-raspi2 (Ubuntu):
assignee: nobody → Paolo Pisati (p-pisati)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.