Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

HI!

I have a problem that it can easy, but I didn't find a solution yet.

When I turn on my computer using a Debian or Ubuntu and tried to use the joystick the commands of joystick doesn't pass to SO. Once I disconnect and reconnect the joystick on USB port it pass to work.

Environment:

SO: Debian 5.0 and Ubuntu 8.04 LTS

lsusb - executed this command before disconnect and reconnected the joystick result is equal:

Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
**Bus 007 Device 004: ID 068e:00af CH Products, Inc.** 
Bus 007 Device 002: ID 04d9:1400 Holtek Semiconductor, Inc. 
Bus 007 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 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

dmesg - relevants part only:

...
[    6.213666] usb 7-2: configuration #1 chosen from 1 choice
[    6.264813] usb 7-2: New USB device found, idVendor=068e, idProduct=00af
[    6.264816] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.264818] usb 7-2: Product: Megatron OEM 2 Axis 1 Button Joystick
[    6.264819] usb 7-2: Manufacturer: CH PRODUCTS
[    6.269849] usbcore: registered new interface driver hiddev
[    6.286942] input: HID 04d9:1400 as /class/input/input0
[    6.286942] input,hidraw0: USB HID v1.10 Keyboard [HID 04d9:1400] on usb-0000:00:1d.2-1
[    6.315247] input: HID 04d9:1400 as /class/input/input1
[    6.315247] input,hidraw1: USB HID v1.10 Mouse [HID 04d9:1400] on usb-0000:00:1d.2-1
[    6.357061] input: CH PRODUCTS Megatron OEM 2 Axis 1 Button Joystick as /class/input/input2
[    6.357061] input,hidraw2: USB HID v1.00 Joystick [CH PRODUCTS Megatron OEM 2 Axis 1 Button Joystick] on usb-0000:00:1d.2-2
[    6.357061] usbcore: registered new interface driver usbhid
[    6.357061] usbhid: v2.6:USB HID core driver

...

[ 6377.097243] usb 7-2: USB disconnect, address 3
[ 6379.225161] usb 7-2: new low speed USB device using uhci_hcd and address 4
[ 6379.408990] usb 7-2: configuration #1 chosen from 1 choice
[ 6379.615388] input: CH PRODUCTS Megatron OEM 2 Axis 1 Button Joystick as /class/input/input6
[ 6379.694649] input,hidraw2: USB HID v1.00 Joystick [CH PRODUCTS Megatron OEM 2 Axis 1 Button Joystick] on usb-0000:00:1d.2-2
[ 6379.700445] usb 7-2: New USB device found, idVendor=068e, idProduct=00af
[ 6379.700445] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6379.700445] usb 7-2: Product: Megatron OEM 2 Axis 1 Button Joystick
[ 6379.700445] usb 7-2: Manufacturer: CH PRODUCTS**

/proc/bus/usb/devices:

T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  4 Spd=1.5 MxCh= 0
D:  Ver= 1.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=068e ProdID=00af Rev= 0.00
S:  Manufacturer=CH PRODUCTS
S:  Product=Megatron OEM 2 Axis 1 Button Joystick
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 32mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   5 Ivl=10ms

Device: /dev/input/js0

I used to test cat /dev/input/js0 and my application.

I tried to access remotely with ssh, because my keyboard use USB port too, and executed the commands down:

# modprobe -r joydev
# modprobe -r usbhid
# modprobe usbhid
# modprobe joydev

The joystick doesn't work after I execute commands above.

What is happening?

Help me!

share|improve this question

migrated from serverfault.com Feb 4 '10 at 20:32

This question came from our site for professional system and network administrators.

add comment

2 Answers

I resolved this problem.

I tried a lot and one coworker spoke that I should reload the modules. I tried some combination and this combination work:

rmmod joydev
rmmod uhci_hcd
modprobe uhci_hcd
modprobe joydev

I input this lines in my /etc/rc.local and joystick work very well.

I need to understand better how it work.

Thanks.

share|improve this answer
add comment

I had the same problem. I tested a few hours and there a three solutions. The easiest: simply type

# lsusb -v -d 068e:00af

in the terminal

the cleanest: load the usbhid module with quirk parameter:

# rmmod usbhid && modprobe usbhid quirk=0x068e:0x00af:0x8

or for persistent solution better

# echo "options usbhid quirks=0x068e:0x00af:0x8" > /etc/modprobe.d/usbhid

the "hard" way:

patch the /usr/src/linux/drivers/hid/usbhid/hid-quirks.c (can look different in other kernel versions):

--- /usr/src/linux-2.6.27.45-0.1_old/drivers/hid/usbhid/hid-quirks.c 2010-02-23 12:21:38.000000000 +0100 +++ /usr/src/linux-2.6.27.45-0.1_new/drivers/hid/usbhid/hid-quirks.c 2010-11-22 17:59:05.000000000 +0100 @@ -102,6 +102,9 @@ #define USB_VENDOR_ID_BERKSHIRE 0x0c98

#define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140
+#define USB_VENDOR_ID_CH 0x068e +#define USB_DEVICE_ID_CH_2AXIS_1BUTTON 0x00af + #define USB_VENDOR_ID_CHERRY 0x046a #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023
@@ -624,6 +627,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_2AXIS_1BUTTON, HID_QUIRK_NOGET}, { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D, HID_QUIRK_NOGET },

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.