Bug#369917: xserver-xorg-input-mouse: Gets number of buttons wrong, even if Option "Buttons" specified
Package: xserver-xorg-input-mouse Severity: normal Version: 1:1.0.4-2 Using a Logitech MX500 mouse (USB), I find that the server is getting the number of buttons wrong (too high). This happens even if I explicitly tell it how many buttons there are. Here is the relevant section of the log showing the server reading one value, then declaring a different one: (**) Generic Keyboard: Core Keyboard (**) Option "Protocol" "standard" (**) Generic Keyboard: Protocol: standard (**) Option "AutoRepeat" "500 30" (**) Option "XkbRules" "xorg" (**) Generic Keyboard: XkbRules: "xorg" (**) Option "XkbModel" "pc104" (**) Generic Keyboard: XkbModel: "pc104" (**) Option "XkbLayout" "us" (**) Generic Keyboard: XkbLayout: "us" (**) Option "XkbOptions" "compose:rwin" (**) Generic Keyboard: XkbOptions: "compose:rwin" (**) Option "CustomKeycodes" "off" (**) Generic Keyboard: CustomKeycodes disabled (**) Option "Protocol" "Auto" (**) Configured Mouse: Device: "/dev/input/mice" (**) Configured Mouse: Protocol: "Auto" (**) Option "CorePointer" (**) Configured Mouse: Core Pointer (**) Option "Device" "/dev/input/mice" (**) Option "Buttons" "10" (==) Configured Mouse: Emulate3Buttons, Emulate3Timeout: 50 (**) Option "ZAxisMapping" "9 10" (**) Configured Mouse: ZAxisMapping: buttons 9 and 10 (**) Configured Mouse: Buttons: 14 (II) XINPUT: Adding extended input device "Configured Mouse" (type: MOUSE) (II) XINPUT: Adding extended input device "Generic Keyboard" (type: KEYBOARD) (--) Configured Mouse: PnP-detected protocol: "ExplorerPS/2" (II) Configured Mouse: ps2EnableDataReporting: succeeded -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-ddawson Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#369917: xserver-xorg-input-mouse: Gets number of buttons wrong, even if Option "Buttons" specified
> I find that the server is getting the number of buttons wrong (too > high). > > (**) Configured Mouse: ZAxisMapping: buttons 9 and 10 > (**) Configured Mouse: Buttons: 14 For reference this button count appears to be coming from mouse.c l.706, /* get maximum of mapped buttons */ for (i = pMse->buttons-1; i >= 0; i--) { int f = ffs (pMse->buttonMap[i]); if (f > pMse->buttons) pMse->buttons = f; } That is, the original value is being reset to the value of ffs(pMse->buttonMap[i]), where this is larger. The larger number appears to be ("actual" number)+4. At a guess, the extra 4 buttons correspond to the X- and Y-axes, with the normal mouse wheel occupying the Z-axis. ffs is defined or referred to in /usr/include/xorg/compiler.h and ../xf86_libc.h (xserver-xorg-dev). A low level definition is found in /usr/include/asm-generic/bitops/ffs.h, "find first bit set" I suspect this is not actually a bug. Drew -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]