USB 摄像头不工作,被识别为键盘

USB 摄像头不工作,被识别为键盘

在运行 Fedora 34 的笔记本电脑上,检测到插入 USB UVC 摄像头,但将其识别为键盘。

cheese不将此相机视为输入设备,仅将内置网络摄像头视为输入设备。

如何才能正确检测到相机?

journalctl输出:

kernel: usb 2-2: new high-speed USB device number 5 using xhci_hcd
kernel: usb 2-2: New USB device found, idVendor=1a40, idProduct=0801, bcdDevice= 1.00
kernel: usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
kernel: usb 2-2: Product: USB 2.0 Hub
kernel: hub 2-2:1.0: USB hub found
kernel: hub 2-2:1.0: 4 ports detected
upowerd[1618]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2
kernel: usb 2-2.4: new high-speed USB device number 6 using xhci_hcd
kernel: usb 2-2.4: New USB device found, idVendor=2b16, idProduct=6689, bcdDevice= 6.19
kernel: usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 2-2.4: Product: DP 5M CAM
kernel: usb 2-2.4: Manufacturer: SunplusIT Inc
kernel: usb 2-2.4: SerialNumber: 01.00.00
kernel: uvcvideo: Found UVC 1.00 device DP 5M CAM (2b16:6689)
kernel: input: DP 5M CAM: DP 5M CAM as /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4/2-2.4:1.0/input/input22
mtp-probe[6920]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4"
mtp-probe[6920]: bus: 2, device: 6 was not an MTP device
/usr/libexec/gdm-x-session[2187]: (II) config/udev: Adding input device DP 5M CAM: DP 5M CAM (/dev/input/event19)
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "evdev keyboard catchall"
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "libinput keyboard catchall"
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "system-keyboard"
/usr/libexec/gdm-x-session[2187]: (II) Using input driver 'libinput' for 'DP 5M CAM: DP 5M CAM'
/usr/libexec/gdm-x-session[2187]: (II) systemd-logind: got fd for /dev/input/event19 13:83 fd 76 paused 0
/usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: always reports core events
/usr/libexec/gdm-x-session[2187]: (**) Option "Device" "/dev/input/event19"
/usr/libexec/gdm-x-session[2187]: (**) Option "_source" "server/udev"
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: is tagged by udev as: Keyboard
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device is a keyboard
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device removed
/usr/libexec/gdm-x-session[2187]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4/2-2.4:1.0/input/input22/event19"
/usr/libexec/gdm-x-session[2187]: (II) XINPUT: Adding extended input device "DP 5M CAM: DP 5M CAM" (type: KEYBOARD, id 16)
/usr/libexec/gdm-x-session[2187]: (**) Option "xkb_layout" "us,ca"
/usr/libexec/gdm-x-session[2187]: (**) Option "xkb_variant" ",multix"
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: is tagged by udev as: Keyboard
/usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device is a keyboard
mtp-probe[6952]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4"
mtp-probe[6952]: bus: 2, device: 6 was not an MTP device
/usr/libexec/gdm-x-session[6954]: The XKEYBOARD keymap compiler (xkbcomp) reports:
/usr/libexec/gdm-x-session[6954]: > Error:            Key <MDSW> added to map for multiple modifiers
/usr/libexec/gdm-x-session[6954]: >                   Using Mod3, ignoring Mod5.
/usr/libexec/gdm-x-session[6954]: > Warning:          Could not resolve keysym XF86FullScreen
/usr/libexec/gdm-x-session[6954]: Errors from xkbcomp are not fatal to the X server

lsusb -vv输出:

