# (SOLVED) MS Sidewinder (gameport) joystick doesn't work!

## ripper1340

(sorry if this has already been posted before, but I couldn't find any topic matching the problem I'm having) 

Friends, the case is as follows: 

  I have a MS Sidewinder gamepad (the gameport version), and it used to work very well under gentoo, until "something" happened (probably a kernel upgrade, from gentoo-sources-2.6.16 to gentoo-sources-2.6.17, I'm not sure   :Embarassed:  ), and now the /dev/input/jsX nodes aren't being created anymore. Also, creating them manually with 'mknod' doesn't help.. And I believe I have everything I need to make it work correctly (see below). According to the documentation under /usr/src/linux/Documentation and gentoo-wiki.com, the necessary modules are being loaded fine, the joystick_port=1 option is set on my sound card (CMedia 8338) config. under /etc/modules.d/alsa, etc.. 

However, the gamepad still works perfectly under Windows XP, so I'm confused.. 

Here's some probably useful information (sorry for the excess of info, but I don't know what could be really relevant):

```

$ udevinfo --version

udevinfo, version 104

```

lspci output:

```

# lspci

00:00.0 Host bridge: Silicon Integrated Systems [SiS] 745 Host (rev 01)

00:01.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)

00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge)

00:02.1 SMBus: Silicon Integrated Systems [SiS] SiS961/2 SMBus Controller

00:02.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)

00:02.3 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)

00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)

00:05.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)

00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

00:0a.0 Communication controller: Agere Systems LT WinModem (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation NV40 [GeForce 6800 GT] (rev a1)

```

lsmod output:

```

# lsmod 

Module                  Size  Used by

analog                  9568  0 

snd_rtctimer            2528  1 

iptable_filter          2240  0 

ip_tables               9736  1 iptable_filter

snd_opl3_synth         12932  0 

snd_seq_instr           6336  1 snd_opl3_synth

snd_seq_midi_emul       5888  1 snd_opl3_synth

snd_ainstr_fm           2048  1 snd_opl3_synth

snd_pcm_oss            36640  0 

snd_mixer_oss          14016  1 snd_pcm_oss

snd_seq_oss            28672  0 

snd_seq_midi_event      6144  1 snd_seq_oss

snd_seq                45456  8 snd_opl3_synth,snd_seq_instr,snd_seq_midi_emul,snd_seq_oss,snd_seq_midi_event

fuse                   40148  0 

kqemu                 121572  0 

cdc_acm                12128  0 

ppp_async               8896  1 

ppp_generic            18452  5 ppp_async

slhc                    6080  1 ppp_generic

sidewinder             10624  0 

ns558                   3776  0 

joydev                  7936  0 

nvidia               6812628  22 

snd_cmipci             29792  5 

gameport               11144  4 analog,sidewinder,ns558,snd_cmipci

snd_pcm                62216  3 snd_pcm_oss,snd_cmipci

snd_page_alloc          7432  1 snd_pcm

snd_opl3_lib            8192  2 snd_opl3_synth,snd_cmipci

snd_timer              18756  5 snd_rtctimer,snd_seq,snd_pcm,snd_opl3_lib

snd_hwdep               6596  1 snd_opl3_lib

snd_mpu401_uart         6400  1 snd_cmipci

snd_rawmidi            19168  1 snd_mpu401_uart

snd_seq_device          6348  5 snd_opl3_synth,snd_seq_oss,snd_seq,snd_opl3_lib,snd_rawmidi

snd                    43044  22 snd_opl3_synth,snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_cmipci,snd_pcm,snd_opl3_lib,snd_timer,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device

soundcore               6048  1 snd

```

/etc/modules.autoload.d/kernel-2.6

```

$ cat kernel-2.6  | grep -v '#'

joydev

ns558

sidewinder

gameport

snd-cmipci joystick_port=1

nvidia

ppp_async

ppp_generic

cdc_acm

kqemu major=0

fuse

```

/etc/modules.d/alsa:

```

$ cat alsa | grep -v '#'

alias char-major-116 snd

alias char-major-14 soundcore

alias snd-card-0 snd-cmipci

alias sound-slot-0 snd-card-0

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

options snd cards_limit=1

options snd-card-0 joystick_port=1

```

