4

I have added a camera to the raspberry but I get the following when trying to load the driver:

root@deadlock-desktop:~# modprobe bcm2835-v4l2
modprobe: ERROR: could not insert 'bcm2835_v4l2': Operation not permitted

I also tried this:

root@deadlock-desktop:~# modprobe bcm2835-v4l2 gst_v4l2src_is_broken=1 debug=1 -vv
modprobe: INFO: ../libkmod/libkmod.c:354 kmod_set_log_fn() custom logging function 0x76ef6ac9 registered
insmod /lib/modules/3.18.0-20-rpi2/kernel/drivers/media/platform/bcm2835/bcm2835-v4l2.ko gst_v4l2src_is_broken=1 debug=1
modprobe: INFO: ../libkmod/libkmod-module.c:868 kmod_module_insert_module() Failed to insert module '/lib/modules/3.18.0-20-rpi2/kernel/drivers/media/platform/bcm2835/bcm2835-v4l2.ko': Operation not permitted
modprobe: ERROR: could not insert 'bcm2835_v4l2': Operation not permitted
modprobe: INFO: ../libkmod/libkmod.c:321 kmod_unref() context 0x78ab6130 released

This is the output from dmesg:

root@deadlock-desktop:~# dmesg
[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.18.0-20-rpi2 (buildd@lgw01-09) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) ) #21-Ubuntu SMP PREEMPT Sun Apr 5 01:56:02 UTC 2015 (Ubuntu 3.18.0-20.21-rpi2 3.18.11)
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: BCM2709
[    0.000000] cma: Reserved 8 MiB at 0x3a800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 241664
[    0.000000] free_area_init_node: node 0, pgdat 8095cc40, node_mem_map ba093000
[    0.000000]   Normal zone: 1888 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 241664 pages, LIFO batch:31
[    0.000000] [bcm2709_smp_init_cpus] enter (85c0->f3003010)
[    0.000000] [bcm2709_smp_init_cpus] ncores=4
[    0.000000] PERCPU: Embedded 11 pages/cpu @ba062000 s12928 r8192 d23936 u45056
[    0.000000] pcpu-alloc: s12928 r8192 d23936 u45056 alloc=11*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 239776
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2709.boardrev=0xa01041 bcm2709.serial=0x5ef6b251 smsc95xx.macaddr=B8:27:EB:F6:B2:51 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 elevator=deadline rootwait
*snip*
[ 2125.330226] : bcm2835-v4l2: error -1 while loading driver

I also tried upgrading the Raspberry firmware but still no success:

root@deadlock-desktop:~# sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10185  100 10185    0     0  49668      0 --:--:-- --:--:-- --:--:-- 49926
root@deadlock-desktop:~# rpi-update 
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10185  100 10185    0     0  54160      0 --:--:-- --:--:-- --:--:-- 54175
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Backing up modules 3.18.0-20-rpi2
#############################################################
WARNING: This update bumps to rpi-4.0.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753
##############################################################
Would you like to proceed? (y/N)
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    334      0 --:--:-- --:--:-- --:--:--   334
100 46.7M  100 46.7M    0     0  2525k      0  0:00:18  0:00:18 --:--:-- 1679k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 4.0.6+
 *** depmod 4.0.6-v7+
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to a51e2e072f2c349b40887dbdb8029f9a78c01987
 *** A reboot is needed to activate the new firmware
root@deadlock-desktop:~# reboot
  • I would comment but don't have the reputation yet. Did you enable the camera through raspi-config? Did you check the blacklist at /etc/modprobe.d/raspi-blacklist.conf to make sure it is not there? – ifermon Jun 24 '15 at 14:22
  • Stupid question, but did you try running sudo modprobe bcm2835-v4l2? – RPiAwesomeness Jun 24 '15 at 14:27
  • @RPiAwesomeness Yes that is the first line in my question :) – www.jensolsson.se Jun 24 '15 at 14:29
  • /etc/modprobe.d/raspi-blacklist.conf is empty. Since I am using Ubuntu raspi-config is not available. Dont know if there is a way to install it but if I try to install one of the .deb packages it says package architecture (armel) does not match system (armhf) – www.jensolsson.se Jun 24 '15 at 14:30
  • I mis-read it, didn't see you were root. My bad. Might be worth trying just running sudo modprobe bcm2835-v4l2 as the pi user though - computers can be strange about things like that sometimes. – RPiAwesomeness Jun 24 '15 at 14:32
4

Seem like I found the answer.

It is possible in Ubuntu to add the following lines:

start_x=1
gpu_mem=128

to /boot/firmware/config to manually enable the camera. After this the modprobe command works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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