重新连接到 Linux 时 KVM 切换器出现滞后

重新连接到 Linux 时 KVM 切换器出现滞后

我有这个IOGear GCS22U 2 端口 KVM 切换器我用它在我的 Manjaro 机器 (Linux manjaro 5.10.56-1-vfio-lts) 和我的 Windows 10 机器之间切换。我使用的是 Corsair K95 RGB 键盘和 Logitech G403 HERO 鼠标。

当切换到Windows机器时,它会立即检测并使用键盘。当我的 Linux 系统检测到它时,让我们运行 1/2 秒,重新连接,重复此操作两次,然后像正常一样运行。我想知道有没有一种方法可以让 Linux 仅重新连接一次并且是即时的?类似于始终加载硬件配置的东西?

这种影响似乎是在鼠标上,因为光标具有这种连接/断开效果。而键盘在该周期完成(2 秒)之前不允许使用。


Dmesg -w在(重新)连接 KVM 切换器后,键盘/鼠标工作完成的最后几行输出:

[23017.065347] usb 3-1: USB disconnect, device number 22
[23017.261618] usb 3-2: USB disconnect, device number 23
[23021.531242] usb 3-1: new full-speed USB device number 24 using xhci_hcd
[23021.737486] usb 3-1: New USB device found, idVendor=1b1c, idProduct=1b11, bcdDevice= 2.04
[23021.737490] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23021.737492] usb 3-1: Product: Corsair K95 RGB Gaming Keyboard 
[23021.737493] usb 3-1: Manufacturer: Corsair
[23021.737494] usb 3-1: SerialNumber: 1901F044AE3B94035375958DF5001946
[23021.776179] input: Corsair Corsair K95 RGB Gaming Keyboard  as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-1/3-1:1.0/0003:1B1C:1B11.0035/input/input169
[23021.776460] hid-generic 0003:1B1C:1B11.0035: input,hidraw4: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard ] on usb-0000:11:00.3-1/input0
[23021.789240] input: Corsair Corsair K95 RGB Gaming Keyboard  Keyboard as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-1/3-1:1.1/0003:1B1C:1B11.0036/input/input170
[23021.789369] input: Corsair Corsair K95 RGB Gaming Keyboard  Consumer Control as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-1/3-1:1.1/0003:1B1C:1B11.0036/input/input171
[23021.789419] input: Corsair Corsair K95 RGB Gaming Keyboard  as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-1/3-1:1.1/0003:1B1C:1B11.0036/input/input172
[23021.789469] input: Corsair Corsair K95 RGB Gaming Keyboard  as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-1/3-1:1.1/0003:1B1C:1B11.0036/input/input173
[23021.789542] hid-generic 0003:1B1C:1B11.0036: input,hiddev98,hidraw5: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard ] on usb-0000:11:00.3-1/input1
[23021.789595] usbhid 3-1:1.2: couldn't find an input interrupt endpoint
[23021.931587] usb 3-2: new full-speed USB device number 25 using xhci_hcd
[23022.134494] usb 3-2: New USB device found, idVendor=046d, idProduct=c08f, bcdDevice=45.01
[23022.134498] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23022.134500] usb 3-2: Product: G403 HERO Gaming Mouse
[23022.134501] usb 3-2: Manufacturer: Logitech
[23022.134503] usb 3-2: SerialNumber: 097A39633530
[23022.169133] input: Logitech G403 HERO Gaming Mouse as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-2/3-2:1.0/0003:046D:C08F.0037/input/input174
[23022.169370] hid-generic 0003:046D:C08F.0037: input,hidraw6: USB HID v1.11 Mouse [Logitech G403 HERO Gaming Mouse] on usb-0000:11:00.3-2/input0
[23022.178445] input: Logitech G403 HERO Gaming Mouse Keyboard as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-2/3-2:1.1/0003:046D:C08F.0038/input/input175
[23022.241635] input: Logitech G403 HERO Gaming Mouse Consumer Control as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-2/3-2:1.1/0003:046D:C08F.0038/input/input176
[23022.241697] input: Logitech G403 HERO Gaming Mouse System Control as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-2/3-2:1.1/0003:046D:C08F.0038/input/input177
[23022.241797] hid-generic 0003:046D:C08F.0038: input,hiddev99,hidraw7: USB HID v1.11 Keyboard [Logitech G403 HERO Gaming Mouse] on usb-0000:11:00.3-2/input1
[23023.691748] input: ckb1: Corsair K95 RGB Gaming Keyboard vKB as /devices/virtual/input/input180
[23023.692018] input: ckb1: Corsair K95 RGB Gaming Keyboard vM as /devices/virtual/input/input181

答案1

您的问题可能与每当您将 KDM 切换到 Linux 时 Linux 都需要加载设备驱动程序有关。要检查这一点,请执行以下操作:

打开终端。进入dmesg -w。该程序将显示所有启用和禁用的设备的日志。 (尝试插入 USB 驱动器或类似设备,看看会发生什么)。

现在您可以使用该工具来真正了解执行 KVM 切换时会发生什么情况。希望您会看到一个或多个驱动程序正在加载和卸载。如果是这样,您需要查看是否可以将这些驱动程序永久加载到内核中。有多种方法可以做到这一点,一些快速的谷歌搜索至少应该将您推向正确的方向。

这可能是一个好的开始: https://stackoverflow.com/questions/10858313/want-to-permanently-mount-kernel-driver-into-syste

相关内容