(I've called modules-update too)

```

$ uname -a

Linux XXXXXX 2.6.20-gentoo #2 PREEMPT Sun Feb 11 22:12:56 BRST 2007 i686 AMD Athlon(TM) XP 1800+ AuthenticAMD GNU/Linux

```

/usr/src/linux/.config (what I thought to be relevant, if you guys need the full output, just ask) 

```

CONFIG_MODULES=y

CONFIG_MODULE_UNLOAD=y

CONFIG_KMOD=y

CONFIG_INPUT=y

CONFIG_INPUT_JOYDEV=m

CONFIG_INPUT_EVDEV=y

CONFIG_INPUT_JOYSTICK=y

CONFIG_JOYSTICK_ANALOG=m

CONFIG_JOYSTICK_SIDEWINDER=m

CONFIG_INPUT_MISC=y

CONFIG_SERIO=y

CONFIG_SERIO_I8042=y

CONFIG_SERIO_LIBPS2=y

CONFIG_GAMEPORT=m

CONFIG_GAMEPORT_NS558=m

CONFIG_SOUND=m

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_HWDEP=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=m

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_RTCTIMER=m

CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

CONFIG_SND_MPU401_UART=m

CONFIG_SND_OPL3_LIB=m

CONFIG_SND_CMIPCI=m

```

I still haven't tried using an older kernel, and I'll let you know when I do that.. but I would like to know if other people are having the same problem with newer kernel releases  :Neutral:  ... under 2.6.15-r1 this gamepad only worked with a patch that fixed sidewinder.c ..

Among other things, I've tried exchanging the module loading order on boot (analog, gameport, sidewinder, joydev, ns558, snd_cmipci), and using only 'analog' instead of 'sidewinder' and vice-versa, to no good. So I really don't understand what's going on   :Rolling Eyes: 

Anyway, thanks for any help, if you need any more info, just ask!Last edited by ripper1340 on Thu Feb 15, 2007 1:33 am; edited 1 time in total

----------

## ripper1340

by the way, the output of 'dmesg' doesn't say anything about  gameports or joysticks or sidewinder  :Sad: 

----------

## PaulBredbury

Looks like you're missing from /etc/modules.autoload.d/kernel-2.6

```
gameport_ns558
```

----------

## ripper1340

```

# modprobe gameport_ns558

FATAL: Module gameport_ns558 not found.

```

```

/lib/modules/2.6.20-gentoo/kernel/drivers/input $ find ./

./

./joydev.ko

./gameport

./gameport/gameport.ko

./gameport/ns558.ko

./joystick

./joystick/sidewinder.ko

./joystick/analog.ko

```

I have both gameport and ns558 built as modules, but I didn't find an option in the kernel for this module   :Sad: 

----------

## PaulBredbury

It is present, in git-sources-2.6.20-r1 anyway:

```
$ grep -i gameport_ns558 /usr/src/linux/.config

# CONFIG_GAMEPORT_NS558 is not set
```

----------

## ripper1340

I'll give it a shot! Thanks!!

ps: I won't put ( SOLVED ) yet.. 'cause I would like it to make it work with gentoo-sources.. Anyway I'll try to learn how to debug kernel modules  :Smile: ... I have absolutely no experience on this yet!

----------

## ripper1340

Okay, I've fixed it!   :Very Happy: 

Just changed the /etc/modules.autoload.d/kernel-2.6, so it looked like this:

```

gameport

ns558

joydev

#analog

sidewinder

#snd-cmipci joystick_port=1

```

I figured that *for some reason* the 'snd-cmipci' module should be loaded by /etc/init.d/alsasound afterwards, in the 'default' runlevel.. otherwise it won't detect the gameport..

now I got this on the last two lines of dmesg: 

```

gameport: C-Media Gameport is pci0000:00:05.0/gameport0, io 0x201, speed 2294kHz

input: Microsoft SideWinder GamePad as /class/input/input4

```

Thanks anyway!

----------

## micro_mx

Whoa, I love you guys, with this instruccions now my sidewinder is working

----------

