Can't capture from Logitech webcam on Ubuntu server
by bomberb17 from LinuxQuestions.org on (#6KBHZ)
I am running an Ubuntu server 22.04 VM on an esxi host. I have connected my logitech webcam and passed it through to the VM. I have tried multiple programs to capture an image or audio from it but none of them work. The webcam seems to be correctly recognized from the system:
Code:$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 006: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 007: ID 046d:0807 Logitech, Inc. Webcam B500
Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ sudo v4l2-ctl --list-devices
UVC Camera (046d:0807) (usb-0000:02:01.0-2):
/dev/video0
/dev/video1
/dev/media0
$ ls -l /dev/video*
crw-rw-rw- 1 root video 81, 0 Mar 14 00:21 /dev/video0
crw-rw-rw- 1 root video 81, 1 Mar 14 00:21 /dev/video1
$ sudo v4l2-compliance
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t
Compliance test for uvcvideo device /dev/video0:
Driver Info:
Driver name : uvcvideo
Card type : UVC Camera (046d:0807)
Bus info : usb-0000:02:01.0-2
Driver version : 5.15.143
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : UVC Camera (046d:0807)
Serial : 4AD5F860
Bus info : usb-0000:02:01.0-2
Media version : 5.15.143
Hardware revision: 0x00000009 (9)
Driver version : 5.15.143
Interface Info:
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : UVC Camera (046d:0807)
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000022: from remote pad 0x100000a of entity 'Extension 4' (Video Pixel Formatter): Data, Enabled, Immutable
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
test invalid ioctls: OK
Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
fail: v4l2-test-controls.cpp(489): s_ctrl returned an error (13)
test VIDIOC_G/S_CTRL: FAIL
fail: v4l2-test-controls.cpp(736): s_ext_ctrls returned an error (13)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 15 Private Controls: 0
Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
warn: v4l2-test-formats.cpp(1036): Could not set fmt2
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)
Total for uvcvideo device /dev/video0: 46, Succeeded: 44, Failed: 2, Warnings: 1However the issues are:
Code:$ sudo v4l2-ctl -d 0 --get-standard
VIDIOC_G_STD: failed: Inappropriate ioctl for deviceCode:$ sudo guvcview
GUVCVIEW: version 2.0.7
GUVCVIEW: couldn't open /root/.config/guvcview2/video0 for read: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
...
V4L2_CORE: Could not grab image (select timeout): Inappropriate ioctl for devicezoneminder:
Code:Mar 14 01:07:50 ubnt-srv zmdc[12296]: WAR ['zmc -d /dev/video0' has not stopped at 24/03/14 01:07:50 after 10 seconds. Sending KILL to pid 15199]
Mar 14 01:07:55 ubnt-srv zmc_dvideo0[15305]: ERR [zmc_dvideo0] [Failed to set video standard 1: 25 Inappropriate ioctl for device]
Mar 14 01:07:55 ubnt-srv zmc_dvideo0[15305]: WAR [zmc_dvideo0] [Hue control is not supported]Code:$ fswebcam -r 640x480 --jpeg 85 -D 1 web-cam-shot.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Delaying 1 seconds.
--- Capturing frame...
Timed out waiting for frame!
No frames captured.Basically nothing works, and I dont know what this "Inappropriate ioctl for device" error means which some programs output. Searching online couldn't find any helpful information.. Any ideas?
Code:$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 006: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 007: ID 046d:0807 Logitech, Inc. Webcam B500
Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ sudo v4l2-ctl --list-devices
UVC Camera (046d:0807) (usb-0000:02:01.0-2):
/dev/video0
/dev/video1
/dev/media0
$ ls -l /dev/video*
crw-rw-rw- 1 root video 81, 0 Mar 14 00:21 /dev/video0
crw-rw-rw- 1 root video 81, 1 Mar 14 00:21 /dev/video1
$ sudo v4l2-compliance
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t
Compliance test for uvcvideo device /dev/video0:
Driver Info:
Driver name : uvcvideo
Card type : UVC Camera (046d:0807)
Bus info : usb-0000:02:01.0-2
Driver version : 5.15.143
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : UVC Camera (046d:0807)
Serial : 4AD5F860
Bus info : usb-0000:02:01.0-2
Media version : 5.15.143
Hardware revision: 0x00000009 (9)
Driver version : 5.15.143
Interface Info:
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : UVC Camera (046d:0807)
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000022: from remote pad 0x100000a of entity 'Extension 4' (Video Pixel Formatter): Data, Enabled, Immutable
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
test invalid ioctls: OK
Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
fail: v4l2-test-controls.cpp(489): s_ctrl returned an error (13)
test VIDIOC_G/S_CTRL: FAIL
fail: v4l2-test-controls.cpp(736): s_ext_ctrls returned an error (13)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 15 Private Controls: 0
Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
warn: v4l2-test-formats.cpp(1036): Could not set fmt2
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)
Total for uvcvideo device /dev/video0: 46, Succeeded: 44, Failed: 2, Warnings: 1However the issues are:
Code:$ sudo v4l2-ctl -d 0 --get-standard
VIDIOC_G_STD: failed: Inappropriate ioctl for deviceCode:$ sudo guvcview
GUVCVIEW: version 2.0.7
GUVCVIEW: couldn't open /root/.config/guvcview2/video0 for read: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
...
V4L2_CORE: Could not grab image (select timeout): Inappropriate ioctl for devicezoneminder:
Code:Mar 14 01:07:50 ubnt-srv zmdc[12296]: WAR ['zmc -d /dev/video0' has not stopped at 24/03/14 01:07:50 after 10 seconds. Sending KILL to pid 15199]
Mar 14 01:07:55 ubnt-srv zmc_dvideo0[15305]: ERR [zmc_dvideo0] [Failed to set video standard 1: 25 Inappropriate ioctl for device]
Mar 14 01:07:55 ubnt-srv zmc_dvideo0[15305]: WAR [zmc_dvideo0] [Hue control is not supported]Code:$ fswebcam -r 640x480 --jpeg 85 -D 1 web-cam-shot.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Delaying 1 seconds.
--- Capturing frame...
Timed out waiting for frame!
No frames captured.Basically nothing works, and I dont know what this "Inappropriate ioctl for device" error means which some programs output. Searching online couldn't find any helpful information.. Any ideas?