lustmue
Posts: 1
Joined: Sat May 08, 2021 8:50 pm

Raspberry camera: Failed to export DMABUF: Inappropriate ioctl for device

Sat May 08, 2021 9:36 pm

Hello all,

We've got a Raspberry Pi 4 Model B Rev 1.4. Works fine.
We've purchased a Raspberry Camera V2.1. Works fine with raspistill and raspivid.
But the camera doesn't work as a webcam in the Chrome browser.

As I have no idea how to debug the Chrome browser, I've looked at gstreamer which doesn't work neither: For a short time (less than a second), an image appears on the screen, but then the pipeline stops:

Code: Select all

lutz@raspberrypi:~ $ GST_DEBUG="v4l2*:1" gst-launch-1.0 -v -m v4l2src ! xvimagesink
(...)

Code: Select all

0:00:01.158235277  2737  0x126acc0 ERROR          v4l2allocator gstv4l2allocator.c:906:gst_v4l2_allocator_alloc_dmabuf:<v4l2src0:pool:src:allocator> Failed to export DMABUF: Inappropriate ioctl for device
0:00:01.158293869  2737  0x126acc0 ERROR         v4l2bufferpool gstv4l2bufferpool.c:479:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool:src> failed to allocate buffer
0:00:01.158325442  2737  0x126acc0 ERROR         v4l2bufferpool gstv4l2bufferpool.c:901:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> allocate failed
(...)

On viewtopic.php?t=243100, there's a mention that the camera's driver for v4l2 (bcm2835-v4l2) doesn't support dmabufs. Is this still the case? Can we contribute somehow to improve this driver?

We need a webcam for home-schooling purposes. Is there a way to get it working in Chrome? Or do I need to scrap the Raspberry camera and purchase some USB webcam?

Detailed information on our Raspberry hardware below.
Thanks in advance for any pointers to a solution to our problem.

Regards
Lutz

Code: Select all

lutz@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux


lutz@raspberrypi:~ $ cat /proc/cpuinfo
processor	: 0
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 1
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 2
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 3
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

Hardware	: BCM2711
Revision	: d03114
Serial		: 10000000419b0874
Model		: Raspberry Pi 4 Model B Rev 1.4

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11278
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry camera: Failed to export DMABUF: Inappropriate ioctl for device

Sun May 09, 2021 5:39 pm

https://github.com/raspberrypi/linux/pull/4220
Merged 7th April, so you need 5.10.27 or newer.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Graphics, sound and multimedia”