# evdev driver problems

## dennisn

Holy f**k, my transition to evdev has been (is still ongoing!) brutal. And documentation is sparse at best.

After successfully installing the driver, and setting xorg.conf accordingly:

```

Section "InputDevice"

   Identifier "Keyboard"

   Driver "evdev"

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

   Option "XkbRules" "xorg"

   Option "XkbModel" "logicink"

   Option "XkbLayout" "us"

EndSection

Section "InputDevice"

   Identifier "Mouse"

   Driver "evdev"

   Option "Device" "/dev/input/event0"

EndSection

```

Two main problems persist. The simpler one being the mouse. Arrgh. As has been mentioned in previous posts here, buttons 2 and 3 are swapped. However, xmodmaping them back in order doesn't work!

```

xmodmap -e "pointer = `echo {1..32}`"

```

Although xmodmap -pp shows the physical buttons match the button codes, xev shows they are still swapped! (they are). Why isn't X listening to xmodmap?

And, the problem I orignally set out to tackle was the extra "multimedia" keys on my keyboard. Now with evdev, I get keycodes for all the keys, with keycodes ranging from about 10 to 180. However, using xmodmap, I can only seem to define keycodes between 8-136. Those keys that produce keycodes above 136 show no keysym in xev, and if i try to xmodmap them, i get bad keycode value (out of range). Also, many multimedia keys with low keycodes conflict with my regular keys (like my number keys 1,2,3,4,etc).

Arrgh. What a mess.

Also, setxkbmap us seg faults,

```

$ setxkbmap us

Couldn't interpret _XKB_RULES_NAMES property

Use defaults: rules - 'xorg' model - 'pc101' layout - 'us'

Segmentation fault

```

I think this was usually caused by an incomplete xorg.conf. But i'm not sure what is causing it in this case. Why isn't _XKB_RULES_NAMES being set? Maybe during my migration to modular X, the paths to xkb symbols, etc, broke? Or some other migration issue? Or maybe evdev is broken.

Please help.

----------

## dennisn

 *dennisn wrote:*   

> 
> 
> Also, setxkbmap us seg faults,
> 
> ```
> ...

 

I don't think it is a migration issue. I do think it is an evdev (or my config) problem. setxkbmap works just fine when the InputDevice Driver is "kbd".

----------

## irondog

This problem has been filed several times on these forums.

It's clearly a problem when using Xorg7.0. I'm also waiting for this bug to get fixed.

----------

## Aysen

 *dennisn wrote:*   

> Two main problems persist. The simpler one being the mouse. Arrgh. As has been mentioned in previous posts here, buttons 2 and 3 are swapped. However, xmodmaping them back in order doesn't work!
> 
> ```
> 
> xmodmap -e "pointer = `echo {1..32}`"
> ...

 xmodmap doesn't work in a way you think it does. When you write "pointer = `echo {1..32}`", you just map mouse's physical buttons 1..32 to X.org's buttons 1..32, so you don't change anything. What you want is "pointer = 1 3 2 `echo {4..32}`". If your mouse has thumb buttons for back and forward actions, you probably want "pointer = 1 3 2 4 5 8 9 6 7 `echo {10..32}`" (provided that they normally produce 8 and 9 button codes).

As for multimedia keys, it's still unsolved, but many people (me too) have this problem and we're working on it!  :Smile: 

----------

