Saitek X52 Joystick does not work

Bug #492056 reported by Urs Schneider on 2009-12-03
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Stefan Bader
Nominated for Karmic by Jonathan Wagner
Nominated for Lucid by Jonathan Wagner

Bug Description

The fix for https://bugs.launchpad.net/ubuntu/+source/linux/+bug/300143 broke support for the Saitek X52 Joystick. You can still see it in the the lsusb output:

$ lsusb
Bus 002 Device 003: ID 06a3:075c Saitek PLC X52 Flight Controller
[...]

and plugging it in generates the following entry in /var/log/syslog:
Dec 3 20:13:07 scruffy kernel: [ 4682.545751] generic-usb 0003:06A3:075C.0003: input,hidraw1: USB HID v1.11 Joystick [Saitek Saitek X52 Flight Control System] on usb-0000:00:02.0-9/input0

Apparently this code from input/joydev.c is responsible:

 }, /* Avoid itouchpads and touchscreens */
 {
  .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
    INPUT_DEVICE_ID_MATCH_KEYBIT,
  .evbit = { BIT_MASK(EV_KEY) },
  .keybit = { [BIT_WORD(BTN_DIGI)] = BIT_MASK(BTN_DIGI) },
 }, /* Avoid tablets, digitisers and similar devices */

Andy Whitcroft (apw) on 2009-12-08
tags: added: kernel-series-unknown
Urs Schneider (urs-schneider) wrote :

Sorry, I'm using linux-image-2.6.31-16-generic

$ uname -a
Linux scruffy 2.6.31-16-generic #52-Ubuntu SMP Thu Dec 3 22:00:22 UTC 2009 i686 GNU/Linux

Urs Schneider (urs-schneider) wrote :

I can confirm that the joystick works again after recompiling the joydev module without the code mentioned above. Otherwise the device /dev/input/js0 is never created after plugging it in or rebooting.

tags: added: karmic
removed: kernel-series-unknown
tet (flashkaisel) wrote :

Im with the same problem. Any Solution?

Well, I've recompiled the module without the problematic code to be able to
use the joystick again. But it sucks to have to repeat that after every kernel
update.
Urs

> Im with the same problem. Any Solution?
>

Stefan Bader (smb) wrote :

The problem with some joysticks is the way buttons are assigned and the special meaning certain buttons have. Basically every device has one button number which is the first button assigned and this has a special meaning in identifying the class of device. So the first button for joysticks is BTN_JOYSTICK, the first one for a gamepad BTN_GAMEPAD and BTN_DIGI is the first one for tablets. Any further buttons get a number of the first button + x. Unfortunately the number range is limited and nobody thought of devices with 40 buttons. So those end up with buttons that would normally stand for a completely different class of device.
And then (having BTN_DIGI defined) it is not considered a joystick because that would be a tablet and did cause tablets to come up as non functional joysticks.

So long story short, it has been worked on upstream and there is a patch. But its not yet in the main linux tree (maybe 2.6.34). But to try out whether its good I build Lucid kernels with the mentioned patch applied. So if anybody runs Lucid apha's has a X52 or similar with that problem, please give that kernel a try. You will find generic kernels at:
http://people.canonical.com/~smb/bug492056/

Changed in linux (Ubuntu):
assignee: nobody → Stefan Bader (stefan-bader-canonical)
importance: Undecided → Medium
status: New → Triaged
Stefan Bader (smb) wrote :

This is the upstream patch that is supposed to enable joysticks with many buttons again.

tet (flashkaisel) wrote :

Stefan Bader escribió:
> This is the upstream patch that is supposed to enable joysticks with
> many buttons again.
>
> ** Patch added: "0001-HID-handle-joysticks-with-large-number-of-buttons.patch"
> http://launchpadlibrarian.net/38497329/0001-HID-handle-joysticks-with-large-number-of-buttons.patch
>
>
    Im installed kernel 2.6.32-12.16+bug492056v1_amd.64, after restart,
graphics card (Nvidia Geforce 8800gt) d´ont work). How to apply patch.??

Stefan Bader (smb) wrote :

