LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-14-2012, 06:31 PM   #1
tmcki
LQ Newbie
 
Registered: Oct 2012
Location: Poland
Posts: 5

Rep: Reputation: Disabled
Strange USB device behaviour - /dev/input/js0 is dead. DevID: 068e:00a6


Hi everyone. I have a strange USB device behaviour. The device is a joystick:
mango:/etc/modprobe.d # lsusb
(...)
Bus 002 Device 007: ID 068e:00a6 CH Products, Inc.
(...)

My system is OpenSuSE 12.1
mango:/etc/modprobe.d # uname -a
Linux mango 3.1.10-1.16-desktop #1 SMP PREEMPT Wed Jun 27 05:21:40 UTC 2012 (d016078) x86_64 x86_64 x86_64 GNU/Linux


After plug-in the device it all seems to be ok:

mango:/etc/modprobe.d # tail -f /var/log/messages
Oct 15 01:31:30 mango kernel: [ 1241.832024] usb 2-5: new low speed USB device number 8 using ohci_hcd
Oct 15 01:31:30 mango kernel: [ 1242.023040] usb 2-5: New USB device found, idVendor=068e, idProduct=00a6
Oct 15 01:31:30 mango kernel: [ 1242.023044] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Oct 15 01:31:30 mango kernel: [ 1242.023047] usb 2-5: Product: CH 3 AXIS 2 INPUT CONTROL
Oct 15 01:31:30 mango kernel: [ 1242.023049] usb 2-5: Manufacturer: CH PRODUCTS
Oct 15 01:31:30 mango kernel: [ 1242.042095] input: CH PRODUCTS CH 3 AXIS 2 INPUT CONTROL as /devices/pci0000:00/0000:00:02.0/usb2/2-5/2-5:1.0/input/input10
Oct 15 01:31:30 mango kernel: [ 1242.042275] generic-usb 0003:068E:00A6.0007: input,hidraw1: USB HID v1.00 Joystick [CH PRODUCTS CH 3 AXIS 2 INPUT CONTROL] on usb-0000:00:02.0-5/input0

But the device is actually not responsive. jstest shows no movement on axes and button. I first suspected the SDL lib, but then realized that even cat /dev/input/js0 gives no output neither when moving axes nor pressing buttons.

mango:/etc/modprobe.d # cat /dev/input/js0
�@��@��@���@���@��^C

And that's it - no more output when moving axes and pressing buttons.

I checked the joy on MS Windows machine - it worked fine. After that I checked the other linux machine, and... it worked. I don't have the access to this computer now, but the dmesg output after I plugged the joy was almost the same with the difference that there was ehci_hcd instead of ohci_hcd. After that I checked the other machines with OpenSuSE 12.1 and 12.2, and realized that joy is working on each intel based machine, and not working on AMD. Feeling kinda dizzy and a little frustrated as this seems to be hardware related and actually I have no idea how to solve this issue. I am currently running AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ based on MCP55 mainboard. The joystick is not working here. Any ideas?

Last edited by tmcki; 10-15-2012 at 06:40 AM.
 
Old 10-15-2012, 06:35 AM   #2
tmcki
LQ Newbie
 
Registered: Oct 2012
Location: Poland
Posts: 5

Original Poster
Rep: Reputation: Disabled
Just a little update

I checked another USB joystick (Bus 002 Device 004: ID 06a3:0464 Saitek PLC Cyborg Evo) and it works fine on all the machines.
Also found one machine with Intel CPU, on which the 068e:00a6 CH Products, Inc. joystick is not working and found that on EVERY machine that joystick is working it is working basing on ehci_hcd and on every machine failed it is ohci_hcd. I tried:

# lspci -v|grep HCI
00:0b.0 USB controller: NVIDIA Corporation MCP51 USB Controller (rev a3) (prog-if 10 [OHCI])
00:0b.1 USB controller: NVIDIA Corporation MCP51 USB Controller (rev a3) (prog-if 20 [EHCI])
07:08.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0) (prog-if 10 [OHCI])

This accidentally caused the joystick working. I dig for another hour, and realized, that there is a walk around.
After I plug the device I need to call lsusb -v as a superuser (both sudo, and calling that from root console is OK). This makes the device working fine. Calling lsusb without -v option or calling this from "regular" user console is not enough.

My user is tomek, so I made a hack to make this joy working:
So:
added new group

# groupadd foousb

added myself to this group:
# groupmod -A tomek foousb

added one line to sudoers:
#visudo
(...)
%foousb ALL=(ALL) NOPASSWD: /usr/bin/lsusb
(...)

After that I made a script on my account:

-------------------------------------
#!/bin/sh
sudo /usr/bin/lsusb -v > /dev/null 2>&1
-------------------------------------

Running this script each time after I plug the joystick make it work. Hope this will help someone in the future. Anyway - I will be grateful if someone could please explain to me, what is actually happening here.

Last edited by tmcki; 10-15-2012 at 08:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Off-brand Gamepad Controller - no /dev/input/js0 tuxdelux Linux - Hardware 0 07-12-2009 02:19 PM
Getting a USB device (touch screen here) to be recognized under /dev/input/ d2army Linux - Hardware 0 12-15-2008 01:26 PM
/dev/input/js0 not appearing headrift Linux - Games 2 08-10-2008 06:45 PM
xbox contoller detected but does not make /dev/input/js0 sonicbhoc Linux - Games 0 09-23-2006 03:29 PM
/dev/js0 as second mouse ty pe input device in Xfree86 frieza Linux - Software 0 05-24-2004 11:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration