设备
我用的是联想 Yoga Slim 7i Pro目前已安装 Pop_OS 22.04、Windows 11 和 elementary OS 6.1。该设备支持 Windows Hello,因此我相信也内置了红外网络摄像头。
问题
一个多月以来,我一直无法在笔记本电脑上从 Linux 和 Windows 访问集成网络摄像头。在此之前,它运行良好,我也经常使用 Windows Hello。这两个操作系统都能够很好地识别和列出摄像头,并且每次某些软件尝试访问摄像头时,摄像头旁边的 LED 都会亮起,但似乎没有软件能够真正读取输出。
应用程序行为
Linux 上的 VLC 对 4 个可用视频流中的 2 个报告错误,并且只对其他 2 个视频流显示黑屏(日志)。Cheese 也显示空白屏幕。
Windows 上的默认相机应用程序显示灰色屏幕,有时会抱怨另一个应用程序正在使用它。Windows 设备管理器没有发现硬件有什么问题,尝试摆弄 Windows 上的驱动程序也没有多大用处。
网络浏览器也无法打开相机输出。
语境
我不知道是什么原因导致相机停止工作,也可能是我过了一段时间才注意到的,但我认为这可能与我尝试使用我的安卓手机作为网络摄像头有关乱码.我按照说明这里并没有真正理解到底发生了什么,而且也没有起到什么作用。
调试信息
我只是包括了一些我见过的一般要求的输出,请询问其他所需的输出。
$ lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 1: Dev 2, If 4, Class=Application Specific Interface, Driver=, 480M
|__ Port 1: Dev 2, If 2, Class=Video, Driver=uvcvideo, 480M
|__ Port 1: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 1: Dev 2, If 3, Class=Video, Driver=uvcvideo, 480M
|__ Port 1: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
$ v4l2-ctl --list-devices
Integrated Camera: Integrated C (usb-0000:00:14.0-1):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/media0
/dev/media1
$ sudo dmesg | grep video
[ 3.051298] ACPI: video: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 5.650006] videodev: Linux video capture interface: v2.00
[ 5.772633] usbcore: registered new interface driver uvcvideo
$ udevadm info -a /dev/input/by-id/usb-Chicony_Electronics_Co._Ltd._Integrated_Camera_0001-event-if00
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/input/input11/event5':
KERNEL=="event5"
SUBSYSTEM=="input"
DRIVER==""
ATTR{power/async}=="disabled"
ATTR{power/control}=="auto"
ATTR{power/runtime_active_kids}=="0"
ATTR{power/runtime_active_time}=="0"
ATTR{power/runtime_enabled}=="disabled"
ATTR{power/runtime_status}=="unsupported"
ATTR{power/runtime_suspended_time}=="0"
ATTR{power/runtime_usage}=="0"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/input/input11':
KERNELS=="input11"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{capabilities/abs}=="0"
ATTRS{capabilities/ev}=="3"
ATTRS{capabilities/ff}=="0"
ATTRS{capabilities/key}=="100000 0 0 0"
ATTRS{capabilities/led}=="0"
ATTRS{capabilities/msc}=="0"
ATTRS{capabilities/rel}=="0"
ATTRS{capabilities/snd}=="0"
ATTRS{capabilities/sw}=="0"
ATTRS{id/bustype}=="0003"
ATTRS{id/product}=="b6cb"
ATTRS{id/vendor}=="04f2"
ATTRS{id/version}=="8018"
ATTRS{inhibited}=="0"
ATTRS{name}=="Integrated Camera: Integrated C"
ATTRS{phys}=="usb-0000:00:14.0-1/button"
ATTRS{power/async}=="disabled"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_kids}=="0"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_enabled}=="disabled"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{power/runtime_usage}=="0"
ATTRS{properties}=="0"
ATTRS{uniq}==""
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0':
KERNELS=="3-1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="uvcvideo"
ATTRS{authorized}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceClass}=="0e"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bInterfaceProtocol}=="00"
ATTRS{bInterfaceSubClass}=="01"
ATTRS{bNumEndpoints}=="01"
ATTRS{iad_bFirstInterface}=="00"
ATTRS{iad_bFunctionClass}=="0e"
ATTRS{iad_bFunctionProtocol}=="00"
ATTRS{iad_bFunctionSubClass}=="03"
ATTRS{iad_bInterfaceCount}=="02"
ATTRS{interface}=="Integrated Camera"
ATTRS{physical_location/dock}=="no"
ATTRS{physical_location/horizontal_position}=="center"
ATTRS{physical_location/lid}=="yes"
ATTRS{physical_location/panel}=="front"
ATTRS{physical_location/vertical_position}=="upper"
ATTRS{power/async}=="enabled"
ATTRS{power/runtime_active_kids}=="0"
ATTRS{power/runtime_enabled}=="enabled"
ATTRS{power/runtime_status}=="suspended"
ATTRS{power/runtime_usage}=="0"
ATTRS{supports_autosuspend}=="1"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-1':
KERNELS=="3-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{authorized}=="1"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bDeviceClass}=="ef"
ATTRS{bDeviceProtocol}=="01"
ATTRS{bDeviceSubClass}=="02"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bMaxPower}=="500mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 5"
ATTRS{bcdDevice}=="8018"
ATTRS{bmAttributes}=="80"
ATTRS{busnum}=="3"
ATTRS{configuration}=="Integrated Camera"
ATTRS{devnum}=="2"
ATTRS{devpath}=="1"
ATTRS{idProduct}=="b6cb"
ATTRS{idVendor}=="04f2"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Chicony Electronics Co.,Ltd."
ATTRS{maxchild}=="0"
ATTRS{physical_location/dock}=="no"
ATTRS{physical_location/horizontal_position}=="center"
ATTRS{physical_location/lid}=="yes"
ATTRS{physical_location/panel}=="front"
ATTRS{physical_location/vertical_position}=="upper"
ATTRS{power/active_duration}=="335648"
ATTRS{power/async}=="enabled"
ATTRS{power/autosuspend}=="2"
ATTRS{power/autosuspend_delay_ms}=="2000"
ATTRS{power/connected_duration}=="6747712"
ATTRS{power/control}=="auto"
ATTRS{power/level}=="auto"
ATTRS{power/persist}=="1"
ATTRS{power/runtime_active_kids}=="0"
ATTRS{power/runtime_active_time}=="338292"
ATTRS{power/runtime_enabled}=="enabled"
ATTRS{power/runtime_status}=="suspended"
ATTRS{power/runtime_suspended_time}=="6408242"
ATTRS{power/runtime_usage}=="0"
ATTRS{product}=="Integrated Camera"
ATTRS{quirks}=="0x0"
ATTRS{removable}=="fixed"
ATTRS{rx_lanes}=="1"
ATTRS{serial}=="0001"
ATTRS{speed}=="480"
ATTRS{tx_lanes}=="1"
ATTRS{urbnum}=="70413"
ATTRS{version}==" 2.01"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3':
KERNELS=="usb3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{authorized}=="1"
ATTRS{authorized_default}=="1"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceProtocol}=="01"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bMaxPower}=="0mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bcdDevice}=="0602"
ATTRS{bmAttributes}=="e0"
ATTRS{busnum}=="3"
ATTRS{configuration}==""
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{idProduct}=="0002"
ATTRS{idVendor}=="1d6b"
ATTRS{interface_authorized_default}=="1"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 6.2.6-76060206-generic xhci-hcd"
ATTRS{maxchild}=="12"
ATTRS{power/active_duration}=="1886500"
ATTRS{power/async}=="enabled"
ATTRS{power/autosuspend}=="0"
ATTRS{power/autosuspend_delay_ms}=="0"
ATTRS{power/connected_duration}=="6747844"
ATTRS{power/control}=="auto"
ATTRS{power/level}=="auto"
ATTRS{power/runtime_active_kids}=="0"
ATTRS{power/runtime_active_time}=="1887413"
ATTRS{power/runtime_enabled}=="enabled"
ATTRS{power/runtime_status}=="suspended"
ATTRS{power/runtime_suspended_time}=="4859526"
ATTRS{power/runtime_usage}=="0"
ATTRS{power/wakeup}=="disabled"
ATTRS{power/wakeup_abort_count}==""
ATTRS{power/wakeup_active}==""
ATTRS{power/wakeup_active_count}==""
ATTRS{power/wakeup_count}==""
ATTRS{power/wakeup_expire_count}==""
ATTRS{power/wakeup_last_time_ms}==""
ATTRS{power/wakeup_max_time_ms}==""
ATTRS{power/wakeup_total_time_ms}==""
ATTRS{product}=="xHCI Host Controller"
ATTRS{quirks}=="0x0"
ATTRS{removable}=="unknown"
ATTRS{rx_lanes}=="1"
ATTRS{serial}=="0000:00:14.0"
ATTRS{speed}=="480"
ATTRS{tx_lanes}=="1"
ATTRS{urbnum}=="571"
ATTRS{version}==" 2.00"
looking at parent device '/devices/pci0000:00/0000:00:14.0':
KERNELS=="0000:00:14.0"
SUBSYSTEMS=="pci"
DRIVERS=="xhci_hcd"
ATTRS{ari_enabled}=="0"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0330"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{d3cold_allowed}=="1"
ATTRS{dbc}=="disabled"
ATTRS{device}=="0xa0ed"
ATTRS{dma_mask_bits}=="64"
ATTRS{driver_override}=="(null)"
ATTRS{enable}=="0"
ATTRS{irq}=="148"
ATTRS{local_cpulist}=="0-7"
ATTRS{local_cpus}=="ff"
ATTRS{msi_bus}=="1"
ATTRS{msi_irqs/148}=="msi"
ATTRS{numa_node}=="-1"
ATTRS{power/async}=="enabled"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_kids}=="0"
ATTRS{power/runtime_active_time}=="1890693"
ATTRS{power/runtime_enabled}=="enabled"
ATTRS{power/runtime_status}=="suspended"
ATTRS{power/runtime_suspended_time}=="4856925"
ATTRS{power/runtime_usage}=="0"
ATTRS{power/wakeup}=="enabled"
ATTRS{power/wakeup_abort_count}=="0"
ATTRS{power/wakeup_active}=="0"
ATTRS{power/wakeup_active_count}=="0"
ATTRS{power/wakeup_count}=="0"
ATTRS{power/wakeup_expire_count}=="0"
ATTRS{power/wakeup_last_time_ms}=="0"
ATTRS{power/wakeup_max_time_ms}=="0"
ATTRS{power/wakeup_total_time_ms}=="0"
ATTRS{power_state}=="D3hot"
ATTRS{revision}=="0x30"
ATTRS{subsystem_device}=="0x3864"
ATTRS{subsystem_vendor}=="0x17aa"
ATTRS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
ATTRS{power/async}=="enabled"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_kids}=="10"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_enabled}=="disabled"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{power/runtime_usage}=="0"
ATTRS{waiting_for_supplier}=="0"