Bug 13626 - When using two Griffin Powermates, must specify the device path rather than just the name (or it crashes)
Summary: When using two Griffin Powermates, must specify the device path rather than j...
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: 7.2 (2007.02)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-12 10:04 UTC by Shawn Rutledge
Modified: 2008-12-20 21:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Shawn Rutledge 2007-12-12 10:04:22 UTC
I connected two of these.  Then after a fresh boot I had to find out which one belonged to which /dev/input/eventX node, so that I could add lines like these to xorg.conf:

Section "InputDevice"
        Identifier  "Powermate0"
        Driver      "evdev"
        Option      "Device" "/dev/input/event7"
        Option      "DialRelativeAxisButtons" "6 7"
EndSection

Section "InputDevice"
        Identifier  "Powermate1"
        Driver      "evdev"
        Option      "Device" "/dev/input/event8"
        Option      "DialRelativeAxisButtons" "4 5"
EndSection

Then I can use both of them.  What I would like to be able to do instead is this:

Section "InputDevice"
        Identifier  "Powermate0"
        Driver      "evdev"
        Option      "Name" "Griffin PowerMate"
        Option      "DialRelativeAxisButtons" "6 7"
EndSection

If I have only one such device declaration in xorg.conf, but both Powermates are connected, the evdev driver crashes:

Backtrace:
0: /usr/bin/X(xf86SigHandler+0x84) [0x80ce244]
1: [0xb7f4d420]
2: /usr/lib/xorg/modules/input//evdev_drv.so [0xb71f0c41]
3: /usr/lib/xorg/modules/input//evdev_drv.so(evdevNewDriver+0x4c) [0xb71f0c9c]
4: /usr/lib/xorg/modules/input//evdev_drv.so [0xb71ef7c8]
5: /usr/bin/X(InitInput+0x176) [0x80a0fc6]
6: /usr/bin/X(main+0x35f) [0x80701af]
7: /lib/libc.so.6(__libc_start_main+0xd8) [0xb7ccd838]
8: /usr/bin/X(FontFileCompleteXLFD+0xa5) [0x806f601]

If I have two such device declarations, it still crashes.  If only one Powermate is connected, then it's OK for xorg.conf to specify it by name, and it works.  If two Powermates are connected, then the only way is to specify the path to each of them.  This is very brittle; if I hotplug them or plug them into different ports, probably the device path will be different, and it will not be found.  I can imagine writing a script which searches for the Powermates and rewrites that part of xorg.conf each time, but I should not have to do that.

Also I think it should work if I specify the vendor and product IDs rather than the name, but that also does not work.

BTW even if this were working, there is still no way to distinguish the two, because there is no "uniq" ID (EVIOCGUNIQ will probably return an empty string).  So if there is no better solution, it would be acceptable for the evdev driver to detect them both, and which one is the first and which is the second could be based on the order of detection.

cat /proc/bus/input/devices (this is after hotplugging, so the device nodes are different):

...
I: Bus=0003 Vendor=077d Product=0410 Version=0400
N: Name="Griffin PowerMate"
P: Phys=/input0
S: Sysfs=/class/input/input8
U: Uniq=
H: Handlers=event8
B: EV=17
B: KEY=1 0 0 0 0 0 0 0 0
B: REL=80
B: MSC=2

I: Bus=0003 Vendor=077d Product=0410 Version=0400
N: Name="Griffin PowerMate"
P: Phys=/input0
S: Sysfs=/class/input/input9
U: Uniq=
H: Handlers=event7
B: EV=17
B: KEY=1 0 0 0 0 0 0 0 0
B: REL=80
B: MSC=2
Comment 1 Peter Hutterer 2008-12-20 21:26:52 UTC
mass reassignment. Zephaniah isn't the maintainer anymore.
Comment 2 Peter Hutterer 2008-12-20 21:28:43 UTC
Bug is more than 12 months old, closing as WONTFIX. 

Please reopen if this is still an issue with the current release.


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.