Plamo Linux 6.0 の X のキーボードとマウスの設定について

VMWare で動かしている Plamo Linux 5.3.1 を Plamo Linux 6.0 にアップデートしたところ、マウスでクリックできなくなった。
X 関係の設定は、xfplamoconfig でビデオチップのドライバを VMware 用に設定したものを使っていて、xorg.conf はこんな設定になっている。

Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
EndSection

(略)

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "XkbModel" "jp106"
        Option      "XkbLayout" "jp"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "PS/2"
        Option      "Device" "/dev/psaux"
        Option      "Emulate3Buttons"
        #Option      "Emulate3Timeout" "50"
        #Option      "Resolution" "256"
        #Option      "ZAxisMapping" "4 5"
EndSection

(略)

Section "ServerFlags"
 Option "AutoAddDevices" "false"
EndSection

Xorg.log を見たところ、マウスを検出したけど 'AutoAddDevie is off - not adding device' というメッセージが出ている。

(略)
[    42.711] (II) Using input driver 'mouse' for 'Mouse0'
[    42.711] (**) Option "CorePointer"
[    42.711] (**) Mouse0: always reports core events
[    42.711] (**) Option "Protocol" "PS/2"
[    42.711] (**) Option "Device" "/dev/psaux"
[    42.711] (**) Mouse0: Protocol: "PS/2"
[    42.711] (**) Mouse0: always reports core events
[    42.723] (**) Option "Emulate3Buttons"
[    42.724] (**) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
[    42.724] (**) Mouse0: ZAxisMapping: buttons 4 and 5
[    42.724] (**) Mouse0: Buttons: 9
[    42.724] (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE, id 7)
[    42.724] (**) Mouse0: (accel) keeping acceleration scheme 1
[    42.724] (**) Mouse0: (accel) acceleration profile 0
[    42.724] (**) Mouse0: (accel) acceleration factor: 2.000
[    42.724] (**) Mouse0: (accel) acceleration threshold: 4
[    42.829] (II) Mouse0: ps2EnableDataReporting: succeeded
[    42.849] (II) config/udev: Adding input device Power Button (/dev/input/event1)
[    42.849] (II) AutoAddDevices is off - not adding device.
[    42.853] (II) config/udev: Adding input device VMware VMware Virtual USB Mouse (/dev/input/event5)
[    42.853] (II) AutoAddDevices is off - not adding device.
[    42.854] (II) config/udev: Adding input device VMware VMware Virtual USB Mouse (/dev/input/js0)
[    42.854] (II) AutoAddDevices is off - not adding device.
[    42.854] (II) config/udev: Adding input device VMware VMware Virtual USB Mouse (/dev/input/mouse1)
[    42.854] (II) AutoAddDevices is off - not adding device.
[    42.855] (II) config/udev: Adding input device VMware VMware Virtual USB Mouse (/dev/input/event6)
[    42.855] (II) AutoAddDevices is off - not adding device.
[    42.855] (II) config/udev: Adding input device VMware VMware Virtual USB Mouse (/dev/input/mouse2)
[    42.855] (II) AutoAddDevices is off - not adding device.
[    42.856] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[    42.856] (II) AutoAddDevices is off - not adding device.
[    42.856] (II) config/udev: Adding input device VirtualPS/2 VMware VMMouse (/dev/input/event3)
[    42.856] (II) AutoAddDevices is off - not adding device.
[    42.856] (II) config/udev: Adding input device VirtualPS/2 VMware VMMouse (/dev/input/mouse0)
[    42.856] (II) AutoAddDevices is off - not adding device.
[    42.856] (II) config/udev: Adding input device VirtualPS/2 VMware VMMouse (/dev/input/event2)
[    42.856] (II) AutoAddDevices is off - not adding device.
[    42.857] (II) config/udev: Adding input device PC Speaker (/dev/input/event4)
[    42.857] (II) AutoAddDevices is off - not adding device.
(略)

という事で、xorg.conf で AutoAddDevice オプションをコメントアウトしてみる。

Section "ServerFlags"
 #Option "AutoAddDevices" "false"
EndSection

すると、マウスは検出されるようになったのはいいが、今度はキーボードが US キーボードとして認識されてしまう。Xorg.log にはこんなログが出力されている。

(略)
[    39.178] (==) Automatically adding devices
[    39.178] (==) Automatically enabling devices
(略)
[    39.374] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    39.374] (WW) Disabling Keyboard0
[    39.374] (WW) Disabling Mouse0
(略)
[    42.112] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[    42.112] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[    42.112] (II) LoadModule: "evdev"
[    42.112] (II) Loading /usr/lib64/xorg/modules/input/evdev_drv.so
[    42.152] (II) Module evdev: vendor="X.Org Foundation"
[    42.152] 	compiled for 1.17.2, module version = 2.9.2
[    42.152] 	Module class: X.Org XInput Driver
[    42.152] 	ABI class: X.Org XInput driver, version 21.0
[    42.152] (II) Using input driver 'evdev' for 'Power Button'
[    42.152] (**) Power Button: always reports core events
[    42.153] (**) evdev: Power Button: Device: "/dev/input/event2"
[    42.153] (--) evdev: Power Button: Vendor 0 Product 0x1
[    42.153] (--) evdev: Power Button: Found keys
[    42.153] (II) evdev: Power Button: Configuring as keyboard
[    42.153] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2"
[    42.153] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[    42.153] (**) Option "xkb_rules" "evdev"
[    42.153] (**) Option "xkb_model" "pc104"
[    42.153] (**) Option "xkb_layout" "us"
(略)
[    42.206] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[    42.206] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
[    42.206] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'
[    42.206] (**) AT Translated Set 2 keyboard: always reports core events
[    42.207] (**) evdev: AT Translated Set 2 keyboard: Device: "/dev/input/event0"
[    42.207] (--) evdev: AT Translated Set 2 keyboard: Vendor 0x1 Product 0x1
[    42.207] (--) evdev: AT Translated Set 2 keyboard: Found keys
[    42.207] (II) evdev: AT Translated Set 2 keyboard: Configuring as keyboard
[    42.207] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
[    42.207] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 9)
[    42.207] (**) Option "xkb_rules" "evdev"
[    42.207] (**) Option "xkb_model" "pc104"
[    42.207] (**) Option "xkb_layout" "us"
(略)

AutoAddDevice オプションが有効になると xorg.conf のキーボードとマウスの設定は無視されるらしい。

The config file may have multiple InputDevice sections. Recent X servers employ HAL or udev backends for input device enumeration and input hotplugging. It is usually not necessary to provide InputDevice sections in the xorg.conf if hotplugging is in use (i.e. AutoAddDevices is enabled). If hotplugging is enabled, InputDevice sections using the mouse, kbd and vmmouse driver will be ignored.

xorg.conf

という事で、自動認識したキーボードを jp キーボードとするよう xorg.conf に追加する。

Section "InputClass"
  Identifier "evdev keyboard catchall"
  MatchIsKeyboard "on"
  MatchDevicePath "/dev/input/event*"
  Driver "evdev"
  Option "XkbLayout" "jp"
EndSection

これでマウスとキーボードは普通に使えるようになった。