Joystick detected as mouse, crashes X

Bug #274203 reported by Tom
126
This bug affects 10 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Invalid
Undecided
Unassigned
xserver-xorg-input-evdev (Ubuntu)
Fix Released
Undecided
Timo Aaltonen
xserver-xorg-input-joystick (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: xorg

When I attach my usb gamepad to the computer X detects it (via HAL) as a mouse and configures it appropriately. Whenever I press a button, the entire X server crashes.

I'm using Intrepid, amd64. I'd be happy to provide any other information that might help.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Please attach the output of 'lshal'.

Changed in xorg:
status: New → Incomplete
Revision history for this message
Tom (tom-weingarten) wrote :

Here is the output of lshal.

Revision history for this message
Gunni (fgunni) wrote :

I can confirm this behaviour

Revision history for this message
Ari Mustonen (amuzen) wrote :

I'm experiencing this as well and decided to poke the bug a bit. Hopefully some of this information turns out to be useful.

Revision history for this message
Ari Mustonen (amuzen) wrote :

Obtained a gdb backtrace of the crash by following the instructions on https://wiki.ubuntu.com/DebuggingXorg

Revision history for this message
Ari Mustonen (amuzen) wrote :

Workaround for my gamepad model. Probably not immediately useful to too many people since you'll have to change the matching criteria if your joystick isn't exactly the same as mine. Then:

sudo cp 95-joystick.fdi /usr/share/hal/fdi/preprobe/20thirdparty/
sudo /etc/init.d/hal restart

And after restarting X, it doesn't seem to crash anymore.

Revision history for this message
gerstrong (gerstrong) wrote :

I have the same problem and the same configuration like Tom!

The workaround didn't help in my case.

Revision history for this message
gerstrong (gerstrong) wrote :

Maybe this helps too!

Revision history for this message
gerstrong (gerstrong) wrote :

I think it has to do something with xorg.conf. In the new version of Xorg, the file isn't read anymore. Something was told about it in the new version.

Now, Hardy had this problem too, when you modified xorg.conf for joystick-input. By default the joystick is enabled, but for using it as input-device for the cursor.

If all devices are detected without xorg.conf, than the system tries to use the joystick for the cursor. That's new in xorg!

In Hardy, the problem was solved recompiling xserver-input-joystick from the source code. I tried this too, but it didn't work!

Maybe it's a glue!

Revision history for this message
Gareth Hart (tghe-retford) wrote :

This bug affects my MadCatz controller. I looked under the KDE Joystick option in KDE's system settings. The joypad is detected correctly but does not show any movement when you move the analog(ue) sticks . I daren't press any button on the joypad knowing it will crash X!

I am using 64-bit Intrepid as well.

It's annoying because I can no longer play my games on my computer which require the joypad to move the character.

Revision history for this message
Martin Emrich (emme) wrote :

Another "me too". Also running intrepid amd64, the joypad is a Saitek P880.

Revision history for this message
yourpalal (alexsleeps) wrote :

This also affects me, I am running intrepid amd64 and the joystick that is crashing it is a ps3 rock band drum kit. It does not instantly crash X, but rather upon hitting one of the pads, I can quickly and easily restart X! This is a regression from 8.04 and the version of X therein, as I know that this 'joystick' was completely functional in that environment.

Revision history for this message
StR34k (pnearing) wrote :

Same here, I can confirm the Siatek p880, and the Logitech Rumble pad 2. Also running Intrepid amd64.

Revision history for this message
StR34k (pnearing) wrote :

Okay, with the help of my room mate on this problem, we have come up with a temporary work around. The problem seems to be with Xorg. Hal seems to detect the joystick properly, and passes the device on to Xorg. Everybody is happy, until Xorg wrongly configures the joystick as a mouse. The fix is to force X NOT to auto configure any devices, and manually configure the joystick in your Xorg. However the result of this, has been that I have lost functionality on my media keys on my keyboard. not too big a deal to me, since I can reach the volume on my speakers easily..... ;) So anyway, here comes the work around:

1. install the xserver joystick input driver:
     sudo apt-get install xserver-xorg-input-joystick

2. Manually edit the xorg.conf to remove auto detection, setup a device for the joystick and include it in the server layout.
    * see attached xorg.conf

3. Restart x and be happy. ;)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-input-joystick - 1:1.3.2-1ubuntu1

