XBox 360 Controller Automatically becomes mouse in Xorg

Bug #277915 reported by Philip Kovac on 2008-10-04
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Undecided
Unassigned
xserver-xorg-input-evdev (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: xorg

On Ubuntu Intrepid, Xorg automatically picks up my Wired XBox 360 controller as a mouse. The joystick moves the cursor.

I suspect this is not how most users of the XBox 360 controller would like to use it. It should not be automatically treated as an Xorg input device by default.

It'd be slightly less problematic if it actually worked correctly, however, a button press causes Xorg to restart. I will file another bug regarding this.

Relevant Xorg log section:

(II) config/hal: Adding input device Microsoft X-Box 360 pad
(**) Microsoft X-Box 360 pad: always reports core events
(**) Microsoft X-Box 360 pad: Device: "/dev/input/event6"
(II) Microsoft X-Box 360 pad: Found x and y absolute axes
(II) Microsoft X-Box 360 pad: Found 2 mouse buttons
(II) Microsoft X-Box 360 pad: Configuring as mouse
(II) XINPUT: Adding extended input device "Microsoft X-Box 360 pad" (type: MOUSE)
(**) Microsoft X-Box 360 pad: YAxisMapping: buttons 4 and 5
(**) Microsoft X-Box 360 pad: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

lsb_release -rd:
Description: Ubuntu intrepid (development branch)
Release: 8.10
[lspci]
00:00.0 Host bridge [0600]: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller [8086:29c0] (rev 02)
     Subsystem: Micro-Star International Co., Ltd. Device [1462:7360]
01:00.0 VGA compatible controller [0300]: nVidia Corporation GeForce 8500 GT [10de:0421] (rev a1)
     Subsystem: Micro-Star International Co., Ltd. Device [1462:0960]

Philip Kovac (pkovac) wrote :

It should be noted that this default occasionally causes the mouse to "jitter" and snap to center.

Additionally, I feel this bug is made more serious by bug #277917.

Bryce Harrington (bryce) wrote :

Hi pkovac,

Please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

Changed in xorg:
status: New → Incomplete
Philip Kovac (pkovac) wrote :
Philip Kovac (pkovac) wrote :

The only explicit declaration made in my Xorg.conf is in the Device section, where the 'nvidia' driver is explicitly set (I think this was performed by the restricted driver manager, as I don't remember altering it.) Other than that, it seems to be the default "skeletal" config.

Pbya9 (pbya9) wrote :

This also happens to me. I'm using the RC of 8.10 upgraded to the final release.

I am also using nVidia drivers, and also have a Logitech mouse, though it's reported as "USB-PS/2 Optical" instead of "Game" in the xorg log.

Additionally, button presses don't cause xorg to crash on my system.

The program I use it with no longer recognizes controller inputs because of this.

mous16 (mous16-info) wrote :

A my friend is also having the same problem with the joystick, using the nvidia driver (relationated?).

Francesco

Roland S. (kaiser-ger) wrote :

It is the same with me, too: XBOX360 Controllers behaves like a mouse thus it is barely usable for gaming. I use Intrepid x86 final and ATI fglrx.
A Logitech MX510 mouse & Cherry keyboard are attached to USB as well. Different Saitek controller with analog sticks works correctly.

Kaiser

Daniel Meinzer (dan-meinzer) wrote :

Upgraded from 8.04 to 8.10 and have this problem. Microsoft Xbox 360 controllers are useless. They act as a mouse in Ubuntu and are not detected by SDL or anything.

Soheb Mahmood (soheb) wrote :

While I don't suffer the problem where any button press on the controller causes the XOrg to restart, I do get the problem where the left stick (#7 in this diagram http://img237.imageshack.us/img237/3139/xbox360controllerwc0.jpg) acts as a mouse. I've tried jcalibrator and while it recognises my xbox 360 controller is connected, it can't get any input.

I've attached my output of the "lspci -vvnn" command. Hope it helps.

I also get this.
I attached my lspci -vvn as well
If I install the xserver Joystick module, it seems to try configuring it as a joystick but fails with
"Nov 30 12:25:07 ryan-desktop kernel: [ 767.057643] evdev.c(EVIOCGBIT): Suspicious buffer size 511, limiting output to 64 bytes. See http://userweb.kernel.org/~dtor/eviocgbit-bug.html"
and then
"(WW) JOYSTICK: Read failed. Deactivating device."

Changed in xorg:
status: Incomplete → Confirmed
Daniel Meinzer (dan-meinzer) wrote :

To quote http://ubuntuforums.org/showpost.php?p=6269532&postcount=5

How to make it work:

$ xinput list
   See which device number the Xbox controller has...
$ xinput set-int-prop THATDEVICENUMBER 'Device Enabled' 32 0

This will make the controller act as a controller instead of controlling the mouse.

Soheb Mahmood (soheb) wrote :

Thanks Daniel! That works brilliantly.

pixel_juice (benjarvis) wrote :

While that command fixes the behavior, it is only temporary. Is there a way to make it permanent?

I am using Ubuntu 8.10 Intrepid Ibex.

Timo Aaltonen (tjaalton) wrote :

no need to keep open for 'xorg'.

Changed in xorg:
status: New → Invalid
Luke Clements (i-am-luke08) wrote :

Good command to fix it, however is there any way to automatically read the ID and patch it, say in a launcher script for games, or at startup... I can confirm this fix though for a wired Xbox (original) controller.

I wrote a quick little one-liner you could call at login, based off of the
bit Daniel posted (assuming you leave the controller plugged in.)
xinput set-int-prop `xinput list | grep "X-Box 360 pad" | perl -ne 'print
/id=(\d+)/'` 'Device Enabled' 32 0

Since you're using an XBox gamepad you may need to change grep's arguments.
I've not really looked for a "right way" to fix this, since in my current
use case I don't logout of X or unplug/replug the controller very often,
both of which require rerunning this. You could probably hack around a bit
and make it run as part of a udev event, on a guess, though I could very
easily be wrong.

On Mon, Jan 5, 2009 at 11:44 AM, Luke Clements <email address hidden>wrote:

> Good command to fix it, however is there any way to automatically read
> the ID and patch it, say in a launcher script for games, or at
> startup... I can confirm this fix though for a wired Xbox (original)
> controller.
>
> --
> XBox 360 Controller Automatically becomes mouse in Xorg
> https://bugs.launchpad.net/bugs/277915
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Luke Clements (i-am-luke08) wrote :

That little script works great! I use
xinput set-int-prop `xinput list | grep "Zeroplus Xbox Controller" | perl -ne 'print
/id=(\d+)/'` 'Device Enabled' 32 0
which works fine. This is pretty much a fix to the bug then?

Philip Kovac (pkovac) wrote :

I'd hardly describe it as a fix as much as a "less unpleasant workaround,"
since the real problem lies in the fact it is treated as an X input device
at all by default. I'm not sufficiently knowledgeable about the underlying
systems to see how to fix it "properly."

Ken Neely (kenwneely) wrote :

I found that the fix/workaround helps, but there is one extra weird bug I am getting here: When ever I run a windows game in wine 1.1.12 that uses a controller (and worked fine on my logitech dual action) the screen begins to spin around (???) despite having run this fix. It is as if wine is registering that my XBox360 controller has a stuck analog controller.

Also note: I am running games that predate the XBox360 controller (Stubbs the Zombie and Legacy of Kain Defiance). I Also have a script that automatically disables compiz whenever I run one of my games.

How can we help to speed up the process of getting this fixed?

Bryce Harrington (bryce) on 2009-01-23
description: updated

Has there been any progress at all on getting this bug fixed? This bug is a colossal annoyance.

The little script is certainly not a fix. It should plug in and just work. How can we get this rolling?

Philip Kovac (pkovac) wrote :

This bug seems to be fixed in Ubuntu Jaunty.

Timo Aaltonen (tjaalton) wrote :

Thanks, closing as fixed.

Changed in xserver-xorg-input-evdev (Ubuntu):
status: Confirmed → Fix Released
Jason (beatme101) wrote :

Are you sure this is fixed, because I'm on Xubuntu 14.04 and this still happens. It locked the cursor to the top of the screen and made all my programs permanently 90% transparent. Removing xserver-xorg-input-joystick has no effect.

Lewis Cowles (lewiscowles) wrote :

Unfortunately I've just experienced this bug in Xenial with a Wireless Adaptor and pad. I think it's Likely a regression.

Bus 002 Device 020: ID 045e:0291 Microsoft Corp. Xbox 360 Wireless Receiver for Windows

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

Other bug subscribers