tet wrote:
> Im installed kernel 2.6.32-12.16+bug492056v1_amd.64, after restart,
> graphics card (Nvidia Geforce 8800gt) d´ont work). How to apply patch.??

Oops, likely I forked the test kernel to early for the -12 kernel to be
uploaded. That seemed to have appeared recently. Now, with the linux-headers
getting updated, the nvidia driver should be automatically get rebuild. Again,
sorry for the bad timing. (I will push some matching header packages to the
peoples page too, but those should only be required when the default -12 header
packages are not available).

tet (flashkaisel) wrote :

Ok, I have installed new kernel and linux headers, every thing is
working, except joystick Saitek X52.
>
> Oops, likely I forked the test kernel to early for the -12 kernel to be
> uploaded. That seemed to have appeared recently. Now, with the linux-headers
> getting updated, the nvidia driver should be automatically get rebuild. Again,
> sorry for the bad timing. (I will push some matching header packages to the
> peoples page too, but those should only be required when the default -12 header
> packages are not available).
>
>

tet (flashkaisel) wrote :

lsusb

Bus 003 Device 003: ID 051d:0002 American Power Conversion
Uninterruptible Power Supply
Bus 003 Device 002: ID 06a3:075c Saitek PLC X52 Flight Controller
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical
Wheel Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

lsusb -v

Bus 003 Device 002: ID 06a3:075c Saitek PLC X52 Flight Controller
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor 0x06a3 Saitek PLC
  idProduct 0x075c X52 Flight Controller
  bcdDevice 1.00
  iManufacturer 1
  iProduct 2
  iSerial 0
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 34
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
      (Bus Powered)
    MaxPower 100mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 3 Human Interface Device
      bInterfaceSubClass 0 No Subclass
      bInterfaceProtocol 0 None
      iInterface 0
      ** UNRECOGNIZED: 09 21 11 01 00 01 22 77 00
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0010 1x 16 bytes
        bInterval 10
can't get device qualifier: Operation not permitted
can't get debug descriptor: Operation not permitted
cannot read device status, Operation not permitted (1)

Sorry, but i don´t know, how to apply patch.

tags: added: patch
Stefan Bader (smb) wrote :

@tet,

can you help out with some more data:
1. Just to make sure to be on the right kernel at that time: uname -r
2. Before plugging in the joystick "sudo -i" + "echo 1 >/sys/modules/hid/parameters/debug" + "exit"
3. Plug in your joystick and look into /sys/kernel/debug/hid, there should be an entry matching the ID of the USB device (in your case this might be 0003:06a3:075c.002). In that directory there is a file rdesc. The output of that file would be helpful.
4. The output of 'sudo lsinput' (package input-utils)

Stefan Bader (smb) wrote :

While being on that I had conversation with upstream and it looks like a second patch is needed to make things working. I updated http://people.canonical.com/~smb/bug492056/ with a new test kernel set. Lucid has now released 2.6.31-13, so the headers should not be necessary. Could you test this? Thanks

tet (flashkaisel) wrote :

Stefan Bader escribió:
> While being on that I had conversation with upstream and it looks like a
> second patch is needed to make things working. I updated
> http://people.canonical.com/~smb/bug492056/ with a new test kernel set.
> Lucid has now released 2.6.31-13, so the headers should not be
> necessary. Could you test this? Thanks
>
> ** Patch added: "0002-HID-extend-mask-for-BUTTON-usage-page.patch"
> http://launchpadlibrarian.net/39070719/0002-HID-extend-mask-for-BUTTON-usage-page.patch
>
>
flashkaisel@flashkaisel-desktop:~$ uname -r
2.6.32-12-generic

root@flashkaisel-desktop:~# echo 1 >/sys/module/hid/parameters/debug
root@flashkaisel-desktop:~#

I cant get file rdesc.

