Bug 28912 - Wireless Mobile Mouse 6000 recognised as joystick
Summary: Wireless Mobile Mouse 6000 recognised as joystick
Status: REOPENED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 22:41 UTC by Julian Sikorski
Modified: 2016-06-26 05:37 UTC (History)
20 users (show)

See Also:
Kernel Version: 4.0.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
/proc/bus/input/devices (4.78 KB, text/plain)
2015-05-16 01:42 UTC, Denilson Figueiredo de Sá
Details

Description Julian Sikorski 2011-02-11 22:41:20 UTC
The said mouse is being recongnised as a joystick, interfering with input in games [1] and arcade emulators [2].
The following appears in /var/log/messages when you plug the transceiver in:

Feb 11 23:40:08 snowball kernel: [37176.263281] usb 4-2: new full speed USB device using uhci_hcd and address 4
Feb 11 23:40:08 snowball kernel: [37176.423066] usb 4-2: New USB device found, idVendor=045e, idProduct=0745
Feb 11 23:40:08 snowball kernel: [37176.423070] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 11 23:40:08 snowball kernel: [37176.423074] usb 4-2: Product: Microsoft® Nano Transceiver v2.0
Feb 11 23:40:08 snowball kernel: [37176.423077] usb 4-2: Manufacturer: Microsoft
Feb 11 23:40:08 snowball kernel: [37176.434375] input: Microsoft Microsoft® Nano Transceiver v2.0 as /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0/input/input13
Feb 11 23:40:08 snowball kernel: [37176.435724] generic-usb 0003:045E:0745.0007: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Microsoft® Nano Transceiver v2.0] on usb-0000:00:1d.2-2/input0
Feb 11 23:40:08 snowball kernel: [37176.442886] input: Microsoft Microsoft® Nano Transceiver v2.0 as /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.1/input/input14
Feb 11 23:40:08 snowball kernel: [37176.443441] generic-usb 0003:045E:0745.0008: input,hidraw1: USB HID v1.11 Mouse [Microsoft Microsoft® Nano Transceiver v2.0] on usb-0000:00:1d.2-2/input1
Feb 11 23:40:08 snowball kernel: [37176.468551] input: Microsoft Microsoft® Nano Transceiver v2.0 as /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.2/input/input15
Feb 11 23:40:08 snowball kernel: [37176.472126] generic-usb 0003:045E:0745.0009: input,hiddev96,hidraw2: USB HID v1.11 Device [Microsoft Microsoft® Nano Transceiver v2.0] on usb-0000:00:1d.2-2/input2

Please let me know what other info is needed to help resolving this issue.