Bus 002 Device 010: ID 2b16:6689 SunplusIT Inc DP 5M CAM
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x2b16 
  idProduct          0x6689 
  bcdDevice            6.19
  iManufacturer           1 SunplusIT Inc
  iProduct                2 DP 5M CAM
  iSerial                 3 01.00.00
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x021f
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               4 DP 5M CAM
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              4 DP 5M CAM
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength       0x006d
        dwClockFrequency       48.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x0000000a
          Auto-Exposure Mode
          Exposure Time (Absolute)
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier      16384
        bControlSize            2
        bmControls     0x0000157f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0 
        bmVideoStandards     0x1d
          None
          PAL - 625/50
          SECAM - 625/50
          NTSC - 625/50
      VideoControl Interface Descriptor:
        bLength                29
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 3
        guidExtensionCode         {0fb885c3-68c2-4547-90f7-8f47579d95fc}
        bNumControls            5
        bNrInPins               1
        baSourceID( 0)          2
        bControlSize            4
        bmControls( 0)       0x1f
        bmControls( 1)       0x00
        bmControls( 2)       0x00
        bmControls( 3)       0x00
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                29
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {63610682-5070-49ab-b8cc-b3855e8d221d}
        bNumControls           25
        bNrInPins               1
        baSourceID( 0)          3
        bControlSize            4
        bmControls( 0)       0xff
        bmControls( 1)       0xff
        bmControls( 2)       0x77
        bmControls( 3)       0x07
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             5
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               4
        iTerminal               0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      VideoStreaming Interface Descriptor:
        bLength                            14
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         1
        wTotalLength                   0x00d3
        bEndPointAddress                  129
        bmInfo                              0
        bTerminalLink                       5
        bStillCaptureMethod                 1
        bTriggerSupport                     0
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                     4
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  6 (FORMAT_MJPEG)
        bFormatIndex                        1
        bNumFrameDescriptors                6
        bFlags                              1
          Fixed-size samples: Yes
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
        bCopyProtect                        0
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         1
        bmCapabilities                   0x01
          Still image supported
        wWidth                           1920
        wHeight                          1080
        dwMinBitRate                829440000
        dwMaxBitRate                829440000
        dwMaxVideoFrameBufferSize     4147200
        dwDefaultFrameInterval         400000
        bFrameIntervalType                  1
        dwFrameInterval( 0)            400000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         2
        bmCapabilities                   0x01
          Still image supported
        wWidth                           2592
        wHeight                          1944
        dwMinBitRate                1612431360
        dwMaxBitRate                1612431360
        dwMaxVideoFrameBufferSize    10077696
        dwDefaultFrameInterval         500000
        bFrameIntervalType                  1
        dwFrameInterval( 0)            500000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         3
        bmCapabilities                   0x01
          Still image supported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                368640000
        dwMaxBitRate                368640000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval         400000
        bFrameIntervalType                  1
        dwFrameInterval( 0)            400000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x01
          Still image supported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                122880000
        dwMaxBitRate                122880000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         400000
        bFrameIntervalType                  1
        dwFrameInterval( 0)            400000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         5
        bmCapabilities                   0x01
          Still image supported
        wWidth                           1600
        wHeight                          1200
        dwMinBitRate                768000000
        dwMaxBitRate                768000000
        dwMaxVideoFrameBufferSize     3840000
        dwDefaultFrameInterval         400000
        bFrameIntervalType                  1
        dwFrameInterval( 0)            400000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         6
        bmCapabilities                   0x01
          Still image supported
        wWidth                           2048
        wHeight                          1936
        dwMinBitRate                1268776960
        dwMaxBitRate                1268776960
        dwMaxVideoFrameBufferSize     7929856
        dwDefaultFrameInterval         500000
        bFrameIntervalType                  1
        dwFrameInterval( 0)            500000
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x00c0  1x 192 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0180  1x 384 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0280  1x 640 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0320  1x 800 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x03b0  1x 944 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       7
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0a80  2x 640 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       8
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0b20  2x 800 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       9
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0be0  2x 992 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting      10
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x13c0  3x 960 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting      11
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x13fc  3x 1020 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

答案1

我遇到了同样的错误,并且在 X11 配置中添加了几个忽略。

首先,使用命令检查凸轮是否被列为键盘xinput list,然后创建一个名为的文件/etc/X11/xorg.conf.d/00-fix-cam.conf(或任何扩展名为conf的文件名)

在里面添加这些行:

Section "InputClass"
    Identifier "none"
    MatchVendor "Chicony USB2.0 Camera: Chicony"
    Option "Ignore" "true"
EndSection

Section "InputClass"
    Identifier "none"
    MatchProduct "Chicony USB2.0 Camera: Chicony"
    Option "Ignore" "true"
EndSection

要获取正确的供应商和产品名称,请使用命令并相应地lsub -vv替换值(或者更好地使用命令或命令)MatchVendorMatchProducthwinfo --usbudevadm info -a /dev/input/by-id/*

如果标识符none不起作用,请尝试使用标识符system-keyboardkeyboardlibinputcatchall

有些名称末尾包含额外的空格,请尝试将其添加到忽略配置中

重新启动 X 会话并运行命令xinput list以检查摄像头现在是否已被排除为键盘输入。

重要的:尝试启用 SSH 并从另一台计算机进行远程连接,以防新配置中断 X 会话并且您失去控制台访问权限。

笔记:还要确保摄像头已激活(有些摄像头有物理按钮或键盘快捷键来激活和停用)

答案2

嗯,原则上它被识别为网络摄像头:

kernel: uvcvideo: Found UVC 1.00 device DP 5M CAM (2b16:6689)

这是如果相机有“快照”键,则被识别为键盘并不奇怪。我的相机也会发生同样的情况。

那么问题就变成了为什么除了初步识别之外uvcvideocheese却找不到它。您发布的摘录下面是否有任何与 UVC 或视频设备相关的消息?可能是错误信息?

您看到有多少台设备ls /dev/video*?如果你lsusb -vv为相机做一些特别的事情吗?

相关内容