flashkaisel@flashkaisel-desktop:~$ sudo lsinput
/dev/input/event0
   bustype : BUS_HOST
   vendor : 0x0
   product : 0x1
   version : 0
   name : "Power Button"
   phys : "PNP0C0C/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event1
   bustype : BUS_HOST
   vendor : 0x0
   product : 0x1
   version : 0
   name : "Power Button"
   phys : "LNXPWRBN/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event2
   bustype : BUS_ADB
   vendor : 0x1
   product : 0x1
   version : 256
   name : "Macintosh mouse button emulation"
   bits ev : EV_SYN EV_KEY EV_REL

/dev/input/event3
   bustype : BUS_I8042
   vendor : 0x1
   product : 0x1
   version : 43841
   name : "AT Translated Set 2 keyboard"
   phys : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event4
   bustype : BUS_USB
   vendor : 0x46d
   product : 0xc00e
   version : 272
   name : "Logitech USB-PS/2 Optical Mouse"
   phys : "usb-0000:00:1a.1-2/input0"
   uniq : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_MSC

/dev/input/event5
   bustype : BUS_PCI
   vendor : 0x10ec
   product : 0x883
   version : 1
   name : "HDA Digital PCBeep"
   phys : "card0/codec#0/beep0"
   bits ev : EV_SYN EV_SND

/dev/input/event6
   bustype : BUS_USB
   vendor : 0x6a3
   product : 0x75c
   version : 273
   name : "Saitek Saitek X52 Flight Control"
   phys : "usb-0000:00:1a.1-1/input0"
   uniq : ""
   bits ev : EV_SYN EV_KEY EV_ABS EV_MSC

After install new kernel 2.6.32-13-generic, graphics card dont start,
maybe need headers?¿; and i have another cuestion: how to apply pacth?¿?¿

Thx

tet (flashkaisel) wrote :
Download full text (4.0 KiB)

ok, i have rdesc:

05 01 09 04 a1 01 09 01 a1 00 09 30 09 31 15 00 26 ff 07 75 0b 95 02 81
02 09 35 15 00 26 ff 03 75 0a 95 01 81 02 09 32 09 33 09 34 09 36 15 00
26 ff 00 75 08 95 04 81 02 05 09 19 01 29 22 15 00 25 01 95 22 75 01 81
02 75 02 95 01 81 01 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75
04 95 01 81 42 05 05 09 24 09 26 15 00 25 0f 75 04 95 02 81 02 c0 c0

  INPUT[INPUT]
    Field(0)
      Physical(GenericDesktop.Pointer)
      Usage(2)
        GenericDesktop.X
        GenericDesktop.Y
      Logical Minimum(0)
      Logical Maximum(2047)
      Report Size(11)
      Report Count(2)
      Report Offset(0)
      Flags( Variable Absolute )
    Field(1)
      Physical(GenericDesktop.Pointer)
      Usage(1)
        GenericDesktop.Rz
      Logical Minimum(0)
      Logical Maximum(1023)
      Report Size(10)
      Report Count(1)
      Report Offset(22)
      Flags( Variable Absolute )
    Field(2)
      Physical(GenericDesktop.Pointer)
      Usage(4)
        GenericDesktop.Z
        GenericDesktop.Rx
        GenericDesktop.Ry
        GenericDesktop.Slider
      Logical Minimum(0)
      Logical Maximum(255)
      Report Size(8)
      Report Count(4)
      Report Offset(32)
      Flags( Variable Absolute )
    Field(3)
      Physical(GenericDesktop.Pointer)
      Usage(34)
        Button.0001
        Button.0002
        Button.0003
        Button.0004
        Button.0005
        Button.0006
        Button.0007
        Button.0008
        Button.0009
        Button.000a
        Button.000b
        Button.000c
        Button.000d
        Button.000e
        Button.000f
        Button.0010
        Button.0011
        Button.0012
        Button.0013
        Button.0014
        Button.0015
        Button.0016
        Button.0017
        Button.0018
        Button.0019
        Button.001a
        Button.001b
        Button.001c
        Button.001d
        Button.001e
        Button.001f
        Button.0020
        Button.0021
        Button.0022
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(1)
      Report Count(34)
      Report Offset(64)
      Flags( Variable Absolute )
    Field(4)
      Physical(GenericDesktop.Pointer)
      Usage(1)
        GenericDesktop.HatSwitch
      Logical Minimum(1)
      Logical Maximum(8)
      Physical Minimum(0)
      Physical Maximum(315)
      Unit(English Rotation : Degrees)
      Report Size(4)
      Report Count(1)
      Report Offset(100)
      Flags( Variable Absolute NullState )
    Field(5)
      Physical(GenericDesktop.Pointer)
      Usage(2)
        0005.0024
        0005.0026
      Logical Minimum(0)
      Logical Maximum(15)
      Physical Minimum(0)
      Physical Maximum(315)
      Unit(English Rotation : Degrees)
      Report Size(4)
      Report Count(2)
      Report Offset(104)
      Flags( Variable Absolute )

