This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 150047 - USB joystick device problems
USB joystick device problems
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-01 17:11 EST by Paul Osmialowski
Modified: 2015-01-04 17:17 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.6.14-1.1656_FC4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-18 13:42:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Osmialowski 2005-03-01 17:11:44 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1 Fedora/1.0.1-1.3.1

Description of problem:
I've connected USB joystick to my PC and udev has made /dev/input/js0 device. That was fine, everything was working porperly. Dmesg showed:
usb 4-2: new low speed USB device using uhci_hcd and address 2
input: USB HID v1.10 Joystick [Logitech WingMan Attack 2] on usb-0000:00:1d.2-2
Then I plugged off the joystick, udev deleted /dev/input/js0. Dmesg showed:
usb 4-2: USB disconnect, address 2
After a while I've connected joystick again. Dmesg showed:
usb 4-2: new low speed USB device using uhci_hcd and address 3
input: USB HID v1.10 Joystick [Logitech WingMan Attack 2] on usb-0000:00:1d.2-2
Unfortunately, all my programs that I've configured to use /dev/input/js0 device stopped to see joystick. I've looked at /dev/input directory, udev has created /dev/input/js1!!!!
So again, I've plugged off the joystick and plugged on again. Again udev has created /dev/input/js1 as if I had two joysticks which is not the truth.


Version-Release number of selected component (if applicable):
kernel-2.6.10-1.766_FC3 udev-039-10.FC3.6

How reproducible:
Always

Steps to Reproduce:
1. Connect USB joystick to your PC
2. Disconnect USB joystick
3. Connect USB joystick to your PC again
  

Actual Results:  udev has created /dev/input/js1

Expected Results:  udev should create /dev/input/js0

Additional info:

I wonder what unexperienced user would do at the moment. I can imagine him (or her) thinking that joystick is broken, since all programs that used to work with it stopped to see it.
Comment 1 Kay Sievers 2005-03-01 20:00:03 EST
What does:
  ls -l /sys/class/input/*

print if you get the wrong number? It looks like a kernel problem.

Btw: You may match with a udev rule against a unique attribute of
your joystick, like "vendor" or "model" and create a stable name for
that device, independent of the kernel enumeration.

Kay
Comment 2 Paul Osmialowski 2005-03-02 03:22:20 EST
Before getting wrong number:
[root@oyster ~]# ls -l /sys/class/input/*
/sys/class/input/event0:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/event1:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/event2:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev
lrwxrwxrwx  1 root root    0 mar  2 09:30 device ->
../../../devices/pci0000:00/
0000:00:1d.2/usb4/4-2/4-2:1.0
lrwxrwxrwx  1 root root    0 mar  2 09:30 driver ->
../../../bus/usb/drivers/usbhid

/sys/class/input/event3:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/js0:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev
lrwxrwxrwx  1 root root    0 mar  2 09:30 device ->
../../../devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0
lrwxrwxrwx  1 root root    0 mar  2 09:30 driver ->
../../../bus/usb/drivers/usbhid

/sys/class/input/mice:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/mouse0:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

After getting wrong number:
[root@oyster ~]# ls -l /sys/class/input/*
/sys/class/input/event0:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/event1:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/event2:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:31 dev
lrwxrwxrwx  1 root root    0 mar  2 09:31 device ->
../../../devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0
lrwxrwxrwx  1 root root    0 mar  2 09:31 driver ->
../../../bus/usb/drivers/usbhid

/sys/class/input/event3:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/js1:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:31 dev
lrwxrwxrwx  1 root root    0 mar  2 09:31 device ->
../../../devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0
lrwxrwxrwx  1 root root    0 mar  2 09:31 driver ->
../../../bus/usb/drivers/usbhid

/sys/class/input/mice:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

/sys/class/input/mouse0:
razem 0
-r--r--r--  1 root root 4096 mar  2 09:30 dev

Btw btw: If I disconnect one joystick just to connect another one
instead, I'd like both to be seen as /dev/input/js0, so hardcoding
vendor and model names isn't a solution in such a case.
Comment 3 Harald Hoyer 2005-03-02 05:07:30 EST
See! It's not a udev problem... it's the kernel
Comment 4 Dave Jones 2005-07-15 14:15:15 EDT
An update has been released for Fedora Core 3 (kernel-2.6.12-1.1372_FC3) which
may contain a fix for your problem.   Please update to this new kernel, and
report whether or not it fixes your problem.

If you have updated to Fedora Core 4 since this bug was opened, and the problem
still occurs with the latest updates for that release, please change the version
field of this bug to 'fc4'.

Thank you.
Comment 5 Paul Osmialowski 2005-09-02 07:03:14 EDT
Nope, nothing has changed: after disconnecting and connecting joystick
/dev/input/js0 has gone and /dev/input/js1 has been created, so XMMS joystick
plugin refuses to work until I reboot, that's annoying. Dmesgs on re-connections
are:
usb 4-2.1: USB disconnect, address 7
usb 4-2.2: USB disconnect, address 3
usb 4-2.2: new low speed USB device using uhci_hcd and address 8
input: USB HID v1.10 Joystick [Logitech WingMan Attack 2] on usb-0000:00:1d.2-2.2
Comment 6 Dave Jones 2006-01-16 17:32:56 EST
This is a mass-update to all currently open Fedora Core 3 kernel bugs.

Fedora Core 3 support has transitioned to the Fedora Legacy project.
Due to the limited resources of this project, typically only
updates for new security issues are released.

As this bug isn't security related, it has been migrated to a
Fedora Core 4 bug.  Please upgrade to this newer release, and
test if this bug is still present there.

This bug has been placed in NEEDINFO_REPORTER state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

Thank you.
Comment 7 Paul Osmialowski 2006-01-18 13:42:02 EST
I have tested this issue on FC4 with recent kernel (2.6.14-1.1656_FC4) and FC3
with the same FC4 kernel taken from FC4 updates and it works much better now:
after reconnecting USB joystick, device is still named /dev/input/js0. The only
problem is when any program that uses the joystick is working during
reconnection (i.e. XMMS with joystick plugin enabled, or any game that uses a
joy), after that, joystick device is created as /dev/input/js1. Fortunately,
after closing the game and reconnecting joystick, new device is created as
/dev/input/js0.

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