---------------
xserver-xorg-input-joystick (1:1.3.2-1ubuntu1) intrepid; urgency=low

  * Add 10-x11-joystick.fdi, with various models listed. (LP: #272421,
    #273364, #274203)

 -- Timo Aaltonen <email address hidden> Mon, 06 Oct 2008 17:24:26 +0300

Changed in xserver-xorg-input-joystick:
status: Incomplete → Fix Released
Revision history for this message
Gareth Hart (tghe-retford) wrote :

I have updated my system with xserver-xorg-input-joystick 1:1.3.2-1ubuntu1 and the bug remains for me.

Revision history for this message
Ari Mustonen (amuzen) wrote :

Installing the newest xserver-xorg-input-joystick package fixes the crash for me, but the fix is incorrect since the problem remains if you don't have the package installed (i.e. if you want to use the joystick for gaming purposes, not as a pointer device).

Changed in xserver-xorg-input-joystick:
status: Fix Released → Confirmed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

That's not a bug in this package.

Changed in xserver-xorg-input-joystick:
status: Confirmed → Fix Released
Revision history for this message
Martin Emrich (emme) wrote :

Yes, I noticed that I never had xserver-xorg-input-joystick installed. But when I temporarily uninstall xserver-xorg-input-evdev, the problem no longer occurs (but my keyboard and mouse also no longer work), so the bug should be moved to xserver-xorg-input-evdev.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Right, let's fix the crasher first :)

good to have a backtrace too. I've informed upstream (via irc).

Changed in xserver-xorg-input-joystick:
assignee: nobody → tjaalton
status: Fix Released → Triaged
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

should be fixed in xserver master.. looking for the commit.

Revision history for this message
Francois Marot (francois-marot) wrote :

I confirm this bug on intrepid beta (KUbuntu). But I add that my joystick is not really stable: I mean that the x/y value are constantly changing even when I do not touch it. This is a problem in my joystick. But once in KDE, it made the mouse constantly recenter itself automatically in the center of the screen. So if I want to reach any icon or menu with the mouse pointer, I have to be fast enough before the cursor recenters itself.
This is really really annoying as not only there is the X crash when pressing a button, but it makes the computer nearly unusable (no mouse)...

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Francois: that's probably fixed in master as well, but something that requires more work to backport and probably not going to be fixed for intrepid. In the meantime please install -joystick.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

...and if installing -joystick doesn't help, open a new bug against it and attach the output of 'lshal'.

Revision history for this message
Francois Marot (francois-marot) wrote : Re: [Bug 274203] Re: Joystick detected as mouse, crashes X

Thanks for your feedback Timo.
What do you mean by "fixed in master" ? Fixed in X master source ?
And when you say it won't be fixed for Intrepid, do you mean it won t
be fixed in the FINAL release of Ubuntu Intrepid ? If yes, I find it
very very annoying. Not for myself because I consider being an
advanced computer user (but not already an advanced Lunux user ;) and
a developer so bugs do not scare me, but I think about all the newbie
who may encounter such a strange behaviour: if it is their first Linux
experience, they won t be long before goint back to windows ! With
this bug (mouse jumping back to the screen center), the desktop
environment is just plain unusable...

By the way, keep up the good work with Ubuntu

Regards

Francois Marot

On 10/7/08, Timo Aaltonen <email address hidden> wrote:
> Francois: that's probably fixed in master as well, but something that
> requires more work to backport and probably not going to be fixed for
> intrepid. In the meantime please install -joystick.
>
> --
> Joystick detected as mouse, crashes X
> https://bugs.launchpad.net/bugs/274203
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "xorg-server" source package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: xorg
>
> When I attach my usb gamepad to the computer X detects it (via HAL) as a
> mouse and configures it appropriately. Whenever I press a button, the entire
> X server crashes.
>
> I'm using Intrepid, amd64. I'd be happy to provide any other information
> that might help.
>

Revision history for this message
Luke of NY (lukeofny) wrote :

I also have this problem in Intrepid amd64. I have installed the xserver-xorg-input-joystick package rebooted, and this problem still occurs. I have included the output of lshal however I don't think hal is to blame, but I am not an expert.
Any help or rebuke would be appreciated
Peace
Luke Of NY

Revision history for this message
Luke of NY (lukeofny) wrote :

I also have this problem in Intrepid amd64. I have installed the xserver-xorg-input-joystick package rebooted, and this problem still occurs. I have included the output of lshal however I don't think hal is to blame, but I am not an expert.
Any help or rebuke would be appreciated
Peace
Luke Of NY

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Francois: upstream git master

Luke: that output is not helpful, since the joystick is not plugged in. Please file a new bug against -joystick with lshal output when you've plugged it in.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Timo - Luke opened a new report by accident when responding to this report (bug 280069). His response:

"I am very sorry, this is the new lshal output hopefully this is helpful like I wrote before I have installed the -joystick package and rebooted. If it still appears that I do not have the controller plugged I could take a video or picture. Let me know if I could do something else for you though.Thank You in advance for any help, I love -buntu."

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Chris, that's because I asked him to do that :)

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Whoops - yes, I didn't read your whole comment above. His bug description is written like he was responding to an already existing bug, but created a new one by acident, which is why I searched for this one.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.5.1-1ubuntu3

---------------
xorg-server (2:1.5.1-1ubuntu3) intrepid; urgency=low

  * Pull upstream changes from server-1.5-branch including b595b65e:
    - Fix GKVE with key_code > 255 (LP: #274203)
    - DGA: Fix ProcXF86DGASetViewPort for missing support in driver.
      Fixes a segfault when trying to activate a DGA mode without
      checking whether DGA modesetting is at all possible.
    - Check nextEnabledOutput()'s return in bestModeForAspect()
      In case no enabled outputs, we will reference wrong index of
      output array.
    - int10: Fix a nasty memory leak.
    - int10: Don't warn when scanning for devices we don't have.
      Some BIOSes (hi XGI!) will attempt to enumerate the PCI bus by
      asking for the config space of every possible device number.
      This despite perfectly functional BIOS methods to enumerate the
      bus exactly.
    - int10: Remove useless check.
      If you have more than one PCI device with the same d/b/d/f, you're
      already in trouble.
    - http://bugs.freedesktop.org/show_bug.cgi?id=14373
      xkb: squash canonical types into explicit ones on core reconstruction.
      xkb: fix core keyboard map generation.
    - xkb: fix use of uninitialized variable.
    - Remove usage of mfbChangeWindowAttributes missed in e4d11e58c...
    - Only build dri2 when DRI2 is enabled.
  * Merge patches 138 and 139 into 137, and update the properties API to
    match the current version in master (final API for XI 1.5).
    (LP: #274728)
  * Bump the build-dep on x11proto-input-dev and libxi-dev.
  * Bump the serverminver because of newer properties API.
  * Add Breaks against current synaptics and evdev, since they use the old
    API and need to be updated with the server.

 -- Timo Aaltonen <email address hidden> Fri, 10 Oct 2008 11:16:56 +0300

Changed in xorg-server:
status: Triaged → Fix Released
Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

That's the version I have installed. Still not fixed, same problem.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I installed xserver-xorg-input-joystick and it fixed the problem with the joystick crashing X and I can now play my games.

However, two issues remain:

1.) The gamepad still controls the mouse. This should not be by default.

2.) Joysticks and gamepads should work out of the box in Ubuntu. If not, the backlash from gamers is going to be HUGE and alone can be enough to hurt Ubuntu's reputation. Let's face it, the state of gaming in Linux is bad enough as it was!

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I just tested sdlmame. While my gamepad now works (but not yet out of the box) the fact that the d-pad controls the mouse cursor completely prevents the d-pad from working in sdlmame. I can use the action buttons to make the character do stuff, but I cannot move the character. When I set up the controller and press a d-pad button, sdlmame sees it as a mouse event.

Revision history for this message
Gareth Hart (tghe-retford) wrote :

Even with the latest update to xserver-xorg-core (2:1.5.1-1ubuntu3) and with xserver-xorg-input-joystick installed (1:1.3.2-1ubuntu1) installed, my computer still thinks my MadCatz controller is a mouse and still crashes X if you press any buttons.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I tried StR34k 's suggestiong as well as the xorg.conf he posted and it fixes the issue for me. However, if I try to merge his changes into my existing xorg.conf, it doesn't work. My monitor uses a weird resolution so I need to use my xorg.conf but I would appreciate having StR34k's changes into my xorg.conf which I posted.

StR34k, if you are reading this can you please tell me everything you changed or merge your changes into mine? If I don't use my xorg.conf my monitor goes to 70hz refresh rate which is incorrect for my monitor, it should be 60hz.

I forgot to mention that the nvidia settings app fails to merge StR34k's changes into mine.

Revision history for this message
kristian (kristian-gjengedal) wrote :

i have the latest update to xserver-xorg-core (2:1.5.1-1ubuntu3) and xserver-xorg-input-joystick (1:1.3.2-1ubuntu1) installed but my wired xbox 360 controller is still controlling the mouse the mouse here is my lshal if it is needed.

Revision history for this message
kristian (kristian-gjengedal) wrote :

i have the latest update to xserver-xorg-core (2:1.5.1-1ubuntu3) and xserver-xorg-input-joystick (1:1.3.2-1ubuntu1) installed but my wired xbox 360 controller is still controlling the mouse here is my lshal if it is needed.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I'd like to have a new gdb stacktrace from the crash. The original one should be fixed now, but maybe there's another bug that needs fixing.

please file new bugs with lshal output to get hotplug support for the joystick you have..

Changed in xorg-server:
status: Fix Released → Triaged
Timo Aaltonen (tjaalton)
Changed in xserver-xorg-input-joystick:
status: New → Invalid
Timo Aaltonen (tjaalton)
Changed in xorg-server:
status: Triaged → Fix Committed
Changed in xserver-xorg-input-evdev:
status: Fix Committed → Fix Released
24 comments hidden view all 104 comments
Revision history for this message
mpcd (mpcd) wrote :

I discovered a temporary fix for the mouse cursor issue. Like in StR34k's xorg.conf, I added a section for the joystick and then added the line :
Option "SendCoreEvents" "false"
to the InputDevice section for the joystick. Also make sure the device you point to is correct for your joystick (check Xorg.0.log for this). This causes the joystick to no longer control the mouse cursor, and it appears to work normally in games now. This had me going nuts over the last couple of days so I'm glad there's finally some way around it.

I hope that whichever autodetection is causing the joystick to control the mouse be fixed in time for ibex release so that this behavior is not enabled by default.

Revision history for this message
criticalmess (criticalmess) wrote :

This does not work for me.

I edited xorg.conf:

Section "ServerFlags"
 Option "AutoAddDevices" "False"
EndSection

Section "InputDevice"
 Identifier "Configured Joystick"
 Driver "joystick"
 Option "Device" "/dev/input/event3"
 Option "SendCoreEvents" "false"
EndSection

Then I purged xserver-xorg-input-joystick, restarted my mashine and repluged the gamepad.

It still acts as a mouse. It still does not work in any game.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

Mpcd, that work around works but causes another issue. If I add that to
my xorg.conf, and then boot without a joystick attached, the mouse stops
working correctly. This is fine for my desktop because I don't mind
keeping the joystick attached, but this is not okay for my laptop which
I don't attach the joystick unless needed.

Even though there are probably work arounds, all joysticks need to work
properly out of the box just as they used to. This is a HUGE problem
because I'm sure there are a lot of people that play games on Ubuntu.

mpcd wrote:
> I discovered a temporary fix for the mouse cursor issue. Like in StR34k's xorg.conf, I added a section for the joystick and then added the line :
> Option "SendCoreEvents" "false"
> to the InputDevice section for the joystick. Also make sure the device you point to is correct for your joystick (check Xorg.0.log for this). This causes the joystick to no longer control the mouse cursor, and it appears to work normally in games now. This had me going nuts over the last couple of days so I'm glad there's finally some way around it.
>
> I hope that whichever autodetection is causing the joystick to control
> the mouse be fixed in time for ibex release so that this behavior is not
> enabled by default.
>
>

Revision history for this message
mpcd (mpcd) wrote :

CypherDelic: also make sure you have InputDevice "Configured Joystick" in your ServerLayout section. I should also note that I haven't (yet) purged xserver-xorg-input-joystick.

Jeremy: I haven't tried disconnecting the joystick yet, that is a frustrating side effect. Thanks for the heads up - I'd be pretty annoyed when that happens too.

Revision history for this message
criticalmess (criticalmess) wrote :

I added that still the same. I guess something is locking my device.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

Mpcd: What happens with the joystick not attached with that xorg.conf
used is the mouse double clicks when you click once. This makes the
kmenu imposible to open.

Revision history for this message
criticalmess (criticalmess) wrote :
Download full text (5.5 KiB)

Well, still nothing fixes my gamepad behaviour, so i post some details here, too.

Model: Saitek P580 (PC-USB / Dual Analog / RumbleForce)

lsusb parts for my gamepad:
Bus 001 Device 004: ID 0f30:0111 Jess Technology Co., Ltd

lshal-parts for my gamepad:
udi = '/org/freedesktop/Hal/devices/usb_device_f30_111_noserial'
  info.linux.driver = 'usb' (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_04_0' (string)
  info.product = 'Colour Rumble Pad' (string)
  info.subsystem = 'usb_device' (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_f30_111_noserial' (string)
  info.vendor = 'Jess Technology Co., Ltd' (string)
  linux.device_file = '/dev/bus/usb/001/004' (string)
  linux.hotplug_type = 2 (0x2) (int)
  linux.subsystem = 'usb' (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb1/1-1' (string)
  usb_device.bus_number = 1 (0x1) (int)
  usb_device.can_wake_up = false (bool)
  usb_device.device_class = 0 (0x0) (int)
  usb_device.device_protocol = 0 (0x0) (int)
  usb_device.device_revision_bcd = 257 (0x101) (int)
  usb_device.device_subclass = 0 (0x0) (int)
  usb_device.is_self_powered = false (bool)
  usb_device.linux.device_number = 4 (0x4) (int)
  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb1/1-1' (string)
  usb_device.max_power = 200 (0xc8) (int)
  usb_device.num_configurations = 1 (0x1) (int)
  usb_device.num_ports = 0 (0x0) (int)
  usb_device.product = 'Colour Rumble Pad' (string)
  usb_device.product_id = 273 (0x111) (int)
  usb_device.speed = 1.5 (1.5) (double)
  usb_device.vendor = 'Jess Technology Co., Ltd' (string)
  usb_device.vendor_id = 3888 (0xf30) (int)
  usb_device.version = 1.1 (1.1) (double)

udi = '/org/freedesktop/Hal/devices/usb_device_f30_111_noserial_if0'
  info.linux.driver = 'usbhid' (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_f30_111_noserial' (string)
  info.product = 'USB HID Interface' (string)
  info.subsystem = 'usb' (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_f30_111_noserial_if0' (string)
  linux.hotplug_type = 2 (0x2) (int)
  linux.subsystem = 'usb' (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb1/1-1/1-1:1.0' (string)
  usb.bus_number = 1 (0x1) (int)
  usb.can_wake_up = false (bool)
  usb.device_class = 0 (0x0) (int)
  usb.device_protocol = 0 (0x0) (int)
  usb.device_revision_bcd = 257 (0x101) (int)
  usb.device_subclass = 0 (0x0) (int)
  usb.interface.class = 3 (0x3) (int)
  usb.interface.number = 0 (0x0) (int)
  usb.interface.protocol = 0 (0x0) (int)
  usb.interface.subclass = 0 (0x0) (int)
  usb.is_self_powered = false (bool)
  usb.linux.device_number = 4 (0x4) (int)
  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb1/1-1/1-1:1.0' (string)
  usb.max_power = 200 (0xc8) (int)
  usb.num_configurations = 1 (0x1) (int)
  usb.num_ports = 0 (0x0) (int)
  usb.product = 'USB HID Interface' (string)
  usb.product_id = 273 (0x111) (int)
  usb.speed = 1.5 (1.5) (double)
  usb.vendor = 'Jess Technology Co., Ltd' (string)
  usb.vendor_id = 3888 (0xf30) (int)
  usb.version ...

Read more...

Revision history for this message
Divan (divan-santana) wrote :

Hello everyone,
My Logitech dual action(2 analog stick) gamepad also gets detected and works like a mouse on kubuntu 8.10 with latest updates.

The gamepad worked perfectly on hardy but in intrepid it works like a mouse(never seen that before) and the buttons simply don't work.

Through systemsettings I could calibrate the joystick axis' but the buttons don't get detected at all.

(Which means I can't play my EA sports nba live on intrepid - that sucks.)

Is their a workaround until this gets fixed?
What info can I attach to help with this bugfix?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Let's get a few facts straight:

I was confused about all the reports regarding joysticks not working like they were before. What I missed was that X didn't use them by default, and shouldnt. Adding them to the fdi file on -joystick was only done to let your devices to work without crashing the server. Boohoo.

Now I realize (thanks to Emmet) that what really has been happening all along is that evdev-driver grabs the device, which makes it impossible to use /dev/input/js*. This is something that looks unlikely to be fixed in Intrepid anymore, since it's unclear how to fix it most efficiently. The kernel should report that the device is a joystick, but HAL needs to be aware of that and not list the device as input.mouse (and/or .keyboard).
Then the fdi file for -joystick is a trivial one and would match all joysticks.

The workaround for you guys is to copy the fdi-file from joystick to /etc/hal/fdi/policy, and edit it to not load a driver for your device (you can match using the product id of your device if not listed already, see 'lshal'). Then uninstall -joystick (dunno if it's needed, maybe), restart hal & X. The old games should work now..

Revision history for this message
gerstrong (gerstrong) wrote :

I have GreenAsia Gamepad (PSX somewhat clone) and it had the same
problem.

I solved it the following way:

1.- open as root /etc/X11/xorg.conf
2.- Add at the begining of the file following lines:

Section "ServerFlags"
 Option "AutoAddDevices" "False"
EndSection

3.- Save the file, and restart your system. Yes, better restart the
system or gdm. Killing X with CRTL+ALT+Backspace doesn't read always the
xorg.conf

Revision history for this message
Loïc Martin (loic-martin3) wrote :

I'll try to keep it short so the bug report doesn't become huge.
First, I'm not an Ubuntu developer ;)

Martin Emrich (https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/64) you should check the version of evdev (see my previous comment https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/60) because either you're not up-to-date and you'll just confuse the developers, or the bug isn't solved and they need to be informed (by reopening the bug).

CypherDelic your bug is actually a duplicate of this bug. Since you provided the required information in Bug #283399, you can mark it as a duplicate now. Also no need to write the information in your posts, attachments are good enough.

@everybody : please don't quote the post you're answering to (I guess you're using email) - it shows quite badly on Launchpad.

Now, back to the bug reports:
X crashing has been fixed, that's why the bug it marked as "Fixed". Since Ubuntu developers were expecting joysticks not to work anymore in Intrepid after changes in Xorg, this bug report has not much point (that's maybe why they also closed it against xserver-xorg-input-joystick.

I've created two wiki pages https://help.ubuntu.com/community/Joystick_lshal_outputs_done and https://help.ubuntu.com/community/Joystick_lshal along with a forum thread at http://ubuntuforums.org/showthread.php?t=953639, please follow the wiki pages guide if you want to help, for other discussion the forum thread might be appropriate.

By the way, I've managed to find an fdi file for Sony Dual Shock 3 and Sysaxis game pads (tested, it works when copied in /etc/hal/fdi/policy/ ). It's attached (DualShock3.fdi), if you won another joystick you might be able to edit it for your own model.

Revision history for this message
Loïc Martin (loic-martin3) wrote :

And indeed (I forgot to add this to my previous post)

Section "ServerFlags"
 Option "AutoAddDevices" "False"
EndSection

in xorg.conf works with the few joysticks I tried. Just don't add anything else for the joystick and keep the xorg.conf that came with Intrepid (It should be almost empty). However it might mess up other devices, just keep that in mind (but if it works for you, using it is better than trying to play x-plane with a keyboard ;) ).

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I'm really curious why the new xorg would be considered if it broke
joysticks. Not being able to use joysticks is a HUGE problem. For most
of us, the work arounds are fine. (They don't work for me though). Since
I'm sure we're all comfortable getting under Ubuntu's hood, we wouldn't
have a problem with any work around that is invented.

However, joysticks not working out of the box when Intrepid comes out
will not be acceptable. Joe User doesn't know how to edit the xorg.conf
file to get his joystick working, and he shouldn't have to. Joysticks
have worked in every Ubuntu release and should still. Gaming is probably
one of if not the major shortcomings of Linux keeping it from mainstream
use, and by the most popular Linux distribution in the world not being
able to use joysticks properly is going to hurt the reputation of Linux
even more.

Is there any way to force the old joystick driver for all joysticks?

Please, whatever we can do to make joysticks work just like they did in
Hardy would be great. I'll help with whatever is needed. I'll test
whatever I need to and I devote as much time to this as you need, let's
please not let a huge bug like this remain in the final Intrepid release.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Loïc: no need to provide the lshal information anymore, the fdi file in -joystick won't be updated, and for Jaunty there is no need to list every model there is to use the driver, since hopefully by then the kernel/hal will know when the input device is a joystick (not true atm).

If you use the AutoAddDevices -trick, you'll also disable input-hotplug completely (for mice & keyboards etc). That is not recommended. Like I said, just put a file like this in /etc/hal/fdi/policy and you should be able to use the joystick in games like before:
---
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.product" contains="PRODUCT ID OF YOUR JOYSTICK">
      <merge key="input.x11_driver" type="string"></merge>
    </match>
  </device>
</deviceinfo>
---

and replace the PRODUCT.. stuff with the name of the device, use lshal or lsinput to find it out. Note that the x11_driver is empty. It means that evdev (or any other driver for that matter) will not use the device.

Revision history for this message
Jeremy Wilkins (wjeremy) wrote :

First off, I agree with Jeremy on this matter. I have been somewhat appalled at the lack of consideration for the end user on this beta and release prep. Although I am tremendously impressed with the majority of functionality that has been added to Intrepid with KDE4 and generally better hot plug support. However, not supporting a feature that has been around for ages is disappointing and even though I know how to fix it (patch it temporarily that is). What will my friends say when I go to plug in a joystick that they offer me to use and I have to tell them just wait a minute while I manually fix this to work...
Not impressed I'm sure.

Ranting aside, I also have this problem and I fixed it (temporarily patched it) by the method mentioned by Ari Mustonen above. I just had to look at the output of the command lshal at the console search for input.mouse and find my joystick's name nearby (I think case matters here) and replace the name in the attachment he gave with mine and put it in /usr/share/hal/fdi/preprobe/20thirdparty as he instructed. It worked for me and I use a Gravis GamePad Pro USB. I haven't tried Timo Aaltonen's workaround, since I just found out about this last night. I would also attach an lshal output, but I think the point is over now and I would have to undo the fix to get the right output anyways.

Revision history for this message
Martin Emrich (emme) wrote :

Just tested again with 1:2.0.99+git20080912-0ubuntu5, and Xorg no longer crashes. I'll attach the joystick-only diff to #283399...

Revision history for this message
Loïc Martin (loic-martin3) wrote :

Timo, it's a bit late. After reading on both the ubuntu-devel-discuss mailing list and on launchpad that you'd like users to file this information, I've spend a whole day writing the documentation, then emailing mailing lists/forums. I also asked you personally one week ago, on private email, on the ubuntu-devel-discuss and in this thread - you can't have possibly missed it, since you answered this bug after my message.

I appreciate the work you did for wacom support in Feisty (and the rest), but, to remain polite, this is a waste.

At least with users providing lshal output we can support them by providing them an fdi file (if your method works), since Ubuntu doesn't want to do it.

Jeremy LaCroix, I can share your feelings. However, since I've been part of the Ubuntu community (4.10) each release have seen the developer (as silently as they could) drop support for some relatively big category of hardware / users. In that case people have reacted like you (I did at first, and for messes more serious than joysticks), but in the end it doesn't help, because the decision has already been taken (and yes, we users also offered our help and time to see those bug fixed, usually far earlier in the development cycle). Basically, either you're at UDS and can program the features yourself, or you just hope it will be fixed in less than 3 or 4 releases.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

The only way to keep joysticks work for everyone would have been to _not_ use input-hotplug in intrepid, and it had already been decided upon. For what it's worth, Fedora10 does the same, so they should share the same problem.

Revision history for this message
Divan (divan-santana) wrote :

Ok I got a work around so my logitech gamepad now works on kubuntu 8.10 perfectly.

I did configure the axis' via systemsettings first.

Then I created this file "DualActionGamepad.fdi" (attached)
and copied it to /etc/hal/fdi/policy/
and restarted hal via /etc/init.d/hal restart (or reboot).

My gamepad/joystick still moves my cursor mouse but in my games all the buttons work perfectly and the gamepad works perfectly.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Seems that Albert found out the fix to make evdev not use the device, and it seems to only affect 64bit installations (which would explain why I wasn't able to reproduce this since I have a 32bit system):

Check bug 284951, which is the new master bug about that. It will be fixed before release. It also means that no fdi-file tricks are needed in order to use joysticks. The X joystick driver on the other hand still needs HAL to list the device as input.joystick.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I downloaded the latest daily image for both 32-bit and 64-bit and tested my gamepads on each one.

I can confirm that I have no problems on the 32-bit version.

With the 64-bit version, the bug is NOT fixed for me. I confirmed that I have "xserver-xorg-input-evdev_2.0.99+git20080912-0ubuntu5_amd64.deb" installed (I must've gotten it from the daily updates) and my dual action gamepad is still detected as a mouse and moves the mouse cursor. (Which prevents some games from using it since it's seeing a mouse event instead of a joystick event with a direction button is pressed).

I also tested this on my 64-bit install with all the latest updates, it's not fixed there either. My dual action gamepad does work in the 32-bit version though.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

Release is tomorrow, still having this problem here with all updates.

Revision history for this message
Omar Shami (bigfox) wrote :

It is now after release. All updates. All joysticks still act like mice on 64 bit.

As a result, none of the games are able to use the joystick.

Revision history for this message
unebaguettesvp (phil-quietthenloud) wrote :

This is ridiculous. Why is this not marked Critical?! No games are playable without the joystick interrupting the game window!

I tried fooling around with xorg.conf and if I don't have:
Option "SendCoreEvents" "false"
in:
Section "InputDevice"
 Identifier "Configured Joystick"
 Driver "joystick"
 Option "Device" "/dev/input/event3"
 Option "SendCoreEvents" "false"
EndSection
the cursor moves all the way to the upper left part of the screen.

I tried Albert Damen's fix and that didn't change anything.

It's bad enough that Linux has a bad reputation with gaming but this bug makes Linux look even worse. Everything was working great in Hardy. This regression makes nothing playable on my end. I should have not upgraded.

Revision history for this message
unebaguettesvp (phil-quietthenloud) wrote :

So, I've made some progress but I still can't play ANY games. Literally. NONE.

I've edited my xorg.conf file to look like this (I've omitted things that don't pertain to the input devices):

Section "ServerLayout"
 Identifier "Default Layout"
 Screen "Default Screen" 0 0
 InputDevice "Generic Keyboard"
 InputDevice "Configured Mouse"
 InputDevice "Configured Joystick"
 InputDevice "Configured Joystick 2"
EndSection

Section "ServerFlags"
 Option "AutoAddDevices" "False"
EndSection

Section "InputDevice"
 Identifier "Configured Joystick"
 Driver "joystick"
 Option "Device" "/dev/input/event5"
 Option "SendCoreEvents" "False"
EndSection

Section "InputDevice"
 Identifier "Configured Joystick 2"
 Driver "joystick"
 Option "Device" "/dev/input/event4"
 Option "SendCoreEvents" "False"
EndSection

My problem was setting the correct Device for each joystick. Now, the joysticks (yes, I have 2, unplugging one doesn't fix the other) do not move, left click, or right click the cursor. jscalibrator reports all buttons working perfectly. But when I try to configure the buttons in various emulators and MAME, the buttons work but the directional pads do not do anything.

I tried fooling around with the Option "MapAxis#" for each joystick and that did nothing at all. I even tried doing:

Option "MapAxis1" "mode=none"
Option "MapAxis2" "mode=none"
Option "MapAxis3" "mode=none"
Option "MapAxis4" "mode=none"
Option "MapAxis5" "mode=none"
Option "MapAxis6" "mode=none"

thinking that all directional pads would be disabled. But they weren't. I changed the modes around too and nothing worked.

I have two Logitech Cordless RumblePad 2 controllers. They are very similar to a PS2 controller.

For those of you that have configured your joysticks through your xorg.conf file, do your directional pads work in games? Did you have to do anything else to get them working?

I've been using joysticks in Ubuntu since Edgy and I've never had a problem with them. All I needed to do was to just plug them into a USB port. I'm seriously considering downgrading.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I configured my joysticks in the xorg.conf file and everything worked
when it comes to the joysticks themselves, but my mouse stopped working
correctly whenever I booted my machine without a joystick attached. On
my desktop that's fine, but on my laptop I'm not always going to attach
my joystick.

unebaguettesvp wrote:
> So, I've made some progress but I still can't play ANY games. Literally.
> NONE.
>
> I've edited my xorg.conf file to look like this (I've omitted things
> that don't pertain to the input devices):
>
> Section "ServerLayout"
> Identifier "Default Layout"
> Screen "Default Screen" 0 0
> InputDevice "Generic Keyboard"
> InputDevice "Configured Mouse"
> InputDevice "Configured Joystick"
> InputDevice "Configured Joystick 2"
> EndSection
>
> Section "ServerFlags"
> Option "AutoAddDevices" "False"
> EndSection
>
> Section "InputDevice"
> Identifier "Configured Joystick"
> Driver "joystick"
> Option "Device" "/dev/input/event5"
> Option "SendCoreEvents" "False"
> EndSection
>
> Section "InputDevice"
> Identifier "Configured Joystick 2"
> Driver "joystick"
> Option "Device" "/dev/input/event4"
> Option "SendCoreEvents" "False"
> EndSection
>
> My problem was setting the correct Device for each joystick. Now, the
> joysticks (yes, I have 2, unplugging one doesn't fix the other) do not
> move, left click, or right click the cursor. jscalibrator reports all
> buttons working perfectly. But when I try to configure the buttons in
> various emulators and MAME, the buttons work but the directional pads do
> not do anything.
>
> I tried fooling around with the Option "MapAxis#" for each joystick and
> that did nothing at all. I even tried doing:
>
> Option "MapAxis1" "mode=none"
> Option "MapAxis2" "mode=none"
> Option "MapAxis3" "mode=none"
> Option "MapAxis4" "mode=none"
> Option "MapAxis5" "mode=none"
> Option "MapAxis6" "mode=none"
>
> thinking that all directional pads would be disabled. But they weren't.
> I changed the modes around too and nothing worked.
>
> I have two Logitech Cordless RumblePad 2 controllers. They are very
> similar to a PS2 controller.
>
> For those of you that have configured your joysticks through your
> xorg.conf file, do your directional pads work in games? Did you have to
> do anything else to get them working?
>
> I've been using joysticks in Ubuntu since Edgy and I've never had a
> problem with them. All I needed to do was to just plug them into a USB
> port. I'm seriously considering downgrading.
>
>

Revision history for this message
unebaguettesvp (phil-quietthenloud) wrote :

I just tried another controller I have (an old wired USB AXIS pad, I think Gravis makes it?) and I can reproduce the same results. I even reinstalled the -evdev and -joystick packages through Synaptic and commented out:

 InputDevice "Generic Keyboard"
 InputDevice "Configured Mouse"
 InputDevice "Configured Joystick"
 InputDevice "Configured Joystick 2"

and set:

Section "ServerFlags"
 Option "AutoAddDevices" "False"
EndSection

to "True". After doing that and restarting X, the joystick could control the cursor but it did not show up in jscalibrator. Then I installed the evdev patch found on this page:
https://bugs.launchpad.net/ubuntu/intrepid/+source/xserver-xorg-input-evdev/+bug/284951
, the one with the Albert Damen patch. After restarting X, the joystick could NOT control the cursor and everything worked perfectly in jscalibrator. I still could not set any controls with the directional pad in any emulators. So, it's not controller specific. I still don't understand why I am unable to use the directional pad in any games.

Xorg.0.log says:
(II) config/hal: Adding input device STD AxisPad
(**) STD AxisPad: always reports core events
(**) STD AxisPad: Device: "/dev/input/event4"
(II) STD AxisPad: Found x and y absolute axes
(WW) STD AxisPad: Don't know how to use device
(II) UnloadModule: "evdev"
(EE) PreInit returned NULL for "STD AxisPad"
(EE) config/hal: NewInputDeviceRequest failed

For the other two joysticks Xorg.0.log does not report this. But all three joysticks work in jscalibrator.

Revision history for this message
unebaguettesvp (phil-quietthenloud) wrote :

Back to normal! Tried out the new xserver-xorg-input-evdev patch in intrepid-proposed (has Albert Damen's patch). That didn't do anything until I sudo apt-get purge xserver-xorg-input-joystick. The cursor was no longer being controlled. But I still had the problem with directional pads not functioning games. So, then I found this:
http://ubuntuforums.org/showthread.php?t=320683
The calibration of the joysticks by jscalibrator was the problem. Hope this helps someone else before they pull their hair out.

Revision history for this message
EricDHH (ericdhh) wrote :

Confirmed on 8.10 amd64

Whatever joystick is plugged (Saitek Cyborg / Speedlink Encounter) the xorg assume it is a mouse.

(II) config/hal: Adding input device SAITEK CYBORG 3D USB
(**) SAITEK CYBORG 3D USB: always reports core events
(**) SAITEK CYBORG 3D USB: Device: "/dev/input/event2"
(II) SAITEK CYBORG 3D USB: Found x and y absolute axes
(II) SAITEK CYBORG 3D USB: Found 1 mouse buttons
(II) SAITEK CYBORG 3D USB: Configuring as mouse

So the pointer stands jumping on a place on the screen, can be moved by pulling the jostick. Only of all usb sticks are unplugged, the mouse can be used normally. My mouse is plugged to the ps/2 port.

Eric

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

TuxfarmHH: you need to remove xserver-xorg-input-joystick.

this bug is closed for good. Install all updates.

Changed in xorg-server:
status: New → Invalid
Revision history for this message
Adral (ivantomasr) wrote :

I installed all updates, did sudo apt-get purge xserver-xorg-input-joystick, calibrated the joystick with jscal and I STILL have the joystick moving the mouse on X. Makes playing games really difficult.

Revision history for this message
Loïc Martin (loic-martin3) wrote :

Adral, try to avoid the use of jscal or joystick calibrator, they can mess things up.

@Timo: the working package is still only in intrepid-proposed -0ubuntu6
The one in the intrepid repos is still 1:2.0.99+git20080912-0ubuntu5, and according to the changelog (http://archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-input-evdev/xserver-xorg-input-evdev_2.0.99+git20080912-0ubuntu5.diff.gz) the last change was on October, 18, which is (AFAIR) before the fix appeared in intrepid-proposed. So the one in intrepid has the fix for X crashing, but how can it has the fix on amd64 so that joystick works?

Here is the last entry I can see:
>xserver-xorg-input-evdev (1:2.0.99+git20080912-0ubuntu5) intrepid; urgency=low
>
> * Rebuild against new x11proto-input-dev.
>
> -- William Grant <email address hidden> Sat, 18 Oct 2008 21:13:47 +1100

-0ubuntu6 appeared in -proposed at the beginning of November, definitely after Intrepid release.

Revision history for this message
Counterfeit187 (counterfeitdream) wrote :

gerstrongs advice of editing xorg.conf worked dandy for me. I'm using wired xbox 360 controller for windows on Intrepid Ibex 32 bit. It disabled scrolling on my touchpad and my mutimedia buttons on the front of my laptop, but I can use cope with that.

Revision history for this message
Emile Pesik (ristridin) wrote :

I'm trying to use a Logitech CyberMan 2 as an input controller for GIMP and as a joystick in FPS games.
In case you're not familiar with this Logitech joystick, it connects to the game port and uses the adi module

The Cyberman 2 is recognised correctly, however none of the buttons work and the controller moves the cursor.
SuperTux does recognise that there is a joystick attached, however it does not respond to the CyberMan 2. Any attempts to reconfigure the key assignments results in the mouse cursor jumping to the centre of the screen and button presses are not registered.

The version of xserver-xorg-input-evdev is 1:2.0.99+git20080912-0ubuntu6 and I do not have xserver-xorg-input-joystick installed.
I have also tried creating an fdi file (attached) as per comment 78, which I placed in /etc/hal/fdi/policy but to no avail.

I'm surprised at the "this bug is closed for good. Install all updates." remark, as clearly this bug is not fixed.

Revision history for this message
gerstrong (gerstrong) wrote :

Hi Emile,

did you try adding this into the xorg.conf?

Section "ServerFlags"
        Option "AutoAddDevices" "False"
EndSection

That should solve your Problem!

Yes, you are right, but I think some specials models are affected by this bug, because my Greenasia(PS-Clone) works perfectly out of the box!

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

Gerstrong, while your xorg edit would work, it causes other problems,
especially with laptops. Be careful.

gerstrong wrote:
> Hi Emile,
>
> did you try adding this into the xorg.conf?
>
> Section "ServerFlags"
> Option "AutoAddDevices" "False"
> EndSection
>
> That should solve your Problem!
>
> Yes, you are right, but I think some specials models are affected by
> this bug, because my Greenasia(PS-Clone) works perfectly out of the box!
>

Revision history for this message
Koselara (koselara) wrote :

I'm having the problem in fully-updated Intrepid 32-bit with a USB Logitech Precision (wired) gamepad. In my case, the gamepad controls the mouse cursor with no adverse effects, and some buttons function as left/right/middle mouse clicks. It also worked in Linux-native games I've tried (need to try emulators), but the cursor flew around the screen clicking in tandem with my game movements, causing various windows, menus, or desktops to appear. (Given I got the Precision on super we're-desperate-to-dump-these clearance at Target, I guess this is a "you get what you pay for" situation... ;)

Tomorrow I'll go through the various recommended steps to see if it helps (aside from the one that might harm laptops), and post my results then... For now I wanted to confirm loudly that there are indeed updated 32-bit systems being affected too. Have a good insert-your-time-of-day here!

Revision history for this message
FyarBall (flamethrower0) wrote :

sudo apt-get install xserver-xorg-input-evdev xserver-xorg-input-joystick
then reboot computer.

Fixed it for my AMD64 Kubuntu 8.10 Intrepid with Saitek P2500 (detected name: "Saitek PLC Cyborg Force Rumble Pad").

I first noticed something was wrong when my mouse pointer was having "seizures" when the joystick was plugged in ;-)

Revision history for this message
Mahendra Tallur (mahen) wrote :

It seems this problem still occurs in Jaunty for AMD64. I indeed have a Speedlink 360 style gamepad usb, had to install the xserver-xorg-input-joystick package. It does work but controls the mouse pointer :)

Revision history for this message
Loïc Martin (loic-martin3) wrote :

mahen, this bug has been closed for quite a while. The problem that bug was addressing has been solved, and reporting it here will have zero chance to attract the attention of the right developers.

Most joystick don't crash X anymore, and aren't detected as mouse either. If your joystick does (most probably it doesn't crash X, it's just it's detected as a mouse by default, which it shouldn't), could you please open a new bug against xserver-xorg-input-evdev, using preferably the command :

ubuntu-bug xserver-xorg-input-evdev

while your joystick is connected, and adding a description of your symptoms + name of your joystick?

It should attach the relevant information, then a developper involved in that package can ask you for more input if necessary.

Displaying first 40 and last 40 comments. View all 104 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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