GenericDesktop.X ---> Absolute.X
GenericDesktop.Y ---> Absolute.Y
GenericDesktop.Rz ---> Absolute.Rz
GenericDesktop.Z ---> Absolute.Z
GenericDesktop.Rx ---> Absolute.Rx
GenericDesktop.Ry ---> Absolute.Ry
GenericDesktop.Slider ---> Absolute.Throttle
Button.0001 ---> Key.Trigger
Button.0002 ---> Key.ThumbBtn
Button.0003 ---> Key.ThumbBtn2
Button.0004 ---> Key...

Read more...

Stefan Bader (smb) wrote :

Just a quick answer to your question (have not looked at your data yet): The headers are necessary, though I would expect them to be present as the current development kernel is/was at -13, too. But you need to be on that kernel before installing the test kernel. A patch is applied to the kernel source code with a tool called patch, but you will have to compile the whole kernel on your own and this requires other tools and a lot of disk space and time.

Looked at the rdesc output now and this still seems to enumerate the buttons incorrectly. This was with the latest test kernel? Reading through the bug report is simpler if you always add the output of "uname -a" (yes, sorry I got that wrong last time) to any other output you collect.

In general it looks like something is still wrong/missing.

tet (flashkaisel) wrote :

Thank you very much for your help.

The output file rdesc are from kernel 2.6.32.12

I will test the patch, with kernel 2.6.32.12.

Stefan Bader (smb) wrote :

It would help me to verify the issue if you could test with the test kernel I build. To avoid not having graphics, you need just to wait until upgrades offer you a 2.6.32-13 kernel (this should be the case now). Then after updating and booting into that kernel, install the test kernel and your graphics should work.

tet (flashkaisel) wrote :

ok, i will test with kernel 2.6.32-13-generic. I tried use order patch
with the patch: 0001-HID-joysticks-with..................patch , but i
dont know if doing something (after order, the cursor is flashing)?¿?¿

Stefan Bader escribió:
> It would help me to verify the issue if you could test with the test
> kernel I build. To avoid not having graphics, you need just to wait
> until upgrades offer you a 2.6.32-13 kernel (this should be the case
> now). Then after updating and booting into that kernel, install the test
> kernel and your graphics should work.
>
>

Stefan Bader (smb) wrote :

tet wrote:
> ok, i will test with kernel 2.6.32-13-generic. I tried use order patch
> with the patch: 0001-HID-joysticks-with..................patch , but i
> dont know if doing something (after order, the cursor is flashing)?¿?¿

Maybe I misunderstood some things. Sorry. You don't need to do anything with the
*.patch files. Those are there purely for documentation. They describe the
difference between a current Lucid kernel and the test kernel package [1].

The only thing to be aware of is that installing this kernel should only be done
when you already got the 2.6.32-13-generic kernel from Lucid installed. Mainly
you need the headers. If you do a

sudo apt-get install linux-headers-13-generic

it will either install them or tell you they are already installed. Then you can
download one of the deb files from [1] and install it with

sudo dpkg -i <filename>

Then reboot (make sure the right kernel is running by looking at uname -a which
should have the bugnumber in the version string), check whether the joystick
works, if not unplug the joystick and gather the rdesc information as described
above and post it together with the output of "uname -a".

Thanks for your help.

[1] http://people.canonical.com/~smb/bug492056/
    One of the linux-image-*.deb files depending on your installation.

