LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   raspberry PI 2B camera: errors and camera test bumpy (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/raspberry-pi-2b-camera-errors-and-camera-test-bumpy-4175704093/)

floppy_stuttgart 11-25-2021 06:39 AM

raspberry PI 2B camera: errors and camera test bumpy
 
Hello,
I have uploaded the latest debian on my raspberry PI 2B.
The camera setup is difficult.

Errors at boot
(module loaded. fine)
1. motion conf filled but 1024x768 (as previous setup 2 years ago) claimed. Change to 1296x972 in motion.conf is claimed to be 1296x976 (wrong)
2. pipeline error; see below

Code:

[  14.889900] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[  15.268186] systemd[1]: Mounted Kernel Trace File System.
[  15.384287] systemd[1]: Finished Restore / save the current clock.
[  15.504331] systemd[1]: Finished Create list of static device nodes for the current kernel.
[  15.634168] systemd[1]: modprobe@configfs.service: Succeeded.
[  15.694464] systemd[1]: Finished Load Kernel Module configfs.
[  15.815190] systemd[1]: modprobe@drm.service: Succeeded.
[  15.877801] systemd[1]: Finished Load Kernel Module drm.
[  15.983785] systemd[1]: modprobe@fuse.service: Succeeded.
[  16.064361] systemd[1]: Finished Load Kernel Module fuse.
[  16.174646] systemd[1]: Finished File System Check on Root Device.
[  16.256057] systemd[1]: Finished Set the console keyboard layout.
[  16.334538] systemd[1]: Finished Load Kernel Modules.
[  16.419787] systemd[1]: Started Journal Service.
[  18.154402] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[  18.769434] systemd-journald[102]: Received client request to flush runtime journal.
[  25.408397] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[  25.465090] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[  25.473585] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[  25.477071] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[  25.495086] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[  25.506290] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[  25.506371] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[  25.506421] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[  25.506460] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[  25.506494] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[  25.520792] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[  25.575371] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[  25.575493] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[  25.587379] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[  25.587497] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[  25.616624] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[  25.616743] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[  25.645587] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[  25.645692] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[  27.038870] i2c i2c-11: Added multiplexed i2c bus 0
[  27.040210] i2c i2c-11: Added multiplexed i2c bus 10
[  30.627351] usbcore: registered new interface driver uas
[  30.757456] random: crng init done
[  30.757497] random: 7 urandom warning(s) missed due to ratelimiting
[  32.210118] checking generic (1e402000 7f8000) vs hw (0 ffffffff)
[  32.210164] fb0: switching to vc4drmfb from simple
[  32.464553] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  32.494627] Console: switching to colour dummy device 80x30
[  32.540094] vc4-drm soc:gpu: bound 20400000.hvs (ops vc4_hvs_ops [vc4])
[  32.627580] Registered IR keymap rc-cec
[  32.627985] rc rc0: vc4 as /devices/platform/soc/20902000.hdmi/rc/rc0
[  32.628420] input: vc4 as /devices/platform/soc/20902000.hdmi/rc/rc0/input3
[  32.630256] vc4_hdmi 20902000.hdmi: Could not register sound card: -517
[  35.772098] 8021q: 802.1Q VLAN Support v1.8
[  37.195546] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  37.849713] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[  38.098418] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  38.162973] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[  39.167781] SMSC LAN8700 usb-001:003:01: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=usb-001:003:01, irq=POLL)
[  39.185193] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[  39.199997] smsc95xx 1-1.1:1.0 eth0: Link is Down
[  40.615867] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[  40.677740] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
[  40.683680] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[  41.285740] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
[  41.285843] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  42.839994] ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net.ipv6.neigh.eth0.retrans_time - use net.ipv6.neigh.eth0.retrans_time_ms instead
[  49.550904] vc4-drm soc:gpu: bound 20400000.hvs (ops vc4_hvs_ops [vc4])
[  49.578852] Registered IR keymap rc-cec
[  49.579259] rc rc0: vc4 as /devices/platform/soc/20902000.hdmi/rc/rc0
[  49.579718] input: vc4 as /devices/platform/soc/20902000.hdmi/rc/rc0/input4
[  49.629212] vc4-drm soc:gpu: bound 20902000.hdmi (ops vc4_hdmi_ops [vc4])
[  49.630003] vc4-drm soc:gpu: bound 20806000.vec (ops vc4_vec_ops [vc4])
[  49.630816] vc4-drm soc:gpu: bound 20004000.txp (ops vc4_txp_ops [vc4])
[  49.631485] vc4-drm soc:gpu: bound 20206000.pixelvalve (ops vc4_crtc_ops [vc4])
[  49.632134] vc4-drm soc:gpu: bound 20207000.pixelvalve (ops vc4_crtc_ops [vc4])
[  49.632790] vc4-drm soc:gpu: bound 20807000.pixelvalve (ops vc4_crtc_ops [vc4])
[  49.633297] vc4-drm soc:gpu: bound 20c00000.v3d (ops vc4_v3d_ops [vc4])
[  49.682293] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[  49.813739] Console: switching to colour frame buffer device 240x67
[  49.856703] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[  50.878672] ov5647 10-0036: Consider updating driver ov5647 to match on endpoints
[  56.206356] unicam 20801000.csi: Wrong width or height 1024x768 (remote pad set to 1296x972)
[  56.206406] unicam 20801000.csi: Failed to start media pipeline: -22
[  189.876233] unicam 20801000.csi: Wrong width or height 1296x976 (remote pad set to 1296x972)
[  189.876282] unicam 20801000.csi: Failed to start media pipeline: -22


