The Pi camera in my Pi Zero W stopped working. Possibly because /dev/video0
vanished. Can anyone say why?
In the meantime I have these three devices instead ..
pi@easy:~ $ ls -l /dev/video*
crw-rw---- 1 root video 81, 0 Oct 24 07:17 /dev/video10
crw-rw---- 1 root video 81, 1 Oct 24 07:17 /dev/video11
crw-rw---- 1 root video 81, 2 Oct 24 07:17 /dev/video12
I don't know what they're for. (does anyone?)
I am loading the bcm2835-v4l2
driver at boot time, my /etc/modules
is simple enough
i2c-dev
bcm2835-v4l2
The driver/module loads well enough, according to lsmod
pi@easy:~ $ sudo lsmod | grep bcm2835
snd_bcm2835 17068 0
snd_pcm 92916 1 snd_bcm2835
snd 63223 3 snd_timer,snd_bcm2835,snd_pcm
bcm2835_codec 28684 0
v4l2_mem2mem 18877 1 bcm2835_codec
videobuf2_dma_contig 10303 1 bcm2835_codec
bcm2835_v4l2 35910 0
bcm2835_mmal_vchiq 20644 2 bcm2835_codec,bcm2835_v4l2
vc_sm_cma 25091 1 bcm2835_mmal_vchiq
v4l2_common 7385 1 bcm2835_v4l2
videobuf2_vmalloc 6084 1 bcm2835_v4l2
videobuf2_v4l2 16373 3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common 37369 4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
videodev 182789 6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
and calling sudo modprobe bcm2835-v4l2
has an exit code of 0, and doesn't change the output of lsmod
.
This is everything dmsg
has to say about bcm2835
pi@easy:~ $ dmesg | grep bcm2835
[ 0.000202] bcm2835: system timer (irq = 27)
[ 0.093961] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[ 0.138816] bcm2835-dma 20007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1
[ 0.359298] bcm2835-rng 20104000.rng: hwrng registered
[ 0.361524] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
[ 0.833807] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 0.834308] bcm2835-cpufreq: min=700000 max=1000000
[ 0.835720] mmc-bcm2835 20300000.mmcnr: could not get clk, deferring probe
[ 0.836458] sdhost-bcm2835 20202000.mmc: could not get clk, deferring probe
[ 0.868215] mmc-bcm2835 20300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 0.868235] mmc-bcm2835 20300000.mmcnr: DMA channel allocated
[ 0.946792] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 5.237667] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 5.270823] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.298441] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 10.650795] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 10.698862] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 10.698885] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 10.709040] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 10.709062] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 10.720060] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 10.720081] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ 11.500167] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.652618] bcm2835_audio soc:audio: card created with 8 channels
bcm2835_v4l2
module withsudo modprobe bcm2835_v4l2
(or by adding it to /etc/modules).bcm2835-v4l2
at boot time via/etc/modules
.sudo lsmod
or reload it withsudo modprobe bcm2835-v4l2
.sudo rpi-update && sudo reboot
if the 4.19.85+ kernel doesn't fix it you've either got a hardware problem or gpu_mem isn't set to a high enough value. Try settinggpu_mem=128
andstart_x=1
in /boot/config.txt. Check the cable between the RPi and the camera. Runvcgencmd get_camera
to check the status.