tet (flashkaisel) wrote :
Download full text (5.9 KiB)

- Im using Karmic amd_64.
- I installed linux-image-2.6.32-13-generic_2.6.32-13.18_amd64.deb
- Restarted Computer. Grub, choice 2.6.32-13-generic
- uname -r
2.6.32-13
- I Tried "sudo apt-get install linux-headers-13-generic", but cant find
the file linux-headers-13-generic.

i cant test joystick on X-Plane, need graphics working for do the test.
Maybe i need activate backports or proposed

I send you the rdesc:

 05 01 09 04 a1 01 09 01 a1 00 09 30 09 31 15 00 26 ff 07 75 0b 95 02 81
02 09 35 15 00 26 ff 03 75 0a 95 01 81 02 09 32 09 33 09 34 09 36 15 00
26 ff 00 75 08 95 04 81 02 05 09 19 01 29 22 15 00 25 01 95 22 75 01 81
02 75 02 95 01 81 01 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75
04 95 01 81 42 05 05 09 24 09 26 15 00 25 0f 75 04 95 02 81 02 c0 c0

  INPUT[INPUT]
    Field(0)
      Physical(GenericDesktop.Pointer)
      Usage(2)
        GenericDesktop.X
        GenericDesktop.Y
      Logical Minimum(0)
      Logical Maximum(2047)
      Report Size(11)
      Report Count(2)
      Report Offset(0)
      Flags( Variable Absolute )
    Field(1)
      Physical(GenericDesktop.Pointer)
      Usage(1)
        GenericDesktop.Rz
      Logical Minimum(0)
      Logical Maximum(1023)
      Report Size(10)
      Report Count(1)
      Report Offset(22)
      Flags( Variable Absolute )
    Field(2)
      Physical(GenericDesktop.Pointer)
      Usage(4)
        GenericDesktop.Z
        GenericDesktop.Rx
        GenericDesktop.Ry
        GenericDesktop.Slider
      Logical Minimum(0)
      Logical Maximum(255)
      Report Size(8)
      Report Count(4)
      Report Offset(32)
      Flags( Variable Absolute )
    Field(3)
      Physical(GenericDesktop.Pointer)
      Usage(34)
        Button.0001
        Button.0002
        Button.0003
        Button.0004
        Button.0005
        Button.0006
        Button.0007
        Button.0008
        Button.0009
        Button.000a
        Button.000b
        Button.000c
        Button.000d
        Button.000e
        Button.000f
        Button.0010
        Button.0011
        Button.0012
        Button.0013
        Button.0014
        Button.0015
        Button.0016
        Button.0017
        Button.0018
        Button.0019
        Button.001a
        Button.001b
        Button.001c
        Button.001d
        Button.001e
        Button.001f
        Button.0020
        Button.0021
        Button.0022
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(1)
      Report Count(34)
      Report Offset(64)
      Flags( Variable Absolute )
    Field(4)
      Physical(GenericDesktop.Pointer)
      Usage(1)
        GenericDesktop.HatSwitch
      Logical Minimum(1)
      Logical Maximum(8)
      Physical Minimum(0)
      Physical Maximum(315)
      Unit(English Rotation : Degrees)
      Report Size(4)
      Report Count(1)
      Report Offset(100)
      Flags( Variable Absolute NullState )
    Field(5)
      Physical(GenericDesktop.Pointer)
      Usage(2)
        0005.0024
        0005.0026
      Logical Minimum(0)
      Logical Maximum(15)
      Physical Minimum(0)
      Physical Maximum(315)
      Unit(English Rotation : Degrees)
      Report Size(4)
      Report Count(2)
      Report Offse...

Read more...

Stefan Bader (smb) wrote :

tet wrote:
> - Im using Karmic amd_64.

For some reason I was assuming you were on Lucid already. Sorry. In that case I
need to add the header files to my page. You need to install the all and amd64 one.

sudo dpkg -i linux-headers-2.6.32-13_2.6.32-13.18+bug492056v1_all.deb
linux-headers-2.6.32-13-generic_2.6.32-13.18+bug492056v1_amd64.deb

> - I installed linux-image-2.6.32-13-generic_2.6.32-13.18_amd64.deb
> - Restarted Computer. Grub, choice 2.6.32-13-generic

> - uname -r
> 2.6.32-13

uname -a, please. It shows more details.

> - I Tried "sudo apt-get install linux-headers-13-generic", but cant find
> the file linux-headers-13-generic.
>
> i cant test joystick on X-Plane, need graphics working for do the test.
> Maybe i need activate backports or proposed

No, you would need to add entries for lucid for that, but that is too dangerous.
I will keep that in mind and always provide the headers in future.

> Button.0001 ---> Key.Trigger
> Button.0002 ---> Key.ThumbBtn
> Button.0003 ---> Key.ThumbBtn2
> Button.0004 ---> Key.TopBtn
> Button.0005 ---> Key.TopBtn2
> Button.0006 ---> Key.PinkieBtn
> Button.0007 ---> Key.BaseBtn
> Button.0008 ---> Key.BaseBtn2
> Button.0009 ---> Key.BaseBtn3
> Button.000a ---> Key.BaseBtn4
> Button.000b ---> Key.BaseBtn5
> Button.000c ---> Key.BaseBtn6
> Button.000d ---> Key.?
> Button.000e ---> Key.?
> Button.000f ---> Key.?
> Button.0010 ---> Key.BtnDead
> Button.0011 ---> Key.BtnA
> Button.0012 ---> Key.BtnB
> Button.0013 ---> Key.BtnC
> Button.0014 ---> Key.BtnX
> Button.0015 ---> Key.BtnY
> Button.0016 ---> Key.BtnZ
> Button.0017 ---> Key.BtnTL
> Button.0018 ---> Key.BtnTR
> Button.0019 ---> Key.BtnTL2
> Button.001a ---> Key.BtnTR2
> Button.001b ---> Key.BtnSelect
> Button.001c ---> Key.BtnStart
> Button.001d ---> Key.BtnMode
> Button.001e ---> Key.BtnThumbL
> Button.001f ---> Key.BtnThumbR
> Button.0020 ---> Key.?
> Button.0021 ---> Key.ToolPen
> Button.0022 ---> Key.ToolRubber

Not sure but that seems to be still not correct. But also try to use the
joystick when you got X running. And also add uname -a from the running kernel.
Thanks.

tet (flashkaisel) wrote :

Congratulations !!!!, good work Stefan. You have did it!!
Thank you indeed for your precius help.
I am still testing but I hope not to ask you anything else. (lol)

tet (flashkaisel) wrote :

If i can help you in future, testing something, please say me, and I
will be pleased help you.

Stefan Bader (smb) wrote :

tet wrote:
> If i can help you in future, testing something, please say me, and I
> will be pleased help you.
>

Sure, just for this one to be clear: the second test kernel with the two patches
made the Saitek available as a joystick again?

tet (flashkaisel) wrote :

- Using Karmik
- Installed from :http://people.canonical.com/~smb/bug492056

linux-headers-2.6.32-13_2.6.32-13.18+bug492056v1_all.deb

linux-headers-2.6.32-13-generic_2.6.32-13.18+bug492056v1_amd64.deb

linux-image-2.6.32-13-generic_2.6.32-13.18+bug492056v1_amd64.deb

- flashkaisel@flashkaisel-desktop:~$ uname -a
Linux flashkaisel-desktop 2.6.32-13-generic #18+bug492056v1 SMP Thu Feb
11 13:44:15 UTC 2010 x86_64 GNU/Linux

- After install new kernel than you changed, Joystick X52, works perfectly.
-Yes work, but i dont know, if is the second test kernel or first.

Stefan Bader (smb) wrote :

