Sorry about the slow response -- it took me a while to be able to take the joysticks to a machine on which I have root privileges (event* is not user-accessible by default).

I did what you suggested. Specifically, I opened two terminals, side-by side. In the first, I ran "evtest /dev/input/event5", for the first joystick. I pushed some buttons to confirm this was the right device. In the second, I ran "evtest /dev/input/event6". I couldn't push any buttons, because in a couple of seconds, evtest printed:

Testing ... (interrupt to exit)
yyy

evtest: error reading: No such device

If I killed the first evtest, and ran "evtest event6" first, then "evtest event5" would refuse to start.

More interestingly, when running the second evtest, the first evtest would sporadically report events! Maybe the two joysticks are being confused at some level? They do look identical as USB devices. Of course, since they're plugged into different ports, this shouldn't be a problem, theoretically :) I played around with plugging one of them through a USB hub, but that didn't help at all.

Another bizarre thing: on the computer where I originally discovered this bug, I was once able to run "cat js0" and "cat js1" side-by-side, and have each window report corresponding events. Previously, one of the cats would bail out. So, the behavior is somewhat non-deterministic (nothing else was changed on that machine from the first test, certainly not the kernel setup). But, even during that unusual session, if I ran the game StepMania (which in addition to opening and reopening the joystick device files performs some ioctls), the usual failure would occur.

I'm very confused...

Alexey

On Tue, 15 Jan 2008, Jiri Kosina wrote:

On Fri, 11 Jan 2008, Alexey Spiridonov wrote:

They are USB HID joysticks. If I plug in one, it works fine. If I plug in two,
each one works fine by itself. However, bad things happen if I attempt to read
data from both simultaneosly, for example like this:
[in one terminal] cat /dev/input/js0
[in another]      cat /dev/input/js1
One of the cats dies about 4 seconds after it's launched (the other keeps
running happily, and reporting events). The death message is:
cat: /dev/input/js1: No such device

Hi Alexey,

when you run evtest on the /dev/input/eventX nodes, instead of jsX, does
this also happen?

I am asking in order to know whether this is a bug in joydev, or somewhere
else.

Thanks,


-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to