[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/581862
[2] http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=67390
Comment 1 Fab 2011-06-07 11:39:29 UTC
Same behavior on gentoo (using kernel 2.6.37.6) with Microsoft Wireless Optical Desktop keyboard and mouse combo, seems to be an old bug, see [1].

[1] http://forums.gentoo.org/viewtopic-t-362032.html
Comment 2 Timo Jyrinki 2013-01-11 17:17:12 UTC
Collected some similar downstream bugs to be duplicates of the following bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/390959
Comment 3 Alan 2013-12-11 12:23:55 UTC

Closing as obsolete, if this is still seen on modern kernels please update
Comment 4 Fab 2013-12-11 13:04:41 UTC
Still a problem here on 3.10 series. Please reopen.
Comment 5 Alan 2013-12-11 13:41:13 UTC
Thanks
Comment 6 Josef Schlehofer 2014-06-16 21:16:56 UTC
Problem still exists with latest kernel (3.15)
Comment 7 Dor Askayo 2014-08-16 08:02:14 UTC
Still happens in 3.16.1.
Comment 8 Thomas Langkamp 2014-10-30 10:10:03 UTC
confirmed with 3.16.4 and A4tech X7 mouse (openSUSE Factory x64)

workaround: 
sudo rm /dev/input/js0

But this has to be done after every reboot.


A google for "linux recognize mouse as joystick" for example gives you many results of many people experiencing this, some even with keyboards as joysticks on all Distros.
I found that this bug exists at least since 2010:

http://forums.fedoraforum.org/archive/index.php/t-240201.html

"Hello,
I have the mouse X7, model XL-750F from A4tech. This mouse was running with Fedora 10 without any problems.
Now I have installed Fedora 12 and my mouse pointer always moves to one side or corner of the screen.
My second Logitech mouse is working fine. But it is a little bit old.
So, if anyone can help my with my A4tech mouse ... "
Comment 9 jufofu 2014-10-31 19:30:56 UTC
Workaround for MS Sculpt Ergonomic Desktop: https://forum.manjaro.org/index.php?PHPSESSID=edmjqlp8356fi33uc12ag0hfj0&topic=15275
Comment 10 Thomas Langkamp 2014-11-01 13:29:57 UTC
updated today to 3.17.1 - still there
workaround is nice, but not a solution for the average user...

what logs etc do you need to fix this?
Comment 11 ghallberg 2015-01-27 21:27:13 UTC
And this is still an issue in 3.18.2
Comment 12 Dor Askayo 2015-04-07 10:31:46 UTC
No change in 3.19.3. Would love for it to get some more attention.
Comment 13 Alexander 2015-04-27 15:08:22 UTC
Chiming in to note this also effects Microsoft Mouse 4000 (Model 1383) as well as many other Microsoft-brand wireless devices.  Relevant: https://bugzilla.kernel.org/show_bug.cgi?id=37982 and a Ubuntu bug report dating back to 2009 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/390959

This is pretty huge for anyone with a Microsoft mouse, as it renders many games unplayable.  Workarounds exist but involving udev rules but they are device specific and have mixed results.
Comment 14 Dor Askayo 2015-04-30 08:36:29 UTC
Still happens in 4.0.1. It's getting absurd at this point.
Comment 15 Denilson Figueiredo de Sá 2015-05-15 17:10:04 UTC
As a workaround, I tried collecting several Vendor/Product IDs that trigger this bug, and created a udev rule for disabling the joystick device for them. I'm sharing this udev rule file at: https://gist.github.com/denilsonsa/978f1d842cf5430f57f6
Comment 16 Dmitry Torokhov 2015-05-15 21:08:51 UTC
What is the /proc/bus/input/devices for that mouse please?
Comment 17 Denilson Figueiredo de Sá 2015-05-16 01:42:49 UTC
Created attachment 177051 [details]
/proc/bus/input/devices

I have a "Microsoft Wireless Desktop 800", which is a tiny wireless receiver for both mouse and keyboard. It gets detected as a joystick with several axes (besides the normal mouse and keyboard).

I also have a "Wacom Graphire 4" tablet, that also gets detected as a joystick.

Right now I'm using Ubuntu 15.04 with Linux kernel 3.19.0, but this bug exists for several years.

Relevant lsusb lines:

Bus 001 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 003: ID 056a:0016 Wacom Co., Ltd Graphire 4 6x8


I also remember that the following project also got (incorrectly) detected as a joystick:
https://bitbucket.org/denilsonsa/atmega8-magnetometer-usb-mouse
https://github.com/denilsonsa/atmega8-magnetometer-usb-mouse
However, I can't provide more info on it because I don't have the hardware anymore and it happened 4 years ago. If you really really want, I can hack that project again on a breadboard, but it might take a while.


Still, if you need more info regarding the Microsoft wireless keyboard/mouse, or regarding the Wacom tablet, just ask and I can provide right away.
Comment 18 Alexandr 2015-05-22 05:57:03 UTC
Ubuntu 15.04 bug exist with A4Tech X7 mouse:
dmesg:
[ 684.641672] usb 1-2.1: new full-speed USB device number 6 using ehci-pci
[ 684.914756] usb 1-2.1: New USB device found, idVendor=09da, idProduct=8090
[ 684.914761] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 684.914764] usb 1-2.1: Product: USB Full Speed
[ 684.914765] usb 1-2.1: Manufacturer: A4Tech
[ 684.916844] input: A4Tech USB Full Speed as /devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1:1.0/0003:09DA:8090.0006/input/input18
[ 684.917106] hid-generic 0003:09DA:8090.0006: input,hidraw1: USB HID v1.11 Mouse [A4Tech USB Full Speed] on usb-0000:00:12.2-2.1/input0
[ 684.919709] input: A4Tech USB Full Speed as /devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1:1.1/0003:09DA:8090.0007/input/input19
[ 685.025280] hid-generic 0003:09DA:8090.0007: input,hiddev0,hidraw2: USB HID v1.11 Keyboard [A4Tech USB Full Speed] on usb-0000:00:12.2-2.1/input1

