如何讓具有傳統滑鼠支援的 Linux 系統接受具有絕對滑鼠模式的 KVM 切換器?

如何讓具有傳統滑鼠支援的 Linux 系統接受具有絕對滑鼠模式的 KVM 切換器?

我的一位客戶擁有一個 Linux 系統,其詳細資訊如下:
Suse Linux 15

我插入了 Raritan 的 KVM-over-IP 裝置 (DKX4-101),該裝置在絕對滑鼠模式下引入了帶有鍵盤 + 滑鼠的 USB 裝置。
至關重要的是絕對滑鼠模式用來。
我可以透過 KVM 控制系統,但滑鼠的行為就像在相對滑鼠模式。我 100% 確信 KVM 正在發送絕對滑鼠座標。我找到了一個描述Linux 中有一個遺留的滑鼠驅動程式 (mousedev),它使遺留應用程式透過 /dev/input/mice 使用 ps2 風格的接口,並且還可以使用絕對滑鼠座標將滑鼠轉換為相對座標。所以我猜想 KVM 的絕對滑鼠不是由應用程式直接使用的,而是透過基於 ps2 且不支援絕對滑鼠模式的舊版 mousedev 介面進行「管道/轉換」。

我現在想要實現的是,在這個系統上我可以使用 mousedev 的本地滑鼠,並且 KVM 使用支援絕對滑鼠模式的「常規」驅動程式。我想保留 mousedev 方法,因為我的客戶告訴我,我不應該更改系統上的任何內容(如果可能)。如果我更改某些內容,它應該只為 KVM 引入一些內容,而不應該更改任何內容,例如有關現有設備所用驅動程式的內容。

所以我想我的問題是:

  1. 這可能嗎?
  2. 更改 xorg.conf 可以實現此目的嗎?

在此先感謝您的幫忙。我附上了我可以在下面找到的所有相關設定檔/日誌。

J。

以下是 udev 滑鼠規則:

# serial ps/2 mouse
KERNELS=="input*", SUBSYSTEMS=="input", ATTRS(name)=="PS/2 Logitech Mouse", ATTRS(phys)=="isa0060/serio1/input0", SYMLINK+="input/pmouse0", MODE="0660", RUN="/usr/bin/killall -10 X"

# usb mouse
KERNELS=="mouse*", SUBSYSTEM=="input", ATTRS(name)=="USB*Mouse*", MODE="0660", SYMLINK="input/pmouse0", RUN="/usr/bin/killall -10 X"

這裡是更通用的 evdev udev 規則

Section "InputClass"
       Identifier "evdev pointer catchall"
       MatchIsPointer "on"
       MatchDevicePath "/dev/input/event*"
       Driver "evdev"
EndSection

Section "InputClass"
       Identifier "evdev tablet catchall"
       MatchIsTablet "on"
       MatchDevicePath "/dev/input/event*"
       Driver "evdev"
EndSection

這裡是更通用的 libinput udev 規則

Section "InputClass"
       Identifier "libinput pointer catchall"
       MatchIsPointer "on"
       MatchDevicePath "/dev/input/event*"
       Driver "libinput"
EndSection

Section "InputClass"
       Identifier "libinput tablet catchall"
       MatchIsTablet "on"
       MatchDevicePath "/dev/input/event*"
       Driver "libinput"
EndSection

在 xorg.conf 中我發現了這個

...
Section "ServerLayout"
        Identifier     "NVidia"
        Screen         "Screen0"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
 Option        "AutoAddDevices" "false"
 Option        "AutoEnableDevices" "true"
 Option        "AllowEmptyInput" "false"
EndSection

...

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "explorerps/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "no"
EndSection

當我執行 xinput list 時,KVM 裝置上的滑鼠不顯示

Virtual core pointer
   Virtual core XTEST pointer
   Mouse0
Virtual core keygoard
   Virtual core XTEST keyboard
   Keyboard0

當我運行 lsusb 時,我看到兩個本地設備(鍵盤+滑鼠)+ KVM:

lsusb
...
BUS 001 Device 012: ID 03f0:034a HP, Inc Elite Keyboard
BUS 001 Device 010: ID 03f0:134a HP, Inc Optical Mouse
Bus 002 Device 014: ID 14dd:1010 Raritan Computer, Inc. KX4-101
...

在 boot.msg 中我看到設備是如何註冊的

input: Raritan KX4-101 as /devices/pci0000:00/0000:00:14,0/usb1/1-6/6:1.0/0003:1400:1010.0001/input/input1
hid-generic: 0003:1400:1010.0001: input.hidraw0: USB HID v1.01 Keyboard [Raritan KX4-101] on usb-0000:00:14.0-6/input0
input: Raritan KX4-101 as /devices/pci0000:00/0000:00:14,0/usb1/1-6/6:1.0/0003:1400:1010.0002/input/input2
hid-generic: 0003:1400:1010.0002: input.hidraw1: USB HID v1.01 Mouse [Raritan KX4-101] on usb-0000:00:14.0-6/input1

在 xorg.log 中我發現了以下內容:

(II) config/udev: Adding input device Raritan KX4-101 (/dev/input/mouse0)
(II) AutoAddDevices is off - not adding device.
(II) config/udev: Adding input device Raritan KX4-101 (/dev/input/event1)
(II) AutoAddDevices is off - not adding device.
...
(II) LoadModule: "mouse"
(II) Loading /usr/lib64/xorg/modules/input/mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
   compiled for 1.20.3, module version = 1.9.2
   Module class: X.Org XInput Driver
   ABI class: X.Org XInput driver, version 24.1
...
(II)Using input driver 'mouse' for 'Mouse1'
(**) Option "CorePointer"
(**) Mouse1: always reports core events
(**) Option "Protocol" "PS/2"
(**) Option "Device" "/dev/input/

在 /dev/input 中我發現了很多事件,最後

... input 13 ... mice
... input 13 ... mouse0
... input 13 ... mouse1
... input 13 ... mouse2
... input 13 ... mouse3
... input 13 ... mouse4
... root     ... pmouse0 -> mouse3

相關內容