Problems with evdev driver for keyboard

Dmitry Dzhus mail at sphinx.net.ru
Tue Dec 25 07:54:35 PST 2007


Greetings!

I'm trying to make my MS Natural 4000 keyboard work in X using
`evdev(4x)` driver. In my xorg.conf, i've got the following related

    Section "InputDevice"
        Identifier  "MSnek"
        Driver      "evdev"
        Option      "Phys" "*input0"
        Option      "vendor" "0x045e"
        Option      "product" "0x00db"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "evdev"
        Option      "XkbLayout" "us,ru"
        Option      "XkbVariant" ",winkeys"
        Option      "XkbOptions" "grp:caps_toggle,grp_led:caps,compose:ralt"
    EndSection

    Section "InputDevice"
        Identifier  "MSnek1"
        Driver      "evdev"
        Option      "Phys" "*input1"
        Option      "vendor" "0x045e"
        Option      "product" "0x00db"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "evdev"
        Option      "XkbLayout" "us,ru"
        Option      "XkbVariant" ",winkeys"
        Option      "XkbOptions" "grp:caps_toggle,grp_led:caps,compose:ralt"
    EndSection

Server layout section follows:

    Section "ServerLayout"
                Identifier	"Main Layout"
                Screen	"Screen1"
                InputDevice "MSnek" "CoreKeyboard"
                InputDevice "MSnek1" "SendCoreEvents"
                InputDevice	"Mouse1"
    EndSection

Two sections are needed as this keyboard actually acts as two event
devices (according to /proc/bus/input/devices).

The bad thing is that keyboard stops working *right after* I type in
my login/password in GDM (that's for G desktop manager, I don't use
GNOME though). I *can* still zap the X server with Ctrl-Alt-Backspace
or switch to terminals using Ctrl-Alt-F1. That make thing even
weirder.