tet wrote:
> - Using Karmik
> - Installed from :http://people.canonical.com/~smb/bug492056
>
>
> linux-headers-2.6.32-13_2.6.32-13.18+bug492056v1_all.deb
>
> linux-headers-2.6.32-13-generic_2.6.32-13.18+bug492056v1_amd64.deb
>
> linux-image-2.6.32-13-generic_2.6.32-13.18+bug492056v1_amd64.deb
>
> - flashkaisel@flashkaisel-desktop:~$ uname -a
> Linux flashkaisel-desktop 2.6.32-13-generic #18+bug492056v1 SMP Thu Feb
> 11 13:44:15 UTC 2010 x86_64 GNU/Linux
>
> - After install new kernel than you changed, Joystick X52, works perfectly.
> -Yes work, but i dont know, if is the second test kernel or first.
>
Its the second test kernel (the first one was a -12-generic but I seem to have
cleaned it away to avoid confusion). Thanks for the feedback.

Launchpad Janitor (janitor) wrote :
Download full text (7.8 KiB)

This bug was fixed in the package linux - 2.6.32-15.21

---------------
linux (2.6.32-15.21) lucid; urgency=low

  [ Andy Whitcroft ]

  * Revert "(pre-stable) drm/i915: Increase fb alignment to 64k"
  * Revert "[Config] lenovo-sl-laptop -- enable"
  * Revert "ubuntu: lenovo-sl-laptop -- git tip (b19a08f81f)"
  * armel -- cramfs module will no longer be built
  * d-i -- make all modules optional
  * rename the debug packages to match archive standard
    - LP: #527837
  * lenovo-sl-laptop is no longer built

  [ Colin Ian King ]

  * Disable 4MB page tables for Atom, work around errata AAE44
    - LP: #523112

  [ Colin Watson ]

  * ubuntu: dm-raid4-5: Depend on XOR_BLOCKS
  * ubuntu: fsam7400: Depend on CHECK_SIGNATURE

  [ Jesse Barnes ]

  * SAUCE: drm/i915: don't change DRM configuration when releasing load
    detect pipe
    - LP: #488328

  [ Loïc Minier ]

  * [Config] armel Update versatile initrd configs
    - LP: #524893
  * SAUCE: [um] Don't use nx_enabled under UML
    - LP: #524849

  [ Manoj Iyer ]

  * [Config] added new config option CONFIG_SR_REPORT_TIME_LIMIT

  [ Mario Limonciello ]

  * SAUCE: v3 - Add Dell Business Class Netbook LED driver

  [ Rafael J. Wysocki ]

  * SAUCE: PM report driver and device suspend/resume times.

  [ Surbhi Palande ]

  * Revert "[Upstream] e1000e: enhance frame fragment detection"
    - CVE-2009-4538
  * Revert "[Upstream] e1000: enhance frame fragment detection"
    - CVE-2009-4536

  [ Tim Gardner ]

  * [Config] Enabled CONFIG_LEDS_DELL_NETBOOKS=m
  * SAUCE: (pre-stable) netfilter: xt_recent: fix buffer overflow
  * SAUCE: (pre-stable) netfilter: xt_recent: fix false match

  [ Upstream Kernel Changes ]

  * Revert "(pre-stable) eCryptfs: Add getattr function"
  * Fix potential crash with sys_move_pages
  * futex_lock_pi() key refcnt fix
  * futex: Handle user space corruption gracefully
  * futex: Handle futex value corruption gracefully
  * Fix race in tty_fasync() properly
  * hwmon: (w83781d) Request I/O ports individually for probing
  * hwmon: (lm78) Request I/O ports individually for probing
  * hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
  * ALSA: ctxfi - fix PTP address initialization
  * drm/i915: disable hotplug detect before Ironlake CRT detect
  * drm/i915: enable self-refresh on 965
  * drm/i915: Disable SR when more than one pipe is enabled
  * drm/i915: Fix DDC on some systems by clearing BIOS GMBUS setup.
  * drm/i915: Add HP nx9020/SamsungSX20S to ACPI LID quirk list
  * drm/i915: Fix the incorrect DMI string for Samsung SX20S laptop
  * drm/i915: Add MALATA PC-81005 to ACPI LID quirk list
  * usb: r8a66597-hcd: Flush the D-cache for the pipe-in transfer buffers.
  * i2c-tiny-usb: Fix on big-endian systems
  * drm/i915: handle FBC and self-refresh better
  * drm/i915: Increase fb alignment to 64k
  * drm/i915: Update write_domains on active list after flush.
  * regulator: Fix display of null constraints for regulators
  * ALSA: hda-intel: Avoid divide by zero crash
  * CPUFREQ: Fix use after free of struct powernow_k8_data
  * freeze_bdev: don't deactivate successfully frozen MS_RDONLY sb
  * cciss: Make cciss_seq_show handle holes in the h->drv[] array
  * ioat: fix in...

