# Can't get xf86-input-evdev working [SOLVED]

## DaneM

Hello.  This is going to be a long post, so please bear with me.  I've spent about the last 6 hours wrestling with trying to get my new Microsoft Wireless Optical Mouse to work properly.  It *mostly* works in X, and gpm seems to have no problem with it, but sometimes in X it'll just freeze and not un-freeze until I unplug it and plug it back in again.  (It's a USB mouse.)  This seems to happen more often when the processor is busy compiling or some such.

My other gripe is that I can't seem to get the tilt function of the scroll wheel to do anything.  I've messed with ZAxisMapping, imwheel, and evdev (still working on the latter), but to no avail.

But here's my real beef: I can't get the current stable version (1.1.2-r2) of xf86-input-evdev to compile, and the latest ~amd64 release (1.1.4-r1) crashes with a segfault whenever I try to load X (using either the standard X server, or the XGL server).  Here's the segfault error that results from typing "startx":

```

X Protocol Version 11, Revision 0, Release 7.1.1

Build Operating System: UNKNOWN

Current Operating System: Linux Orchestrator 2.6.18-gentoo-r4 #1 Sat Dec 9

12:59:37 PST 2006 x86_64

Build Date: 09 December 2006

        Before reporting problems, check http://wiki.x.org

        to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

        (++) from command line, (!!) notice, (II) informational,

        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Sat Dec  9 16:46:25 2006

(==) Using config file: "/etc/X11/xorg.conf"

dlopen: /usr/lib64/xorg/modules/fonts/libtype1.so: undefined symbol:

Type1RegisterFontFileFunctions

(EE) Failed to load /usr/lib64/xorg/modules/fonts/libtype1.so

(EE) Failed to load module "type1" (loader failed, 7)

(EE) Mouse0-isa0061/input0: Don't know how to use device.

(EE) Mouse0-usb-0000:00:02.0-1/input0: AbsoluteTouch: 'DIGI_Touch' does not

exist.

(EE) Mouse0-usb-0000:00:02.0-2/input0: AbsoluteTouch: 'DIGI_Touch' does not

exist.

    xkb_keycodes             { include "evdev+aliases(qwerty)" };

    xkb_types                { include "complete" };

    xkb_compatibility        { include "complete" };

    xkb_symbols              { include "pc+us+inet(evdev)" };

    xkb_geometry             { include "pc(pc104)" };

The XKEYBOARD keymap compiler (xkbcomp) reports:

> Warning:          Multiple names for keycode 211

>                   Using <I211>, ignoring <AB11>

expected keysym, got XF86AudioEject: line 2232 of inet

Errors from xkbcomp are not fatal to the X server

    xkb_keycodes             { include "xfree86+aliases(qwerty)" };

    xkb_types                { include "complete" };

    xkb_compatibility        { include "complete" };

    xkb_symbols              { include "pc+us(dvorak)+us:2" };

    xkb_geometry             { include "microsoft(natural)" };

Backtrace:

0: X(xf86SigHandler+0x7f) [0x48e3cf]

1: /lib/libc.so.6 [0x2af890729840]

2: X(NumMotionEvents+0x12) [0x43ece2]

3: X(CreateConnectionBlock+0x51) [0x430411]

4: X(main+0x655) [0x430e85]

5: /lib/libc.so.6(__libc_start_main+0xf6) [0x2af890717136]

6: X(FontFileCompleteXLFD+0xa1) [0x430289]

Fatal server error:

Caught signal 11.  Server aborting

XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"

     after 0 requests (0 known processed) with 0 events remaining.

```

I'm not sure what it all means, but I think it might have something to do with my dvorak keyboard layout.  Here's my xorg.conf:

```

Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   ModulePath   "/usr/lib64/xorg/modules"

   FontPath     "/usr/share/fonts/misc"

   FontPath     "/usr/share/fonts/75dpi"

   FontPath     "/usr/share/fonts/100dpi"

   FontPath     "/usr/share/fonts/TTF"

   FontPath     "/usr/share/fonts/Type1"

EndSection

Section "Module"

   Load  "glx"

   Load  "evdev"

   Load  "extmod"

   Load  "xtrap"

   Load  "record"

   Load  "dbe"

   Load  "dri"

   Load  "freetype"

   Load  "type1"

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

   SubSection  "extmod"

      Option    "omit xfree86-dga"   # don't initialise the DGA extension

   EndSubSection

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

#   Driver       "evdev"

   Option   "AutoRepeat"   "500 5"

   Option   "XkbModel"   "microsoft"

   Option   "XkbLayout"   "dvorak, us"

EndSection

#Section "InputDevice"

#   Identifier  "Mouse0"

#   Driver      "mouse"

#   Option       "Protocol" "auto"

#   Option       "Device" "/dev/input/mouse0"

#   Option       "Device" "/dev/input/mice"

#   Option       "ZAxisMapping" "4 5 6 7"

#EndSection

Section "InputDevice"

   Identifier  "Mouse0"

#   Driver       "evdev"

   Driver       "mouse"

#   Option       "Protocol" "evdev"

#   Option       "Protocol" "auto"

   Option       "Buttons" "7"

   Option       "ZAxisMapping" "4 5 6 7"

   Option       "Dev Name" "Microsoft Microsoft Wireless Optical Mouse 1.0A"

   Option       "CorePointer"

#   Option       "Dev Phys" "usb-0000:00:02.0-4/input0

#   Option       "Device" "/dev/input/event1"

   Option       "Emulate3Buttons" "no"

EndSection

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName    "Monitor Model"

   HorizSync   30-85

   VertRefresh   50-160

EndSection

Section "Device"

   Identifier  "Card0"

   Driver      "nvidia"

   VendorName  "nVidia Corporation"

   BoardName   "NV43 [GeForce 6600 GT]"

   BusID       "PCI:1:0:0"

        VideoRam    131072

        Option      "RenderAccel" "1"

   Option       "AllowGLXWithCompisite" "true"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   DefaultDepth   24

   SubSection "Display"

      Viewport   0 0

      Depth     1

      Option      "AddARGBGLXVisuals" "true"

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     4

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     8

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     15

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     16

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

      Modes   "1280x960" "1152x864" "1024x768" "832x624" "800x600" "640x480"

   EndSubSection

EndSection

Section "Extensions"

   Option       "Composite"   "Enable"

EndSection

```

As you can see, I've tried a LOT of mouse options, trying to get this working.  Right now, the ONLY way it will work is with the "mouse" driver; the "evdev" driver causes the segfault crash.

I have put "evdev" into the INPUT_DEVICES section of /etc/make.conf, and done a subsequent "emerge -Du --newuse world" and a "revdep-rebuild".

Finally, here is the compile error I keep getting:

```

 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -O2 -march=k8 -pipe -DXFree86Server -DIN_MODULE -DXFree86Module -DXFree86LOADER -I/usr/include/xorg -I../src -MT evdev_drv_la-evdev_brain.lo -MD -MP -MF .deps/evdev_drv_la-evdev_brain.Tpo -c evdev_brain.c  -fPIC -DPIC -o .libs/evdev_drv_la-evdev_brain.o

evdev.c: In function `EvdevSwitchMode':

evdev.c:235: error: `SendCoreEvents' undeclared (first use in this function)

evdev.c:235: error: (Each undeclared identifier is reported only once

evdev.c:235: error: for each function it appears in.)

evdev.c:236: error: `DontSendCoreEvents' undeclared (first use in this function)

make[2]: *** [evdev_drv_la-evdev.lo] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: Leaving directory `/var/tmp/portage/xf86-input-evdev-1.1.2-r2/work/xf86-input-evdev-1.1.2/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/xf86-input-evdev-1.1.2-r2/work/xf86-input-evdev-1.1.2'

make: *** [all] Error 2

!!! ERROR: x11-drivers/xf86-input-evdev-1.1.2-r2 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  ebuild.sh, line 1255:   Called x-modular_src_compile

  x-modular.eclass, line 333:   Called x-modular_src_make

  x-modular.eclass, line 328:   Called die

!!! emake failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

```

At this point, I'm stumped!  If you can help, please, please post!

Thanks.

--DaneLast edited by DaneM on Sun Dec 10, 2006 10:28 pm; edited 1 time in total

----------

## whig

Just two things from me: don't load the dri X module with nvidia drivers; check kernel is evdev enabled.

----------

## DaneM

Thanks for the reply.

Evdev is enabled in the kernel, and I have now disabled DRI, but still no love.

Any more ideas?

Thanks.

--Dane

----------

## whig

This is my xorg mouse section, try it with your MS mouse (longshot).

```
Section "InputDevice"

        Identifier      "Logitech MX510 evdev"

        Driver          "evdev"

        Option          "evBits"        "+1-2"

        Option          "keyBits"       "~272-287"

        Option          "relBits"       "~0-2 ~6 ~8"

EndSection
```

----------

## DaneM

After about another 6 hours of fiddling with it, I managed to come to a solution.  Here's my newly-working xorg.conf:

```

Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   ModulePath   "/usr/lib64/xorg/modules"

   FontPath     "/usr/share/fonts/misc"

   FontPath     "/usr/share/fonts/75dpi"

   FontPath     "/usr/share/fonts/100dpi"

   FontPath     "/usr/share/fonts/TTF"

   FontPath     "/usr/share/fonts/Type1"

EndSection

Section "Module"

   Load  "glx"

   Load  "evdev"

   Load  "extmod"

   Load  "xtrap"

   Load  "record"

   Load  "dbe"

#   Load  "dri"

   Load  "freetype"

#   Load  "type1"

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

   SubSection  "extmod"

      Option    "omit xfree86-dga"   # don't initialise the DGA extension

   EndSubSection

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

   Option   "AutoRepeat"   "500 5"

   Option   "XkbModel"   "microsoft"

   Option   "XkbLayout"   "dvorak, us"

EndSection

#Section "Input Device"

#*   Identifier  "Keyboard0"

#*   Driver       "evdev"

#*   Option       "Device" "/dev/input/event1"

#   Option       "Dev Phys" "isa0060/serio0/input0"

#   Option       "Bus" "0011"

#*   Option       "CoreKeyboard"

#   Option       "Dev Name" "AT Translated Set 2 keyboard"

#   Option       "evBits" "+1"

#   Option       "keyBits" "~1-40 ~42-83 ~87-88 ~96-111 ~117-119 ~125-127"

#   Option       "Pass" "2"

#   Option       "AutoRepeat" "500 5"

#   Option       "XkbModel" "microsoft"

#   Option       "XkbModel" "pc104"

#   Option       "XkbLayout" "dvorak, us"

#   Option       "XkbLayout" "dvorak"

#EndSection

#Section "InputDevice"

#   Identifier  "Mouse0"

#   Driver      "mouse"

#   Option       "Protocol" "auto"

#   Option       "Device" "/dev/input/mouse0"

#   Option       "Device" "/dev/input/mice"

#   Option       "ZAxisMapping" "4 5 6 7"

#EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver       "evdev"

#   Driver       "mouse"

#   Option       "Protocol" "evdev"

#   Option       "Protocol" "auto"

#   Option       "Buttons" "7"

#   Option       "ZAxisMapping" "4 5 6 7"

#   Option       "Dev Name" "Microsoft Microsoft Wireless Optical Mouse 1.0A"

#   Option       "Dev Name" "ImExPS/2 Generic Explorer Mouse"

   Option       "CorePointer"

#   Option       "Bus" "0003"

#   Option       "Dev Phys" "usb-0000:00:02.0-3/input0"

#   Option       "Dev Phys" "isa0060/serio1/input0"

#   Option       "Device" "/dev/input/event2"

   Option       "Device" "/dev/input/event4"

#   Option       "Emulate3Buttons" "no"

#   Option       "Pass" "2"

#   Option       "evBits" "+1"

#   Option       "keyBits" "~272-276"

#   Option       "relBits" "~0-1 ~6 ~8"

   Option       "SendCoreEvents" "true"

   Option       "HWHEELRelativeAxisButtons" "7 6"

EndSection

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName    "Monitor Model"

   HorizSync   30-85

   VertRefresh   50-160

EndSection

Section "Device"

   Identifier  "Card0"

   Driver      "nvidia"

   Option       "NoLogo" "true"

   VendorName  "nVidia Corporation"

   BoardName   "NV43 [GeForce 6600 GT]"

   BusID       "PCI:1:0:0"

        VideoRam    131072

        Option      "RenderAccel" "1"

   Option       "AllowGLXWithCompisite" "true"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   DefaultDepth   24

   SubSection "Display"

      Viewport   0 0

      Depth     1

      Option      "AddARGBGLXVisuals" "true"

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     4

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     8

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     15

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     16

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

      Modes   "1280x960" "1152x864" "1024x768" "832x624" "800x600" "640x480"

   EndSubSection

EndSection

Section "Extensions"

   Option       "Composite"   "Enable"

EndSection

```

Here's the contents of /proc/bus/input/devices:

```

I: Bus=0010 Vendor=001f Product=0001 Version=0100

N: Name="PC Speaker"

P: Phys=isa0061/input0

S: Sysfs=/class/input/input0

H: Handlers=kbd event0

B: EV=40001

B: SND=6

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41

N: Name="AT Translated Set 2 keyboard"

P: Phys=isa0060/serio0/input0

S: Sysfs=/class/input/input1

H: Handlers=kbd event1

B: EV=120013

B: KEY=402000000 3802078f840d001 feffffdfffefffff fffffffffffffffe

B: MSC=10

B: LED=7

I: Bus=0003 Vendor=0f30 Product=0107 Version=0101

N: Name="Jess Tech USB 4-Axis 12-Button Gamepad"

P: Phys=usb-0000:00:02.0-1/input0

S: Sysfs=/class/input/input2

H: Handlers=js0 event2

B: EV=b

B: KEY=fff00000000 0 0 0 0

B: ABS=30027

I: Bus=0003 Vendor=045e Product=0038 Version=0108

N: Name="Microsoft SideWinder Precision 2 Joystick"

P: Phys=usb-0000:00:02.0-2/input0

S: Sysfs=/class/input/input3

H: Handlers=js1 event3

B: EV=b

B: KEY=ff00000000 0 0 0 0

B: ABS=30063

I: Bus=0003 Vendor=045e Product=008c Version=0057

N: Name="Microsoft Microsoft Wireless Optical Mouse® 1.0A"

P: Phys=usb-0000:00:02.0-3/input0

S: Sysfs=/class/input/input7

H: Handlers=mouse0 event4

B: EV=7

B: KEY=1f0000 0 0 0 0

B: REL=1c3

```

Hopefully my efforts will help somebody in the future.

Thanks for your help!

--Dane

----------

