2

I purchased a Logitech Wingman Extreme Digital joystick at a thift store and dug around and found an old PCI soundcard that had a Gameport port

After inserting the soundcard into my computer and confirming that the soundcard works (outputs sound to speakers) I plugged in the joystick to the Gameport and Linux will not detect the joystick at all

"lspci" gives this for the soundcard info

05:06.0 Multimedia audio controller: C-Media Electronics Inc CMI8738/CMI8768 PCI Audio (rev 10)

I have used "modprobe" to load "joydev", "gameport", "adi", "ns558", "snd_cmipci" and "analog" to no avail

"jstest /dev/input/jsX" where X is 0 to 10 just gave "jstest: No such device or address" every time

Does anyone have any info on how to get this device to work in Linux? I have seen a few guides but they all gave me the same steps that I have tried above

System information

  • Distro - Manjaro
  • Kernel - 4.9.13-1-MANJARO

EDIT: here is the output of lspci -n -v -s 05:06.0 and aplay -l

05:06.0 0401: 13f6:0111 (rev 10)
Subsystem: 13f6:0111
Flags: bus master, stepping, medium devsel, latency 32, IRQ 20, NUMA node 0
I/O ports at ae00 [size=256]
Capabilities: [c0] Power Management version 2
Kernel driver in use: snd_cmipci
Kernel modules: snd_cmipci

sudo modprobe snd_cmipci joystick_port=1 does nothing and neither does joystick_port=ae00

