Xen domU 中的 Xorg 中没有键盘

Xen domU 中的 Xorg 中没有键盘

我在 dom0 中使用 Debian Bullseye 的 XEN 4.14.5,我的 domU 是 Devuan Chimaera(Debian Bullseye 的一个分支)。

我连接到 domU 的 VNC 服务器,在启动 X11 之前一切正常。 (自从安装了软件包后kbd,我什至可以说鼠标在 X11 之外也能工作。)但是在 X11 中,鼠标可以工作,而键盘无法使用。

诡异的线索:我跑了xev,发现输入数字123导致了ButtonPressButtonRelease事件! 编辑:重新测试似乎表明是escape1、 和2;这将是前三个键码。

有什么建议么?

xinput 报告:

# env DISPLAY=:0 xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Xen Virtual Keyboard                      id=7    [slave  pointer  (2)]
⎜   ↳ Xen Virtual Pointer                       id=8    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Xen Virtual Keyboard (keys)               id=6    [slave  keyboard (3)]
#

从 Xorg.0.log 中提取:

[    11.990] (II) config/udev: Adding input device PC Speaker (/dev/input/event0)
[    11.990] (II) No input driver specified, ignoring this device.
[    11.990] (II) This device may have been added with another device file.
[    11.991] (II) config/udev: Adding input device Xen Virtual Keyboard (/dev/input/event1)
[    11.991] (**) Xen Virtual Keyboard: Applying InputClass "evdev keyboard catchall"
[    11.991] (**) Xen Virtual Keyboard: Applying InputClass "libinput keyboard catchall"
[    11.991] (**) Xen Virtual Keyboard: Applying InputClass "joystick catchall"
[    11.991] (II) LoadModule: "joystick"
[    11.991] (II) Loading /usr/lib/xorg/modules/input/joystick_drv.so
[    11.994] (II) Module joystick: vendor="X.Org Foundation"
[    11.994]    compiled for 1.19.0, module version = 1.6.3
[    11.994]    Module class: X.Org XInput Driver
[    11.994]    ABI class: X.Org XInput driver, version 24.1
[    11.994] (II) Using input driver 'joystick' for 'Xen Virtual Keyboard'
[    11.994] (**) Xen Virtual Keyboard: always reports core events
[    11.994] (**) Xen Virtual Keyboard (keys): Applying InputClass "evdev keyboard catchall"
[    11.994] (**) Xen Virtual Keyboard (keys): Applying InputClass "libinput keyboard catchall"
[    11.994] (**) Xen Virtual Keyboard (keys): Applying InputClass "joystick catchall"
[    11.994] (II) Using input driver 'joystick' for 'Xen Virtual Keyboard (keys)'
[    11.994] (**) Xen Virtual Keyboard (keys): always reports core events
[    11.994] (**) Option "xkb_model" "pc105"
[    11.994] (**) Option "xkb_layout" "us"
[    11.994] (**) Option "config_info" "udev:/sys/devices/virtual/input/input1/event1"
[    11.994] (II) XINPUT: Adding extended input device "Xen Virtual Keyboard (keys)" (type: JOYSTICK, id 6)
[    11.995] (**) Option "Device" "/dev/input/event1"
[    11.995] (**) Option "config_info" "udev:/sys/devices/virtual/input/input1/event1"
[    11.995] (II) XINPUT: Adding extended input device "Xen Virtual Keyboard" (type: JOYSTICK, id 7)
[    11.995] (II) Joystick: Xen Virtual Keyboard. bus 0x1 vendor 0x5853 product 0xffff version 0x0
[    11.995] (II) Joystick: found 0 axes, 654 buttons
[    11.995] JOYSTICK: DebugLevel set to 0
[    11.995] (**) Xen Virtual Keyboard: (accel) keeping acceleration scheme 1
[    11.995] (**) Xen Virtual Keyboard: (accel) acceleration profile 0
[    11.995] (**) Xen Virtual Keyboard: (accel) acceleration factor: 2.000
[    11.995] (**) Xen Virtual Keyboard: (accel) acceleration threshold: 4
[    11.996] (II) config/udev: Adding input device Xen Virtual Keyboard (/dev/input/js0)
[    11.996] (II) No input driver specified, ignoring this device.
[    11.996] (II) This device may have been added with another device file.
[    11.996] (II) config/udev: Adding input device Xen Virtual Pointer (/dev/input/event2)
[    11.996] (**) Xen Virtual Pointer: Applying InputClass "evdev pointer catchall"
[    11.996] (**) Xen Virtual Pointer: Applying InputClass "Xen Virtual Pointer axis blacklist"
[    11.996] (**) Xen Virtual Pointer: Applying InputClass "libinput pointer catchall"
[    11.996] (II) LoadModule: "libinput"
[    11.996] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[    12.020] (II) Module libinput: vendor="X.Org Foundation"
[    12.020]    compiled for 1.20.8, module version = 0.30.0
[    12.020]    Module class: X.Org XInput Driver
[    12.020]    ABI class: X.Org XInput driver, version 24.1
[    12.020] (II) Using input driver 'libinput' for 'Xen Virtual Pointer'
[    12.021] (**) Xen Virtual Pointer: always reports core events
[    12.021] (**) Option "Device" "/dev/input/event2"
[    12.021] (**) Option "_source" "server/udev"
[    12.038] (II) event2  - Xen Virtual Pointer: is tagged by udev as: Mouse
[    12.038] (II) event2  - Xen Virtual Pointer: device is a pointer
[    12.039] (II) event2  - Xen Virtual Pointer: device removed
[    12.039] (**) Option "config_info" "udev:/sys/devices/virtual/input/input2/event2"
[    12.039] (II) XINPUT: Adding extended input device "Xen Virtual Pointer" (type: MOUSE, id 8)
[    12.039] (**) Option "AccelerationScheme" "none"
[    12.039] (**) Xen Virtual Pointer: (accel) selected scheme none/0
[    12.039] (**) Xen Virtual Pointer: (accel) acceleration factor: 2.000
[    12.039] (**) Xen Virtual Pointer: (accel) acceleration threshold: 4
[    12.040] (II) event2  - Xen Virtual Pointer: is tagged by udev as: Mouse
[    12.040] (II) event2  - Xen Virtual Pointer: device is a pointer
[    12.040] (II) config/udev: Adding input device Xen Virtual Pointer (/dev/input/js1)
[    12.041] (**) Xen Virtual Pointer: Applying InputClass "Xen Virtual Pointer axis blacklist"
[    12.041] (II) No input driver specified, ignoring this device.
[    12.041] (II) This device may have been added with another device file.
[    12.041] (II) config/udev: Adding input device Xen Virtual Pointer (/dev/input/mouse0)
[    12.041] (**) Xen Virtual Pointer: Applying InputClass "Xen Virtual Pointer axis blacklist"
[    12.041] (II) No input driver specified, ignoring this device.
[    12.041] (II) This device may have been added with another device file.
```

答案1

基于https://forums.gentoo.org/viewtopic-p-8683632.html#8683632 我发现放置一个/etc/X11/xorg.conf.d/*.conf包含以下内容的文件匹配就足够了:

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver          "libinput"
EndSection

虽然这是 中某个部分的精确匹配(不包括空格)/usr/share/X11/xorg.conf.d/40-libinput.conf,但显然顺序一定很重要。

相关内容