Two-gamepads-in-one are treated like one gamepad

Bug #118384 reported by Turki Al-Marrie
4
Affects Status Importance Assigned to Milestone
joystick (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have two joysticks that share the same usb plug (I'm not using a usb hub) and the system show only one joystick: /dev/input/js0. This joystick is controlled by any of the two joysticks.

After investigation it appeared that it takes input from each joystick one-at-a-frame. E.g. if you press start on joystick1 and select on joystick2 it will input start-select-start-select...

I know this sound confusing, but they work as two under Windows. Please help!

Revision history for this message
Micah Cowan (micahcowan) wrote :

Hello, and thank you for your bug report.

I need the following pieces of information:
  - what model joysticks are you using?
  - what version of the linux kernel are you running (what is the output of "uname -r -m")?
  - is this a problem you are experiencing only with the testing/calibration utilities in the "joystick" package, or is it system-wide? What specific applications have you experienced this problem with?

Changed in joystick:
assignee: nobody → micahcowan
status: Unconfirmed → Needs Info
Revision history for this message
Micah Cowan (micahcowan) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and don't hesitate to submit bug reports in the future.

Changed in joystick:
assignee: micahcowan → nobody
status: Incomplete → Invalid
Revision history for this message
Abu Yoav (abuyoav) wrote :

I can confirm and reproduce the bug. I have an Arduino Leonardo, and I have tried to run on it the code in
http://arduino.cc/forum/index.php/topic,134108.0.html
Namely, the code lets you hook up the Leonardo to two old-school Atari joysticks, and have them appear as two USB joysticks. I only get js0 on /dev/input. When running jscal js0 I get

Joystick has 4 axes and 4 buttons.
Correction for axis 0 is broken line, precision is 0.
Coeficients are: 0, 0, 536870912, 536870912
Correction for axis 1 is broken line, precision is 0.
Coeficients are: 0, 0, 536870912, 536870912
Correction for axis 2 is broken line, precision is 0.
Coeficients are: 0, 0, 536870912, 536870912
Correction for axis 3 is broken line, precision is 0.
Coeficients are: 0, 0, 536870912, 536870912

After commenting out the bit after "// Commodore / Atari Joystick 2", I get
Joystick has 2 axes and 2 buttons.
Correction for axis 0 is broken line, precision is 0.
Coeficients are: 0, 0, 536870912, 536870912
Correction for axis 1 is broken line, precision is 0.
Coeficients are: 0, 0, 536870912, 536870912

So, Ubuntu has merged the two joysticks into one with double the axes and double the buttons.
"cat /etc/lsb-release" gives
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

"uname -a" gives
Linux abuyoav 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Hope this helps

Revision history for this message
mistobaal (elsime) wrote :

i have same problem with same sketch on ubuntu 14.04.. while no problem on windows

Stephen Kitt (steve-sk2)
Changed in joystick (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Stefanos Daniilidis (stefanosdan) wrote :

I can confirm that using arduino leonardo/micro with two virtual devices merges the two devices into one. This also happens in raspbian, too, using Raspberry Pi 3. (4.4.27-v7+ armv7l)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.