Ubuntu 20.04.1 上的内置摄像头无法使用

Ubuntu 20.04.1 上的内置摄像头无法使用

自从 Ubuntu 16 以来,我一直有这个持续存在的问题...我的笔记本电脑上的摄像头无法工作。

我已经遇到这个问题四年了,我尝试了谷歌的所有解决方案,并定期检查是否有任何新的解决方案。但都没有用!!

我目前有一个全新安装的 Ubuntu 20.04.1 我的笔记本电脑是联想 ideapad,相机是 Easycamera

  • cheese 说“播放网络摄像头的视频时出错” -

    "Failed to allocate required memory.: gstv4l2src.c(660): gst_v4l2src_decide_allocation (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin20/GstV4l2Src:v4l2src3: Buffer pool activation failed"

  • vlc 说"v4l2 demux error: cannot start streaming: Protocol error"

  • 在黑屏时缩放会滞后。

当我尝试使用相机时,我还看到相机旁边的 LED 灯闪烁,但没有看到图像。相机正在运行并且有效。

一些常规输出:

  • 须藤lshw
  • lsmod | grep uvcvideo
  • v4l2-ctl --列表设备
  • ls-ltrh/dev/video*
  • 消息 | grep -i 相机
  • 消息 | grep -i 1-5
  • sudo v4l2-ctl -d /dev/video1 --all
  • sudo v4l2-合规性-d / dev / video1
$ sudo lshw

*-usb:2
                   description: Video
                   product: EasyCamera
                   vendor: AzureWave
                   physical id: 5
                   bus info: usb@1:5
                   version: 16.04
                   serial: 0001
                   capabilities: usb-2.00
                   configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
$ lsmod | grep uvcvideo
uvcvideo               98304  0
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_common       53248  2 videobuf2_v4l2,uvcvideo
videodev              237568  4 videobuf2_v4l2,v4l2loopback_dc,uvcvideo,videobuf2_common
mc                     57344  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common

因为我的相机无法工作,所以我正在通过手机相机使用Droidcam......

$ v4l2-ctl --list-devices
Droidcam (platform:v4l2loopback_dc-000):
    /dev/video0

EasyCamera: EasyCamera (usb-0000:00:14.0-5):
    /dev/video1
    /dev/video2
ls -ltrh /dev/video*
crw-rw----+ 1 root video 81, 0 Jan  9 21:02 /dev/video0
crw-rw----+ 1 root video 81, 2 Jan  9 21:02 /dev/video2
crw-rw----+ 1 root video 81, 1 Jan  9 21:02 /dev/video1
When i start my computer this is the output
$ dmesg | grep -i camera
[    2.029718] usb 1-5: Product: EasyCamera
[    2.729222] uvcvideo: Found UVC 1.00 device EasyCamera (13d3:5673)
[    2.734513] input: EasyCamera: EasyCamera as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input10

$ dmesg | grep -i 1-5
[    1.839392] usb 1-5: new high-speed USB device number 4 using xhci_hcd
[    2.029707] usb 1-5: New USB device found, idVendor=13d3, idProduct=5673, bcdDevice=16.04
[    2.029717] usb 1-5: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    2.029718] usb 1-5: Product: EasyCamera
[    2.029720] usb 1-5: Manufacturer: AzureWave
[    2.029721] usb 1-5: SerialNumber: 0001
[    2.734513] input: EasyCamera: EasyCamera as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input10
[  488.765312] usb 1-5: USB disconnect, device number 4
[  489.148174] usb 1-5: new high-speed USB device number 6 using xhci_hcd
[  489.342853] usb 1-5: New USB device found, idVendor=13d3, idProduct=5673, bcdDevice=16.04
[  489.342856] usb 1-5: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[  489.342859] usb 1-5: Product: EasyCamera
[  489.342861] usb 1-5: Manufacturer: AzureWave
[  489.342863] usb 1-5: SerialNumber: 0001

但在我尝试使用我的相机后,我得到了重复的输出(也许这是一个线索):

 dmesg | grep -i camera
[    2.029718] usb 1-5: Product: EasyCamera
[    2.729222] uvcvideo: Found UVC 1.00 device EasyCamera (13d3:5673)
[    2.734513] input: EasyCamera: EasyCamera as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input10
[  489.342859] usb 1-5: Product: EasyCamera
[  489.348052] uvcvideo: Found UVC 1.00 device EasyCamera (13d3:5673)
[  489.353594] input: EasyCamera: EasyCamera as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input20
[  526.011437] usb 1-5: Product: EasyCamera
[  526.018596] uvcvideo: Found UVC 1.00 device EasyCamera (13d3:5673)
[  526.024153] input: EasyCamera: EasyCamera as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input21
[  576.650603] usb 1-5: Product: EasyCamera
[  576.654826] uvcvideo: Found UVC 1.00 device EasyCamera (13d3:5673)
[  576.662541] input: EasyCamera: EasyCamera as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input22
[  582.143837] usb 1-5: Product: EasyCamera
[  582.148263] uvcvideo: Found UVC 1.00 device EasyCamera (13d3:5673)
[  582.154765] input: EasyCamera: EasyCamera as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input23
$ sudo v4l2-ctl -d /dev/video1 --all
Driver Info:
    Driver name      : uvcvideo
    Card type        : EasyCamera: EasyCamera
    Bus info         : usb-0000:00:14.0-5
    Driver version   : 5.8.18
    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            : EasyCamera: EasyCamera
    Serial           : 0001
    Bus info         : usb-0000:00:14.0-5
    Media version    : 5.8.18
    Hardware revision: 0x00001604 (5636)
    Driver version   : 5.8.18
