Distribution: Debian unstable Hardware Environment: Athlon64 3000+, Chaintech vnf3-250 mobo, 1GB ram, SB Audigy (w/game port slot thing attached), Logitech Rumblepad 2 gamepad (usb), MS Sidewinder 3D Pro joystick (gameport) Software Environment: jstest Problem Description: The first button of each of my joysticks did not register as button 0, but instead as an extra button at the end of the list. On kernel 2.6.11.1: Joystick (Microsoft SideWinder 3D Pro) has 6 axes and 9 buttons. Driver version is 2.1.0. When I press the trigger, button 0 is indicated as on. Joystick (Logitech Logitech RumblePad 2 USB) has 6 axes and 12 buttons. Driver version is 2.1.0. When I press the button labelled "1" on the control, jstest indicates button 0 as on. On 2.6.12-rc1-mm1 jstest says: Joystick (Microsoft SideWinder 3D Pro) has 6 axes and 10 buttons. Driver version is 2.1.0. When I press the trigger, button 9 is indicated as on. Joystick (Logitech Logitech RumblePad 2 USB) has 6 axes and 13 buttons. Driver version is 2.1.0. When I press the button labelled "1" on the control, jstest indicates button 12 as on. Steps to reproduce: 1. run jstest <joy device> 2. jstest will say there is one more button than there actually is. 3. press each button on joystick. 4. button 0 never registers, but the extra button number does instead.
Oh, I should note: this was with 64 bit kernel, and the problem occured both with 64bit jstest and 32bit jstest running in a chroot.
Can you test the joysticks with evtest in addition to jstest, to see where the extra button comes from?
Ok, I tested it with evtest under both kernels, though there doesn't seem to be a whole lot of differences.. I'll attach the logs. In each log I also pressed and released (what should be) button 0 once. (The sw3dpro logs have extra events since it's hard to hit the trigger without moving the stick.)
Created attachment 4769 [details] evtest log for rumblepad2 on 2.6.11.1
Created attachment 4770 [details] evtest log for sw3dpro on 2.6.11.1
Created attachment 4771 [details] evtest log for rumblepad2 on 2.6.12-rc1-mm1
Created attachment 4772 [details] evtest log for sw3dpro on 2.6.12-rc1-mm1
Created attachment 4773 [details] Patch to fix the extra button This patch should fix your problems.
Yep, that fixed it. Thanks.
Of course, this patch fixes also my problem (http://lkml.org/lkml/2005/4/12/145). Sorry for posting to LKML without having checked bugzilla first. BTW, I am wondering why this patch is not in -mm or in linus' tree.
Guys, can you please confirm that 2.6.12-rc5 has all the needed fixes and is functioning OK? Thanks.
I will try to test tonight, but IIRC, the fix (http://bugzilla.kernel.org/attachment.cgi?id=4773) is included in ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc5/2.6.12-rc5-mm1/broken-out/bk-input.patch so not in 2.6.12-rc5. This hunk to joydev.c is enough to fix the problem for me: - for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++) + for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++)
I just tested 2.6.12-rc5, the extra button problem is indeed still present.
After actually testing, I confirm the bug is still present.
The fix went into 2.6.12-rc6. Can you confirm it's fixed there?
I confirm it's fixed, the bug should be marked as CLOSED.
I tested 2.6.12, it is fixed there also.
Thanks, I'm therefore closing this bug.