libcamera-hello
Quote:

[0:48:45.519938555] [687] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3156-f4070274
ERROR: *** no cameras available ***
vcgencmd get_camera
Quote:

supported=0 detected=0

Camera is on; red light can be seen.


Any idea what is happening there? Comments and remarks are welcome.
I am looking for any hardware issue. I ordered a new cable. Who knows..

baBBQ 11-29-2021 06:56 PM

Same issue
 
I'm having the same issue and not making much progress.

I've tried various config.txt settings in different combinations:
dtoverlay=ov5647
max_framebuffers=2
gpu_mem=128
dtoverlay=vc4-fkms-v3d
camera_auto_detect=1
disable_touchscreen=1

Code:

...
ov5647 10-0036: Consider updating driver ov5647 to match on endpoints
...
unicam 3f801000.csi: Wrong width or height 1920x1080 (remote pad set to 1296x972)
unicam 3f801000.csi: Failed to start media pipeline: -22
...

Code:

pi@raspberrypi:~ $ vcgencmd get_camera
supported=0 detected=0

Code:

pi@raspberrypi:~ $ v4l2-ctl --list-devices
unicam (platform:3f801000.csi):
        /dev/video0
        /dev/media2

bcm2835-codec-decode (platform:bcm2835-codec):
        /dev/video10
        /dev/video11
        /dev/video12
        /dev/video18
        /dev/media3

bcm2835-isp (platform:bcm2835-isp):
        /dev/video13
        /dev/video14
        /dev/video15
        /dev/video16
        /dev/video20
        /dev/video21
        /dev/video22
        /dev/video23
        /dev/media0
        /dev/media1

Code:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.81-v7+ #1492 SMP Fri Nov 26 21:42:08 GMT 2021 armv7l GNU/Linux

Code:

pi@raspberrypi:~ $ cat /boot/.firmware_revision
8a74f2a62979db8793ae7d5a1b6d8f29467e1c27

Code:

...
Hardware        : BCM2835
Revision        : 9020e0
Serial          : 00000000bfac740a
Model          : Raspberry Pi 3 Model A Plus Rev 1.0

Arducam 5MP Camera for Raspberry Pi, 1080P HD OV5647

ElTentakel 12-01-2021 10:57 AM

Same here on my Raspberry Pi Zero 2:

Code:

[  38.723666] unicam 3f801000.csi: Wrong width or height 3840x2160 (remote pad set to 3280x2464)
[  38.723683] unicam 3f801000.csi: Failed to start media pipeline: -22


Linux raspberrypi 5.10.82-v7+ #1493 SMP Wed Dec 1 11:35:18 GMT 2021 armv7l GNU/Linux


GST_DEBUG=2 gst-launch-1.0 v4l2src device=/dev/video0 ! fakesink
0:00:00.005094179  1263  0x1f31680 WARN        GST_PERFORMANCE gstbuffer.c:496:_priv_gst_buffer_initialize: No 64-bit atomic int defined for this platform/toolchain!
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.186320290  1263  0x2057038 WARN          v4l2bufferpool gstv4l2bufferpool.c:814:gst_v4l2_buffer_pool_start:<v4l2src0:pool0:src> Uncertain or not enough buffers, enabling copy threshold
0:00:00.187061906  1263  0x2057038 ERROR        v4l2bufferpool gstv4l2bufferpool.c:683:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool0:src> error with STREAMON 22 (Invalid argument)
0:00:00.187122323  1263  0x2057038 ERROR            bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<v4l2src0:pool0:src> start failed
0:00:00.187441386  1263  0x2057038 WARN                v4l2src gstv4l2src.c:659:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.
0:00:00.187490397  1263  0x2057038 WARN                v4l2src gstv4l2src.c:659:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../sys/v4l2/gstv4l2src.c(659): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
0:00:00.187903158  1263  0x2057038 WARN                basesrc gstbasesrc.c:3347:gst_base_src_prepare_allocation:<v4l2src0> Subclass failed to decide allocation
Execution ended after 0:00:00.061378948
Setting pipeline to NULL ...
0:00:00.188085867  1263  0x2057038 WARN                basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:00.188174617  1263  0x2057038 WARN                basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...


