我尝试让相机在我的 qemu (Archlinux) 客户机上工作。主机也是Archlinux系统。
下面我展示了我尝试过的命令以及lsusb
输出lspci
。当我启动访客系统时,我收到关于我已连接的 2 个摄像头的 2 个警告(lenovo 内置、Trust USB 插入)。
我发现一篇文章显然解释了原因这里但我可以弄清楚我到底应该做什么。
导致此问题的原因是虚拟 USB 集线器默认为 USB 1.1 - 如果您在启动 VM 之前将其更改为 USB 2,则相机应该显示正常。但 USB 3+ 设备仍然会出现问题。
- command to start the qemu machine:
$sudo qemu-system-x86_64 -smp 6 -m 4G -enable-kvm -vga std -soundhw ac97\ -usb -device usb-host,hostbus=1,hostaddr=11 -usb -device usb-host,hostbus=3,hostaddr=1 -usb -device usb-host,hostbus=3,hostaddr=2 -usb -device usb-host,hostbus=2,hostaddr=1 -usb -device usb-host,hostbus=1,hostaddr=1 -usb -device usb-host,hostbus=1,hostaddr=2 -usb -device usb-host,hostbus=1,hostaddr=3 -k en-uk -net nic,model=rtl8139 -net user -drive file=qemu-drive,format=raw
- warnings:
qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "Lenovo EasyCamera" (high speed) to bus "usb-bus.0", port "2.6" (full speed)
qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "Trust Webcam" (high speed) to bus "usb-bus.0", port "1" (full speed)
lsusb
Bus 003 Device 002: ID 8087:8001 Intel Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader Bus 001 Device 006: ID 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0 Bus 001 Device 003: ID 5986:0652 Acer, Inc Bus 001 Device 010: ID 04d9:a029 Holtek Semiconductor, Inc. Bus 001 Device 011: ID 145f:019f Trust Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lspci
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09) 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09) 00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03) 00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03) 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3) 00:1c.1 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #2 (rev e3) 00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3) 00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3) 00:1c.4 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 (rev e3) 00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03) 00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03) 00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03) 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01) 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) 09:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01) 0a:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev ff)