# USB Playstation 2 joypad adapter ceased to work in 2.6.0

## Frain

Hey guys!

I've got a problem with the 2.6.0 kernel: My USB Playstation 2 joypad adapter doesn't work anymore (it used to work in 2.4.x without problems). When I plug in the joystick, the kernel seems to recognize it correctly:

```
input: USB HID v1.00 Joystick [0925:8884] on usb-0000:00:02.1-2
```

but instead of creating /dev/input/js0, devfsd creates /dev/input/mouseX. Doing 

```
cat /dev/input/mouseX
```

 and pushing buttons even produces  output!

I've tried creating the node manually with 

```
mknod /dev/input/js0 c 13 0
```

but doing 

```
cat /dev/input/js0
```

 produces 

```
cat: /dev/input/js0: No such device
```

Any ideas?

edit by nixnut: changed title to something a bit more specific.

----------

## Bonkie

why not make /dev/js0 a symlink to /dev/mousex ?

----------

## Frain

 *Bonkie wrote:*   

> why not make /dev/js0 a symlink to /dev/mousex ?

 

I've tried it, it didn't work (at least in gxmame) - no input was detected. What's funny is that scummvm reports 

```
Using joystick: 0925:8884
```

 and the joypad works!

----------

## maverick

Sorry for bumping this 1-year old thread  :Embarassed:  , but im having exacly the same problem, with the same PSX>USB adapter.

When running a 2.4 kernel, it works like a charm. Modprobing joydev gives a working js0 device.

However on a 2.6 kernel, it gets recognizes as a mouse device for some weird reason, while the log gives:

input: USB HID v1.00 Joystick [0925:8884] on usb-0000:00:07.1-2

Instead of a js0, an event4/mouse1/ts1 gets added.  :Shocked: 

Zsnes however, detects the gamepad just fine, and it works perfectly there:

Joystick 0 (48 Buttons): 0925:8884

I think this is because zsnes (and other sdl apps) use a different way of detecting joysticks, but im not too sure about it.

Also, symlinking to the event4/mouse1/ts1 device doesnt work, because they dont seem to generate the proper events when a button on the gamepad is pushed. for example:

Events generated when pushing _the same_ button on the gamepad 3 times:

 ts1 device on a 2.6 kernel 

```

(/dev/input) od -xw8 ts1

0000000 0000 0000 0000 0edf

0000010 0000 0000 0000 1390

0000020 0000 0000 0000 0765

0000030 0000 0000 0000 08f5

0000040 0000 0000 0000 099c

0000050 0000 0000 0000 0cbd

```

 js0 device on a 2.4 kernel 

```

od -xw8 /dev/js0

0001100 6692 01ab 0001 0201

0001110 670a 01ab 0000 0201

0001120 6c00 01ab 0001 0201

0001130 6c78 01ab 0000 0201

0001140 6f20 01ab 0001 0201

0001150 6f98 01ab 0000 0201

```

In 2.6, all the events are different, while in 2.4 they are the same.

I have also tried adding a line to /etc/hotplug/usb.handmap like:

joydev               0x0003 0x0925   0x8884

but this still gets me a mouse device  :Crying or Very sad: 

If anyone knows whats going on, please tell me  :Smile: 

----------

## maverick

Well, I still haven't got this figured out, so im bumping this thread for the last time...  :Crying or Very sad: 

Running a 2.6.11 kernel now, and the problem is still there.

Some hints/directions would really be appreciated.

----------

## maverick

it took a while, but i kinda figured it out.   :Confused: 

There seems to be a problem in the joydev driver as of kernel 2.6.x, since this was not an issue with a 2.4 kernel.

First of all, when the joystick (super joybox 5 0925:8884) is plugged in, the joydev module gets loaded. Instead of creating a jsX device node, an eventX,tsX,mouseX gets created.

Editing the joydev sourcecode seems to resolve this:  :Smile: 

The file involved: /usr/src/linux/drivers/input/joydev.c   (note: i'm currently running a 2.6.12-gentoo-r9 kernel)

There seems to be a problem in the section starting at line 480:

```

static struct input_device_id joydev_blacklist[] = {

        {

                .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,

                .evbit = { BIT(EV_KEY) },

                .keybit = { [LONG(BTN_TOUCH)] = BIT(BTN_TOUCH) },

        },      /* Avoid itouchpads, touchscreens and tablets */

        { },    /* Terminating entry */

};

```

As stated it will avoid itouchpads, touchscreens and tablets, but it will also avoid the Super Joybox 5 PS1/2>USB converter   :Idea: 

Now to resolve this, use the following crappy workaround/fix:

/usr/src/linux/drivers/input/joydev.c @ line 518 change :

```

.blacklist =    joydev_blacklist,

```

to

```

/*      .blacklist =    joydev_blacklist,*/

```

This will comment out the blacklist line, so it wont get loaded.   :Embarassed: 

Since im not a programmer, i have no idea if this will cause nasty sideaffects with other mouses/joysticks/touchscreens or whatever, but all seemed fine on my box.   :Cool: 

----------

## SignOfZeta

Just to be safe, change that to this instead:

```
.blacklist = NULL,
```

That should negate any possible side effects.  If that line is commented out, then the data member will not be instantiated, which could cause compile-time or link-time errors.  Initializing it to NULL will still allow functions that use that struct to work without die()-ing.  :Razz: 

I'm testing this now with 2.6.14-gentoo-r5.  I'll post my results.

UPDATE:  Compiling threw a non-fatal warning about joydev_blacklist being defined but not used.  So it likes my syntax...  :Smile: 

----------

## SignOfZeta

Nope.  It didn't work.  I also tried commenting out that line, but that didn't work, either.  Sorry, Maverick.

Well, I guess this is just another *bump* post...

----------