The `Xorg.0.log` ends with the following lines which seem to be
relevant:

    (II) evdev brain: Rescanning devices (1).
    (**) Option "CoreKeyboard"
    (**) MSnek-usb-0000:00:07.2-1/input0: always reports core events
    (**) Option "XkbRules" "xorg"
    (**) Option "XkbModel" "evdev"
    (**) Option "XkbLayout" "us,ru"
    (**) Option "XkbVariant" ",winkeys"
    (**) Option "XkbOptions" "grp:caps_toggle,grp_led:caps,compose:ralt"
    (II) evdev brain: Rescanning devices (2).
    (**) Option "SendCoreEvents"
    (**) MSnek1-usb-0000:00:07.2-1/input1: always reports core events
    (II) MSnek1-usb-0000:00:07.2-1/input1: Found 1 absolute axes.
    (II) MSnek1-usb-0000:00:07.2-1/input1: Configuring as pointer.
    (II) MSnek1-usb-0000:00:07.2-1/input1: Found 1 relative axes.
    (II) MSnek1-usb-0000:00:07.2-1/input1: Configuring as pointer.
    (**) MSnek1-usb-0000:00:07.2-1/input1: HWHEELRelativeAxisButtons: 6 7.
    (II) MSnek1-usb-0000:00:07.2-1/input1: Found 17 mouse buttons
    (**) MSnek1-usb-0000:00:07.2-1/input1: Configuring 1 absolute axes.
    (II) MSnek1-usb-0000:00:07.2-1/input1: Checking button DIGI_STYLUS (330)
    (II) MSnek1-usb-0000:00:07.2-1/input1: Checking bit 330
    (EE) MSnek1-usb-0000:00:07.2-1/input1: AbsoluteTouch: 'DIGI_Touch' does not exist.
    (**) MSnek1-usb-0000:00:07.2-1/input1: Configuring in Absolute mode.
    (**) MSnek1-usb-0000:00:07.2-1/input1: Configuring 1 relative axes.
    (II) MSnek1-usb-0000:00:07.2-1/input1: Configured 19 mouse buttons
    (**) Option "XkbRules" "xorg"
    (**) Option "XkbModel" "evdev"
    (**) Option "XkbLayout" "us,ru"
    (**) Option "XkbVariant" ",winkeys"
    (**) Option "XkbOptions" "grp:caps_toggle,grp_led:caps,compose:ralt"
    (**) Mouse1: Device: "/dev/input/mouse0"
    (==) Mouse1: Protocol: "Auto"
    (**) Option "CorePointer"
    (**) Mouse1: always reports core events
    (**) Option "Device" "/dev/input/mouse0"
    (==) Mouse1: Emulate3Buttons, Emulate3Timeout: 50
    (**) Mouse1: ZAxisMapping: buttons 4 and 5
    (**) Mouse1: Buttons: 9
    (**) Mouse1: Sensitivity: 1
    (II) evaluating device (Mouse1)
    (II) XINPUT: Adding extended input device "Mouse1" (type: MOUSE)
    (II) evaluating device (MSnek1-usb-0000:00:07.2-1/input1)
    (II) XINPUT: Adding extended input device "MSnek1-usb-0000:00:07.2-1/input1" (type: KEYBOARD)
    (II) evaluating device (MSnek-usb-0000:00:07.2-1/input0)
    (II) XINPUT: Adding extended input device "MSnek-usb-0000:00:07.2-1/input0" (type: KEYBOARD)
    (II) evaluating device (evdev brain)
    (II) XINPUT: Adding extended input device "evdev brain" (type: evdev brain)
    (**) MSnek1-usb-0000:00:07.2-1/input1: 1 valuators.
    (**) evdev_btn.c (166): Registering 19 buttons.
    (II) MSnek1-usb-0000:00:07.2-1/input1: Init
    (II) MSnek-usb-0000:00:07.2-1/input0: Init
    (--) Mouse1: PnP-detected protocol: "ExplorerPS/2"
    (II) Mouse1: ps2EnableDataReporting: succeeded
    (II) MSnek1-usb-0000:00:07.2-1/input1: On
    (II) MSnek-usb-0000:00:07.2-1/input0: On
    (II) evdev brain: Rescanning devices (3).
    Could not init font path element /usr/share/fonts/OTF, removing from list!
    (II) MSnek1-usb-0000:00:07.2-1/input1: Off
    (II) MSnek-usb-0000:00:07.2-1/input0: Off

(Font error in 3rd last line is not relevant).

It seems to mean that my two evdev devices get switched off by the
driver! Am I right? Is that somehow connected with "Pass" option
mentioned in `evdev(4x)` man page? I've tried to specify different sets
of "Pass" options in my `InputDevice` sections of `xorg.conf` file, but
that failed all the same. I've also attempted to use `Option "Device"`
instead of vendor&product id's to specify direct path to event devices
in `/dev/input/` representing keyboard, but that didn't help either.

I could just use a `keyboard` driver instead of `evdev`, but then X
applications (namely `xev(1)`) do not see several of special keys on my
keyboard.

On the other hand, using `showkey(1)` in terminal (not X) indicates that
_all_ of keyboard events actually get recieved by my machine, including
funky zooming throttle. The only problem is to make keybord work in X
with event interface.

I'm using 2.6.24-rc6 version of Linux kernel which *has* support for HID
and my keyboard so that I do not need to apply special kernel patches to
make Linux see all the keyboard events.

Output of `X -version` follows:

    X.Org X Server 1.4.0.90
    Release Date: 5 September 2007
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 2.6.24-rc6-git1 i686 
    Current Operating System: Linux storm 2.6.24-rc6-git1 #7 Tue Dec 25 10:46:49 MSK 2007 i686
    Build Date: 25 December 2007  02:40:37AM

I'm using xf86-input-evdev of version 1.1.5.

I'd be happy to post more relevant information or logs if needed or
recompile *something* with debug flags enabled.

I'm also not so sure if this is an appropriate newsgroup to post this
question in; please point me to relevant newsgroup or mailing list in
that case.
-- 
Happy Hacking.

Dmitry Dzhus
http://sphinx.net.ru


More information about the xorg mailing list