Here is the output of aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: CMI8738 [C-Media CMI8738], device 0: CMI8738 [C-Media PCI DAC/ADC]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: CMI8738 [C-Media CMI8738], device 1: CMI8738 [C-Media PCI 2nd DAC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CMI8738 [C-Media CMI8738], device 2: CMI8738 [C-Media PCI IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

EDIT: Output of cat /proc/ioports

0000-0cf7 : PCI Bus 0000:00
  0000-001f : dma1
  0020-0021 : pic1
  0040-0043 : timer0
  0050-0053 : timer1
  0060-0060 : keyboard
  0061-0061 : PNP0800:00
  0064-0064 : keyboard
  0070-0073 : rtc0
  0080-008f : dma page reg
  00a0-00a1 : pic2
  00c0-00df : dma2
  00f0-00ff : PNP0C04:00
    00f0-00ff : fpu
  0170-0177 : 0000:00:14.1
    0170-0177 : pata_atiixp
  01f0-01f7 : 0000:00:14.1
    01f0-01f7 : pata_atiixp
  0220-0225 : pnp 00:00
  0228-022f : pnp 00:01
    022d-022e : it87
      022d-022e : it87
  0290-0294 : pnp 00:00
  0376-0376 : 0000:00:14.1
    0376-0376 : pata_atiixp
  0378-037a : parport0
  03c0-03df : vesafb
  03f6-03f6 : 0000:00:14.1
    03f6-03f6 : pata_atiixp
  03f8-03ff : serial
  040b-040b : pnp 00:01
  04d0-04d1 : pnp 00:00
  04d6-04d6 : pnp 00:01
  0b00-0b0f : pnp 00:01
  0b10-0b1f : pnp 00:01
  0b20-0b3f : pnp 00:01
  0c00-0c01 : pnp 00:01
  0c14-0c14 : pnp 00:01
  0c50-0c52 : pnp 00:01
  0c6c-0c6d : pnp 00:01
   0c6f-0c6f : pnp 00:01
  0cd0-0cd1 : pnp 00:01
  0cd2-0cd3 : pnp 00:01
  0cd4-0cdf : pnp 00:01
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
  4000-40fe : pnp 00:01
    4000-4003 : ACPI PM1a_EVT_BLK
    4004-4005 : ACPI PM1a_CNT_BLK
    4008-400b : ACPI PM_TMR
    4020-4027 : ACPI GPE0_BLK
    4050-4050 : ACPI PM2_CNT_BLK
  4100-411f : pnp 00:01
  4210-4217 : pnp 00:01
  a000-afff : PCI Bus 0000:05
    ae00-aeff : 0000:05:06.0
  b000-bfff : PCI Bus 0000:02
  c000-cfff : PCI Bus 0000:01
    ce00-ceff : 0000:01:00.0
  d000-dfff : PCI Bus 0000:04
  e000-efff : PCI Bus 0000:03
    ee00-eeff : 0000:03:00.0
      ee00-eeff : r8168
  fa00-fa0f : 0000:00:14.1
    fa00-fa0f : pata_atiixp
  fb00-fb0f : 0000:00:11.0
    fb00-fb0f : ahci
  fc00-fc03 : 0000:00:11.0
    fc00-fc03 : ahci
  fd00-fd07 : 0000:00:11.0
    fd00-fd07 : ahci
  fe00-fe03 : 0000:00:11.0
    fe00-fe03 : ahci
  ff00-ff07 : 0000:00:11.0
    ff00-ff07 : ahci

After doing modprobe snd_cmipci joystick_port=0x201 I actually got this in dmseg [74167.823806] gameport gameport0: C-Media Gameport is pci0000:05:06.0/gameport0, io 0x201, speed 714kHz

However jstest gives No such file or directory no matter what I try. I have tried /dev/js* and changed the gameport to 0x200 though 0x207 with no luck

At this point is it safe to assume that the joystick might be dead? Would there be a way to test this?

0

The correct driver is snd_cmipci. If you look at the documentation in Documentation/sound/alsa/CMIPCI.txt in the kernel sources, it says:

Joystick and Modem

The legacy joystick is supported. To enable the joystick support, pass joystick_port=1 module option. The value 1 means the auto-detection. If the auto-detection fails, try to pass the exact I/O address.

The modem is enabled dynamically via a card control switch "Modem"

Also verify via dmesg that snd_cmipci modprobes correctly, and edit your question with any error messages if you can't figure out the reason.

Edit:

Ok, the card is properly detected. I looked at the source code (sound/pci/cmipci.c) and the datasheet. The only thing that is mentioned there is one single bit to enable the joystick, and it doesn't give any base address. The base address also isn't part of the PCI regions, apparently older PCI cards did it that way (it's the same for the legacy MPU401/FM/SB16 bases, though you can select those, which means we could know them).

Traditionally the game port was at 0x200-0x207, with 0x201 as the one usually used. So the driver code just tries to reserve 0x201 and 0x200, in that order, for joystick_port=1, and the given port otherwise, and then enables the joystick in the card. There's no proper detection, and no messages.

So, first check that the resource is free: Without the driver loaded (check with lsmod, use rmmod if necessary), edit the question with the output of cat /proc/ioports as root (as normal user, you don't see the ranges). If the 0x200 range is taken, we must find a way to free it.

For probing, again make sure the driver is not already loaded when you modprobe snd_cmipci joystick_port=0x201 (or the option won't be processed).

In don't remember exactly where the gameport shows up, but if everything works (the range is free), you should now see gameport and some other modules in lsmod, and I think you should have a device /dev/js* or similar which you can test with jscal or jstest. If that happens but you don't get any reaction, try 0x200 next.

Edit

As I said, I don't remember exactly the module stack you need, and I don't have gameport hardware anymore. But I dug out my old joystick (which also happens to be a Logitech WingMan Extreme, no idea if "Digital" or not), looked at old files and googled a bit. Here's my current understanding of the module stack:

  • gameport to make the gameport register accessible
  • ns558 to measure analog signals on the gameport
  • analog as the driver for plain analog joysticks (if your Wingman works in this mode)
  • adi for Logitech joysticks using the ADI protocol (for the extra buttons etc.) over the gameport (the likely choice for your Wingman)
  • joydev for the input device

So after getting the gameport, try the following, in that order:

modprobe adi
modprobe joydev

and watch dmesg or sudo tail -f /var/log/syslog to see what happens. You should get a /dev/input/js0 device you can test with jstest /dev/input/js0. If that doesn't work, try instead

modprobe ns558
modprobe analog map=auto
modprobe joydev

BTW, my Wingman is multi protocol (USB + ADI, possibly also analog), and came with a gameport-to-usb adapter cable which allows me to connect it to an USB port. Simpler than using an old soundcard. :-)

  • Modprobing snd_cmipci shows nothing on dmesg. Passing joystick_port=1 also shows nothing on dmesg How do I get the exact I/O address? – Jango Knight Mar 27 '17 at 2:22
  • Please edit question with output of lspci -n -v -s 05:06.0 after you modprobed snd_cmipci. This will also give you the I/O regions. Also, as it's a soundcard, add output of aplay -l after modprobe to verify that at least the soundcard is detected. – dirkt Mar 27 '17 at 5:42
  • Added both outputs to the question – Jango Knight Mar 28 '17 at 2:30
  • Added the output of ioports and my dmesg output – Jango Knight Mar 28 '17 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.