floppy_stuttgart 12-02-2021 09:54 AM

latest full update had an effect. Camera detected but still issue. See libcamera-hello and dmesg below.

Linux version 5.10.82+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1493 Wed Dec 1 11:33:04 GMT 2021

vcgencmd get_camera
Quote:

supported=1 detected=1
libcamera-hello
Quote:

Preview window unavailable
[0:06:25.469331287] [726] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3156-f4070274
ERROR: *** no cameras available ***
after
libcamera-vid -o testvideo.h264 -t 5000

dmesg show at the end
..
Quote:

[ 454.849431] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x93e00000
[ 454.850214] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x93e80000
[ 454.850731] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x93f00000
[ 454.851443] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x93f80000
[ 454.851924] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94000000
[ 454.852458] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94080000
[ 454.852954] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94100000
[ 454.853438] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94180000
[ 454.853913] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94200000
[ 454.854388] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94280000
[ 454.854861] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94300000
[ 454.855312] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94380000
sudo systemctl status gldriver-test.service
Quote:

gldriver-test.service - Check for v3d driver
Loaded: loaded (/lib/systemd/system/gldriver-test.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-12-02 18:00:00 CET; 24h ago
Process: 260 ExecStart=/usr/lib/systemd/scripts/gldriver_test.sh (code=exited, status=1/FAILURE)
Main PID: 260 (code=exited, status=1/FAILURE)
CPU: 99ms

Dez 02 17:59:56 raspcamera systemd[1]: Starting Check for v3d driver...
Dez 02 17:59:57 raspcamera gldriver_test.sh[279]: /usr/lib/systemd/scripts/gldriver_test.sh: Zeile 12: /usr/share/X11/xorg.conf.d/99-f>
Dez 02 18:00:00 raspcamera systemd[1]: gldriver-test.service: Main process exited, code=exited, status=1/FAILURE
Dez 02 18:00:00 raspcamera systemd[1]: gldriver-test.service: Failed with result 'exit-code'.
Dez 02 18:00:00 raspcamera systemd[1]: Failed to start Check for v3d driver.

floppy_stuttgart 12-11-2021 08:44 AM

Raspbian issue with the camera on PI B 2
 
Quote:

Originally Posted by ElTentakel (Post 6305811)
Same here on my Raspberry Pi Zero 2:

Should we perhaps move to another distro? (mine is latest raspbian).
Any other positive result from other distro is welcome.
(todays update to Linux version 5.10.83+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1499 Tue Dec 7 14:04:21 GMT 2021 did not make the issue going away)

ElTentakel 12-13-2021 04:32 AM

Here is another thread about this issue:

https://forums.raspberrypi.com/viewtopic.php?t=323308

floppy_stuttgart 12-14-2021 09:55 AM

Quote:

Originally Posted by ElTentakel (Post 6309093)
Here is another thread about this issue:

https://forums.raspberrypi.com/viewtopic.php?t=323308

did not work for me. looks like it was depreciated. However, thanks, I will observe the link you gave to me what happens there.

Linux version 5.10.63+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1488 Thu Nov 18 16:14:04 GMT 2021

at the end of dmesg
Quote:

[ 1333.843749] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94200000
[ 1333.844613] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94280000
[ 1333.845125] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94300000
[ 1333.851947] vc_sm_cma_import_dmabuf_internal: Expecting an uncached alias for dma_addr 0x94380000

floppy_stuttgart 01-17-2022 07:11 AM

1 Attachment(s)
Post showing perhaps a path for others stuck at a similar situation (not a confirmed solution for now; looks only better).

A new ordered 32GB SD card and
- formatting FAT32
- a fresh install of https://downloads.raspberrypi.org/ra...hf-2021-11-08/
- with later sudo apt install -y qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5
looks promising: the red light of the camera in ON the whole time where it was not previously.
A photo of the camera is attached.

(previous SD in the raspberry was an officiel 8GB SD from blackberry where raspbian was choosen/activated and upgraded to a bullseye version).

Update: STILL NOT WORKING.

ElTentakel 01-18-2022 04:49 AM

I just updated with apt and at least libcamera is working now. Gstreamer is not negotiating any pipeline and motion has also issues.


All times are GMT -5. The time now is 09:38 AM.