Difference between revisions of "Old school (non-usb) joystick in Ubuntu 11.10"

From Finninday
Jump to: navigation, search
Line 89: Line 89:
  
 
It is much more likely that I don't know which device or module is required.
 
It is much more likely that I don't know which device or module is required.
 +
 +
This post mentions asound.state:
 +
 +
http://osdir.com/ml/linux.alsa.user/2002-07/msg00248.html
 +
 +
Do I have to do something to asound.state?  I don't see anything in there related to joysticks at the moment.
 +
 +
This post looks helpful:
 +
 +
http://ubuntuforums.org/showthread.php?t=1145181
 +
 +
I'll try joydump.
 +
 +
That gives me this in dmesg:
 +
<pre>
 +
[1030086.907845] joydump: ,------------------ START ----------------.
 +
[1030086.907854] joydump: | Dumping:      pci0000:01:07.0/gameport0 |
 +
[1030086.907858] joydump: | Speed:                        59659 kHz |
 +
[1030087.850311] joydump: >------------------ DATA -----------------<
 +
[1030087.850315] joydump: | index:  0 delta:  0 us data: 11111111 |
 +
[1030087.850322] joydump: `------------------- END -----------------'
 +
</pre>
 +
So what device is associated with pci0000:01:07.0/gameport0?  Probably not the /dev/input/js0 that I've been talking to.
 +
 +
/proc/ioports contains this:
 +
 +
0201-0201 : CMIPCI gameport
 +
 +
lspci reports the address 01:07.0 as associated with the audio card.
 +
 +
Looking through /sys/dev/char, I see these promising entries:
 +
<pre>
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:2 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/midiC1D0
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:3 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D2p
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:33 -> ../../devices/virtual/sound/timer
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:4 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D2c
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:5 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D1p
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:6 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D0p
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:7 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D0c
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:8 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/hwC1D0
 +
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:9 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/controlC1
 +
</pre>

Revision as of 00:49, 4 December 2011

We got a used joystick with a d-sub connector and I'm trying to make it work with Ubuntu 11.10.

I had to buy a sound card that had a game port. I got a Diamond XS51 sound card that shows up like this in lspci:

01:07.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)
	Subsystem: C-Media Electronics Inc CMI8738/C3DX PCI Audio Device
	Flags: bus master, medium devsel, latency 32, IRQ 16
	I/O ports at c000 [size=256]
	Capabilities: [c0] Power Management version 2
	Kernel driver in use: C-Media PCI
	Kernel modules: snd-cmipci

I now have these modules installed:

Module                  Size  Used by
analog                 17399  0 
sidewinder             21041  0 
ns558                  12654  0 
snd_cmipci             35513  2 
gameport               15060  5 analog,sidewinder,ns558,snd_cmipci
snd_opl3_lib           18863  1 snd_cmipci
snd_mpu401_uart        13865  1 snd_cmipci
nfs                   297750  0 
lockd                  78804  1 nfs
fscache                50674  1 nfs
auth_rpcgss            39545  1 nfs
nfs_acl                12771  1 nfs
sunrpc                205330  7 nfs,lockd,auth_rpcgss,nfs_acl
rfcomm                 38408  0 
bnep                   17923  2 
bluetooth             148839  8 rfcomm,bnep
pci_stub               12550  1 
vboxpci                22882  0 
vboxnetadp             13328  0 
vboxnetflt             27211  0 
vboxdrv               251814  3 vboxpci,vboxnetadp,vboxnetflt
autofs4                27924  6 
vesafb                 13489  1 
nvidia              10390874  40 
snd_intel8x0           33318  2 
snd_ac97_codec        106082  1 snd_intel8x0
snd_usb_audio         100880  0 
ac97_bus               12642  1 snd_ac97_codec
snd_pcm                80468  4 snd_cmipci,snd_intel8x0,snd_ac97_codec,snd_usb_audio
snd_hwdep              13276  2 snd_opl3_lib,snd_usb_audio
snd_usbmidi_lib        24558  1 snd_usb_audio
snd_seq_midi           13132  0 
joydev                 17393  0 
snd_rawmidi            25241  3 snd_mpu401_uart,snd_usbmidi_lib,snd_seq_midi
snd_seq_midi_event     14475  1 snd_seq_midi
uvcvideo               67271  0 
videodev               85626  1 uvcvideo
snd_seq                51567  2 snd_seq_midi,snd_seq_midi_event
snd_timer              28932  3 snd_opl3_lib,snd_pcm,snd_seq
snd_seq_device         14172  4 snd_opl3_lib,snd_seq_midi,snd_rawmidi,snd_seq
binfmt_misc            17292  1 
snd                    55902  21 snd_cmipci,snd_opl3_lib,snd_mpu401_uart,snd_intel8x0,snd_ac97_codec,snd_usb_audio,snd_pcm,snd_hwdep,snd_usbmidi_lib,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore              12600  1 snd
snd_page_alloc         14115  2 snd_intel8x0,snd_pcm
ppdev                  12849  0 
shpchp                 32356  0 
serio_raw              12990  0 
i2c_nforce2            12906  0 
parport_pc             32114  1 
lp                     17455  0 
parport                40930  3 ppdev,parport_pc,lp
usbhid                 41905  0 
hid                    77367  1 usbhid
forcedeth              58103  0 
pata_amd               13753  2 
floppy                 60310  0 

Sound works on the new sound card. That didn't take any effort. But I can't get the joystick to be visible.

I've tried jstest, which seems to misidentify the device:

root@merkli:~# jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Chicony USB Gaming Keyboard Pro) has 0 axes ()
and 11 buttons (BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL).
Testing ... (interrupt to exit)
Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off ^C

It isn't USB and it isn't a keyboard. It might be Chicony... the joystick doesn't have any brand or model written on it. And the joystick might not be working. But I think it is unlikely that all the switches and pots in it would all fail together.

It is much more likely that I don't know which device or module is required.

This post mentions asound.state:

http://osdir.com/ml/linux.alsa.user/2002-07/msg00248.html

Do I have to do something to asound.state? I don't see anything in there related to joysticks at the moment.

This post looks helpful:

http://ubuntuforums.org/showthread.php?t=1145181

I'll try joydump.

That gives me this in dmesg:

[1030086.907845] joydump: ,------------------ START ----------------.
[1030086.907854] joydump: | Dumping:      pci0000:01:07.0/gameport0 |
[1030086.907858] joydump: | Speed:                        59659 kHz |
[1030087.850311] joydump: >------------------ DATA -----------------<
[1030087.850315] joydump: | index:   0 delta:   0 us data: 11111111 |
[1030087.850322] joydump: `------------------- END -----------------'

So what device is associated with pci0000:01:07.0/gameport0? Probably not the /dev/input/js0 that I've been talking to.

/proc/ioports contains this:

0201-0201 : CMIPCI gameport

lspci reports the address 01:07.0 as associated with the audio card.

Looking through /sys/dev/char, I see these promising entries:

lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:2 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/midiC1D0
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:3 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D2p
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:33 -> ../../devices/virtual/sound/timer
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:4 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D2c
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:5 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D1p
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:6 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D0p
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:7 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/pcmC1D0c
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:8 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/hwC1D0
lrwxrwxrwx 1 root root 0 2011-12-03 16:45 116:9 -> ../../devices/pci0000:00/0000:00:08.0/0000:01:07.0/sound/card1/controlC1