Bug 62831 - Mionix Naos 5000 mouse detected incorrectly
Summary: Mionix Naos 5000 mouse detected incorrectly
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
Depends on:
Blocks: 55867
  Show dependency treegraph
Reported: 2013-03-27 17:53 UTC by Simon Lindgren
Modified: 2013-04-17 03:30 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

Evtest output (3.81 KB, text/plain)
2013-03-27 17:53 UTC, Simon Lindgren
no flags Details
0001-Add-option-TypeName-62831.patch (2.96 KB, patch)
2013-04-02 04:49 UTC, Peter Hutterer
no flags Details | Splinter Review

Description Simon Lindgren 2013-03-27 17:53:11 UTC
Created attachment 77118 [details]
Evtest output

I have a Mionix Naos 5000 mouse, and according to hadess in #control-center, it is getting detected as a keyboard.

Steps to reproduce:
1. Plug the mouse in
2. Go to the mouse & touchpad settings in gnome >= 3.6

Expected result:
Mouse settings should be exposed

Actual result:
There are no mouse settings exposed
Comment 1 Bastien Nocera 2013-03-27 17:59:30 UTC
I'm not certain it gets detected as a keyboard, but it doesn't get tagged with XI_MOUSE, which means that we skipped the mouse section of the "mouse & touchpad" panel.
Comment 2 Bastien Nocera 2013-03-27 21:48:11 UTC
This is the output from xinput that I copied from Simon's pastebin:
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ La-VIEW Technology Naos 5000 Mouse      	id=8	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ USB Keyboard                            	id=9	[slave  keyboard (3)]
    ↳ USB Keyboard                            	id=10	[slave  keyboard (3)]
Comment 3 Peter Hutterer 2013-03-27 22:35:36 UTC
Looking at the evtest output, it's not surprising. The mouse looks like a keyboard and we tag it as such. Problem here is that there are many _keyboards_ that have the same or roughly the same evtest output. Not sure a generic solution is possible here.
Comment 4 Simon Lindgren 2013-03-28 15:46:55 UTC
This is the product page for the device:

A notable feature is a programmable macro function. I suspect this is why keyboard key events are possible. If so, perhaps this problem is not localized to this device, but also present in other "gaming" mice?

I have also seen other devices which might be problematic, like a keyboard with an integrated touchpad. Is it possible for a single device to act like multiple types of devices simultaneously?

(I guess it's possible the mentioned keyboard acts as a usb hub with two devices attached, I wouldn't know about that)
Comment 5 Peter Hutterer 2013-04-02 03:51:00 UTC
(In reply to comment #4)
> I have also seen other devices which might be problematic, like a keyboard
> with an integrated touchpad. Is it possible for a single device to act like
> multiple types of devices simultaneously?

yes, and no :)

yes: devices can send pointer and keyboard events and the server will handle it accordingly.

no: the XI protocol spec allows for only one type-name, so a device will be either keyboard, touchpad, mouse, etc. in it's client-visible declination.

The problem here is largely that we don't know in the driver what a device is solely based on the events it sends. The only way to fix this I can see right now is to have this as a config option that's set in a quirk file.
Comment 6 Peter Hutterer 2013-04-02 04:49:46 UTC
Created attachment 77298 [details] [review]

Add option TypeName to be used by devices that need a quirk for the auto-assigned type. Example configuration:

Section "InputClass"
    Identifier "trackball type name"
    MatchDriver "evdev"
    MatchProduct "trackball"
    Option "TypeName" "TRACKBALL" # XI_TRACKBALL
Comment 7 Peter Hutterer 2013-04-17 03:30:43 UTC
commit b59a1a25dad4437e013ce8d3d65d4591c6f4ee4a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 2 14:12:26 2013 +1000

    Add option TypeName (#62831)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.