Read more...

Changed in linux (Ubuntu):
status: Triaged → Fix Released
Oak (oak-brno) wrote :

SOLVED! HALLELUYAH!!!

Simple solution, after all googling... No need to replace kernel!!

Preface: Your joystick is shown in:
# dmesg | grep joy
but doesn't come up i.e. in js_demo. This is apparently due to problem with some 2.6 kernels. The easy solution I tested is to replace a single module joydev.ko (instead of rebuilding and reinstalling all kernel).

0) I had installed kernel sources and stuff to compile it. You MUST find out what kernel you're using:
# uname -r
...and use exactly this kernel. In my case it's "linux-2.6.31.5-0.1-Desktop" which sources I will copy to "linux-2.6.31.5-OAK". In all cases you must replace my kernel version for yours in all commands bellow. "OAK" is just a suffix to my kernel sources copy - you can use other suffix of course.
1) I copied my current kernel to /usr/src/linux-2.6.31.5-OAK so that I can modify the sources safely
# cp /usr/src/linux-2.6.31.5-0.1-Desktop /usr/src/linux-2.6.31.5-OAK
2) Modify the file /usr/src/linux-2.6.31.5-OAK/drivers/input/joydev.c - remove following lines:
---
  .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
    INPUT_DEVICE_ID_MATCH_KEYBIT,
  .evbit = { BIT_MASK(EV_KEY) },
  .keybit = { [BIT_WORD(BTN_DIGI)] = BIT_MASK(BTN_DIGI) },
---
... which are beteween brackets bellow text "}, /* Avoid itouchpads and touchscreens */". This exactl what they are saying in the first post of this thread.
3) I followed tutorial ("http://en.opensuse.org/Configure,_Build_and_Install_a_Custom_Linux_Kernel" for my OpenSUSE) for rebulding the kernel, up to the point where you run "make". This includes few commands:
cd /usr/src/linux-2.6.31.5-OAK
# make clean
# make mrproper
# make cloneconfig
# make xconfig (probably not required for building a module only, but better check the config in xconfig)
... now this is where you would run "make". But instead, build kernel modules for input devices only:
# make SUBDIRS=/usr/src/linux-2.6.31.5-OAK/drivers/input/ modules
... this will take some time, cca 5 minutes on my quad machine. When finished, provided it didn't ended up with an "Error #" statement (install whatever you're missing for kernel building then), replace with your new input.ko module the old one:
# mv /lib/modules/2.6.31.5-0.1-desktop/kernel/drivers/input/joydev.ko /lib/modules/2.6.31.5-0.1-desktop/kernel/drivers/input/joydev.ko.bak
# cp /usr/src/linux-2.6.31.5-OAK/drivers/input/joydev.ko /lib/modules/2.6.31.5-0.1-desktop/kernel/drivers/input/joydev.ko
4) Reboot and ENJOY! Now when you run (with X52 plugged in :-D) js_demo you should see the joystick and it's reactions:
oak@linux:~> js_demo
Joystick test program.
~~~~~~~~~~~~~~~~~~~~~~
Joystick 0: "Saitek Saitek X52 Flight Control System"
Joystick 1 not detected
Joystick 2 not detected
Joystick 3 not detected
Joystick 4 not detected
Joystick 5 not detected
Joystick 6 not detected
Joystick 7 not detected
+--------------------JS.0----------------------+
| Btns Ax:0 Ax:1 Ax:2 Ax:3 Ax:4 Ax:5 Ax:6 Ax:7 Ax:8 Ax:9 Ax:10 |
+----------------------------------------------+
...
I hope it helps.

Regards,

Oak

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

Other bug subscribers