如果通过KVM切换器连接了输入设备,我需要配置什么?


8

据我所知,我从老板那里购买了KVM切换器(Aten CS782DP)。但是,在Ubuntu 16.04和16.10上,我的输入设备(带TrackPoint的Thinkpad USB Compact键盘)似乎引起了问题。我无法再单击鼠标中键,也无法垂直滚动(水平工作正常)。

特别是,这是xinput直接连接键盘时输出的外观:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=14   [slave  pointer  (2)]
⎜   ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint  id=10   [slave  pointer  (2)]
⎜   ↳ ATEN KVM V1.1.104                         id=17   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera                         id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=15   [slave  keyboard (3)]
    ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint  id=9    [slave  keyboard (3)]
    ↳ ATEN KVM V1.1.104                         id=16   [slave  keyboard (3)]

这是xinput通过KVM连接时的输出结果:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=14   [slave  pointer  (2)]
⎜   ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint  id=9    [slave  pointer  (2)]
⎜   ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint  id=16   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera                         id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=15   [slave  keyboard (3)]
    ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint  id=10   [slave  keyboard (3)]

据我所知,除了指针设备的奇怪重复(ID 9和16)之外,这看起来还不错。我将假定这与KVM有点像USB集线器有关,现在暂时忽略此重复。

我试过xinput test为两个设备运行,发现第一个设备接受移动以及左右单击(鼠标按钮1和3),而第二个设备仅进行水平滚动(按钮6和7)。都不接受中间按钮(按钮2)或垂直滚动​​(按钮4和5)。

xinput list-props两种设备的外观输出相同:

Device 'Lenovo ThinkPad Compact USB Keyboard with TrackPoint':
    Device Enabled (152):   1
    Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (284): 0
    Device Accel Constant Deceleration (285):   1.000000
    Device Accel Adaptive Deceleration (286):   1.000000
    Device Accel Velocity Scaling (287):    10.000000
    Device Product ID (272):    6127, 24647
    Device Node (273):  "/dev/input/event17"
    Evdev Axis Inversion (288): 0, 0
    Evdev Axes Swap (290):  0
    Axis Labels (291):  "Rel X" (162), "Rel Y" (163), "Rel Horiz Wheel" (282), "Rel Vert Wheel" (283)
    Button Labels (292):    "Button Left" (155), "Button Middle" (156), "Button Right" (157), "Button Wheel Up" (158), "Button Wheel Down" (159), "Button Horiz Wheel Left" (160), "Button Horiz Wheel Right" (161), "Button Side" (280), "Button Extra" (281), "Button Unknown" (275), "Button Unknown" (275), "Button Unknown" (275), "Button Unknown" (275)
    Evdev Scrolling Distance (293): 1, 1, 1
    Evdev Middle Button Emulation (294):    1
    Evdev Middle Button Timeout (295):  50
    Evdev Third Button Emulation (296): 0
    Evdev Third Button Emulation Timeout (297): 1000
    Evdev Third Button Emulation Button (298):  3
    Evdev Third Button Emulation Threshold (299):   20
    Evdev Wheel Emulation (300):    1
    Evdev Wheel Emulation Axes (301):   6, 7, 4, 5
    Evdev Wheel Emulation Inertia (302):    10
    Evdev Wheel Emulation Timeout (303):    200
    Evdev Wheel Emulation Button (304): 2
    Evdev Drag Lock Buttons (305):  0

Ubuntu(/usr/share/X11/xorg.conf.d/11-evdev-trackpoint.conf)中的默认TrackPoint配置如下所示:

Section "InputClass"
        Identifier      "trackpoint catchall"
        MatchIsPointer  "true"
        MatchProduct    "TrackPoint|DualPoint Stick"
        MatchDevicePath "/dev/input/event*"
        Option  "Emulate3Buttons"       "true"
        Option  "EmulateWheel"  "true"
        Option  "EmulateWheelButton"    "2"
        Option  "XAxisMapping"  "6 7"
        Option  "YAxisMapping"  "4 5"
EndSection

因此,根据此规则,两个设备都应具有相同的配置,即接受移动,所有三个按钮以及两种滚动类型。但是,如上所述,情况并非如此。直接连接的键盘可以正常工作。

那么,我想念的是什么,该通过KVM切换器使外部键盘正常工作,我该怎么办?


我有一个Aten KVM切换器,但是型号不同。我没有任何问题。可能是硬件或某些固件存在问题,难以解决。也许您可以尝试其他键盘(其他品牌名称和型号)。
sudodus

Answers:


0

信不信由你,我已经解决了这个问题。该解决方案并不特定于Aten KVM或Thinkpad Compact键盘,并且可能有助于通用的“我的键盘无法与KVM交换机正确配合使用”。

因此,想法是这样的:内核驱动程序正在尝试初始化特定的设备(例如键盘)。但是,KVM切换器通常提供用于切换和其他功能的便捷快捷方式。如果是Aten,则有一个双击滚轮的快捷方式。交换机本身需要过滤USB突击步枪才能正常工作,这显然与内核在设备上设置某些配置位的能力有关。就我而言,它无法配置滚动功能。

解决方法很简单:禁用冲突模式。对于Aten,它称为“鼠标仿真模式”。禁用该功能后,一切开始正常运行。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.