Interface Info:
    ID               : 0x03000002
    Type             : V4L Video
Entity Info:
    ID               : 0x00000001 (1)
    Name             : EasyCamera: EasyCamera
    Function         : V4L2 I/O
    Flags         : default
    Pad 0x01000007   : 0: Sink
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
    Width/Height      : 1280/720
    Pixel Format      : 'MJPG' (Motion-JPEG)
    Field             : None
    Bytes per Line    : 0
    Size Image        : 1843200
    Colorspace        : sRGB
    Transfer Function : Default (maps to sRGB)
    YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization      : Default (maps to Full Range)
    Flags             : 
Crop Capability Video Capture:
    Bounds      : Left 0, Top 0, Width 1280, Height 720
    Default     : Left 0, Top 0, Width 1280, Height 720
    Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1280, Height 720, Flags: 
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1280, Height 720, Flags: 
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 30.000 (30/1)
    Read buffers     : 0
                     brightness 0x00980900 (int)    : min=0 max=100 step=1 default=50 value=50
                       contrast 0x00980901 (int)    : min=0 max=100 step=1 default=50 value=50
                     saturation 0x00980902 (int)    : min=0 max=100 step=1 default=50 value=50
                            hue 0x00980903 (int)    : min=0 max=100 step=1 default=50 value=50
 white_balance_temperature_auto 0x0098090c (bool)   : default=1 value=1
                          gamma 0x00980910 (int)    : min=0 max=100 step=1 default=50 value=50
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=1 value=1
                0: Disabled
                1: 50 Hz
                2: 60 Hz
      white_balance_temperature 0x0098091a (int)    : min=2500 max=6500 step=10 default=4500 value=4500 flags=inactive
                      sharpness 0x0098091b (int)    : min=0 max=100 step=1 default=50 value=50
         backlight_compensation 0x0098091c (int)    : min=0 max=2 step=1 default=0 value=0
         exposure_auto_priority 0x009a0903 (bool)   : default=0 value=1
$ sudo v4l2-compliance -d /dev/video1 
v4l2-compliance SHA: not available, 64 bits

Compliance test for uvcvideo device /dev/video1:

Driver Info:
    Driver name      : uvcvideo
    Card type        : EasyCamera: EasyCamera
    Bus info         : usb-0000:00:14.0-5
    Driver version   : 5.8.18
    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            : EasyCamera: EasyCamera
    Serial           : 0001
    Bus info         : usb-0000:00:14.0-5
    Media version    : 5.8.18
    Hardware revision: 0x00001604 (5636)
    Driver version   : 5.8.18
Interface Info:
    ID               : 0x03000002
    Type             : V4L Video
Entity Info:
    ID               : 0x00000001 (1)
    Name             : EasyCamera: EasyCamera
    Function         : V4L2 I/O
    Flags         : default
    Pad 0x01000007   : 0: Sink

Required ioctls:
    test MC information (see 'Media Driver Info' above): OK
    test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
    test second /dev/video1 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):
        fail: v4l2-test-controls.cpp(216): missing control class for class 00980000
        fail: v4l2-test-controls.cpp(253): missing control class for class 009a0000
    test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
    test VIDIOC_QUERYCTRL: OK
        warn: v4l2-test-controls.cpp(442): s_ctrl returned EILSEQ
    test VIDIOC_G/S_CTRL: OK
        warn: v4l2-test-controls.cpp(691): s_ext_ctrls returned EILSEQ
        warn: v4l2-test-controls.cpp(715): g_ext_ctrls(0) invalid error_idx 0
        warn: v4l2-test-controls.cpp(766): s_ext_ctrls returned EILSEQ
        warn: v4l2-test-controls.cpp(782): error_idx should be equal to count
        warn: v4l2-test-controls.cpp(803): error_idx should be equal to count
        fail: v4l2-test-controls.cpp(808): doioctl(node, VIDIOC_G_EXT_CTRLS, &ctrls)
    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: 11 Private Controls: 0

Format ioctls (Input 0):
    test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
        warn: v4l2-test-formats.cpp(1327): S_PARM is supported but doesn't report V4L2_CAP_TIMEPERFRAME
        fail: v4l2-test-formats.cpp(1229): node->has_frmintervals && !cap->capability
    test VIDIOC_G/S_PARM: FAIL
    test VIDIOC_G_FBUF: OK (Not Supported)
    test VIDIOC_G_FMT: OK
    test VIDIOC_TRY_FMT: OK
        warn: v4l2-test-formats.cpp(976): 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
        fail: v4l2-test-buffers.cpp(1833): ret != EINVAL && ret != EBADR && ret != ENOTTY
    test Requests: FAIL

Total for uvcvideo device /dev/video1: 45, Succeeded: 41, Failed: 4, Warnings: 8

我可以提供更多必要的信息。

感谢任何指点或解决方案。

相关内容