#563385 xserver-xorg-input-evdev: evdev ignores button mapping configured in hal

Package:
xserver-xorg-input-evdev
Source:
xserver-xorg-input-evdev
Description:
X.Org X server -- evdev input driver
Submitter:
clohr
Date:
2010-03-06 12:39:06 UTC
Severity:
normal
#563385#5
Date:
2010-01-02 13:52:40 UTC
From:
To:
Hi,
  Here is the way I configure button mapping of my left mouse :

$ cat /etc/hal/fdi/policy/mapping.fdi
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <match key="info.capabilities" contains="input.mouse">
    <match key="info.product" contains="Logitech USB-PS/2 Optical Mouse">
      <merge key="input.x11_options.ButtonMapping" type="string">3 2 1</merge>
    </match>
  </match>
</deviceinfo>


According to /var/log/Xorg.0.log, it's ok for xorg:
....
(II) config/hal: Adding input device Logitech USB-PS/2 Optical Mouse
(**) Logitech USB-PS/2 Optical Mouse: always reports core events
(**) Logitech USB-PS/2 Optical Mouse: Device: "/dev/input/event2"
(**) Logitech USB-PS/2 Optical Mouse: ButtonMapping '3 2 1'
(II) Logitech USB-PS/2 Optical Mouse: Found 3 mouse buttons
(II) Logitech USB-PS/2 Optical Mouse: Found x and y relative axes
(II) Logitech USB-PS/2 Optical Mouse: Found scroll wheel(s)
(II) Logitech USB-PS/2 Optical Mouse: Configuring as mouse
(**) Logitech USB-PS/2 Optical Mouse: YAxisMapping: buttons 4 and 5
(**) Logitech USB-PS/2 Optical Mouse: EmulateWheelButton: 4, EmulateWheelInertia : 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Logitech USB-PS/2 Optical Mouse" (type: MOUSE)
....


However, xinput does not see this mapping:
$ xinput get-button-map "Logitech USB-PS/2 Optical Mouse"
1 2 3 4 5 6 7

Wy?

How may I configure button mapping of one of my mouses?

Regards,
Christophe

#563385#10
Date:
2010-02-03 10:14:05 UTC
From:
To:
Hi,

ael a écrit :
Many thanks for your help.

Here is the configuration file that I made based on your suggestion:

        $ cat /etc/udev/rules.d/z60_xorg-input-logitech.rules
        ACTION!="add|change", GOTO="lefthand_end"
        KERNEL!="event*", GOTO="lefthand_end"

        ATTRS{name}=="Logitech USB-PS/2 Optical Mouse", GOTO="lefthand"
        GOTO="lefthand_end"

        LABEL="lefthand"

        ENV{x11_options.ButtonMapping}="3 2 1"

        LABEL="lefthand_end"

Unfortunately it produced the same result as my previous config
with /etc/hal/fdi/policy/...
The mapping is ok for everyone except the evdev driver!


Here is an extract of my /var/log/Xorg.0.log:

(II) config/udev: Adding input device "Logitech USB-PS/2 Optical
Mouse" (/dev/input/event5)
(**) "Logitech USB-PS/2 Optical Mouse": always reports core events
(**) "Logitech USB-PS/2 Optical Mouse": Device: "/dev/input/event5"
(**) "Logitech USB-PS/2 Optical Mouse": ButtonMapping '3 2 1'
(II) "Logitech USB-PS/2 Optical Mouse": Found 3 mouse buttons
(II) "Logitech USB-PS/2 Optical Mouse": Found scroll wheel(s)
(II) "Logitech USB-PS/2 Optical Mouse": Found relative axes
(II) "Logitech USB-PS/2 Optical Mouse": Found x and y relative axes
(II) "Logitech USB-PS/2 Optical Mouse": Configuring as mouse
(**) "Logitech USB-PS/2 Optical Mouse": YAxisMapping: buttons 4 and 5
(**) "Logitech USB-PS/2 Optical Mouse": EmulateWheelButton: 4,
EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device ""Logitech USB-PS/2 Optical
Mouse"" (type: MOUSE)
(**) "Logitech USB-PS/2 Optical Mouse": (accel) keeping acceleration
scheme 1
(**) "Logitech USB-PS/2 Optical Mouse": (accel) acceleration profile 0
(II) "Logitech USB-PS/2 Optical Mouse": initialized for relative axes.
(II) config/udev: Adding input device "Logitech USB-PS/2 Optical
Mouse" (/dev/input/mouse1)
(**) "Logitech USB-PS/2 Optical Mouse": always reports core events
(**) "Logitech USB-PS/2 Optical Mouse": Device: "/dev/input/mouse1"
(EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device
(II) UnloadModule: "evdev"
(EE) PreInit returned NULL for ""Logitech USB-PS/2 Optical Mouse""

The last lines are ... disquieting....


This bug may be similar to
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567491


Regards,
Christophe

#563385#15
Date:
2010-03-06 08:06:23 UTC
From:
To:
Did you manage to make this work?

Brice

#563385#20
Date:
2010-03-06 12:05:00 UTC
From:
To:
ael wrote:

Yes, please, it could help some people, especially the submitter.

Brice

#563385#25
Date:
2010-03-06 12:39:17 UTC
From:
To:
In my quick reply, I hadn't noticed that this was a bug report. My working
udev rules are already linked to
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=558318#58

ael