lsusb:
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 058f:6364 Alcor Micro Corp. AU6477 Card Reader Controller
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 07d1:3a10 D-Link System DWA-126 802.11n Wireless Adapter [Atheros AR9271]
Bus 001 Device 005: ID 062a:0201 Creative Labs Defender Office Keyboard (K7310) S Zodiak KM-9010
Bus 001 Device 006: ID 09da:8090 A4 Tech Co., Ltd X-718BK Oscar Optical Gaming Mouse <---------------- This is my mouse
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Comment 19 Alexandr 2015-05-22 05:59:02 UTC
(In reply to Denilson Figueiredo de Sá from comment #15)
> As a workaround, I tried collecting several Vendor/Product IDs that trigger
> this bug, and created a udev rule for disabling the joystick device for
> them. I'm sharing this udev rule file at:
> https://gist.github.com/denilsonsa/978f1d842cf5430f57f6

Thanx!
There is A4Tech X7 mouse with that bug:
---------------------------------------LSUSB--------------
Bus 001 Device 006: ID 09da:8090 A4 Tech Co., Ltd X-718BK Oscar Optical Gaming Mouse
---------------------------------------DMESG-------------
new full-speed USB device number 6 using ehci-pci
[ 684.914756] usb 1-2.1: New USB device found, idVendor=09da, idProduct=8090
[ 684.914761] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 684.914764] usb 1-2.1: Product: USB Full Speed
[ 684.914765] usb 1-2.1: Manufacturer: A4Tech
[ 684.916844] input: A4Tech USB Full Speed as /devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1:1.0/0003:09DA:8090.0006/input/input18
[ 684.917106] hid-generic 0003:09DA:8090.0006: input,hidraw1: USB HID v1.11 Mouse [A4Tech USB Full Speed] on usb-0000:00:12.2-2.1/input0
[ 684.919709] input: A4Tech USB Full Speed as /devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1:1.1/0003:09DA:8090.0007/input/input19
[ 685.025280] hid-generic 0003:09DA:8090.0007: input,hiddev0,hidraw2: USB HID v1.11 Keyboard [A4Tech USB Full Speed] on usb-0000:00:12.2-2.1/input1
Comment 20 ghallberg 2015-09-22 17:51:57 UTC
Is there anything one can do to get some attention to this bug? Even with disabling access to the /dev nodes, the mere presence of these bad "joysticks" causes havoc with other gamepads (at least the XBOX360 wireless ones).
Comment 21 Alex Hultman 2015-10-21 23:00:34 UTC
The Cooler Master Mizar mouse is facing the same issues. Here is a link to the Valve bug report:

https://github.com/ValveSoftware/steam-for-linux/issues/3943

This is still an issue in Linux 4.2.3.
Comment 22 Jason Gerecke 2016-04-08 18:47:30 UTC
For those inclined to work on kernel code, the following is a good starting point to understanding why current devices are detected as joysticks:

 * [1] drivers/input/joydev.c:joydev_ids[]
 * [2] drivers/input/joydev.c:joydev_match()
 * [3] drivers/input/joydev.c:joydev_dev_is_absolute_mouse()

Looking at these three, it appears a joystick device will be created for input devices which have any of the following events...

 * ABS_X
 * ABS_WHEEL
 * ABS_THROTTLE
 * BTN_JOYSTICK
 * BTN_GAMEPAD
 * BTN_TRIGGER_HAPPY

... *unless* one of the following is also present (or the device appears to be a an "absolute mouse")

 * BTN_TOUCH
 * BTN_DIGI (aka BTN_TOOL_PEN)

(You can use a tool like "evemu-record" to determine the events that are sent from specific /dev/input/event* devices)

Possible solutions would be to improve the the filtering by adding additional checks that filter out the problem devices without preventing legitimate joysticks from appearing; altering the input/HID drivers that add these events if some events are added incorrectly; or adding a blacklist table to joydev.c that prevents the driver from matching devices with specific IDs.

[1]: http://lxr.free-electrons.com/source/drivers/input/joydev.c#L942
[2]: http://lxr.free-electrons.com/source/drivers/input/joydev.c#L798
[3]: http://lxr.free-electrons.com/source/drivers/input/joydev.c#L740

Note You need to log in before you can comment on or make changes to this bug.