# Logitech Wingman Gameport

## d13f00l

Hey.  I can't for the life of me get this gamepad working under 2.6.  I had it working fine under 2.4 months ago.

Anyway, I'm using the ADI module.

gameport/joydev/ns558/adi  ISA pnp etc

Alsa for my soundcard, which has an inteli8x0 chipset

running an nforce2 mobo

My gameport works, I tested with analog and ns558, and an old joystick I had lying around.  I can cat out /dev/jsx with the other joystick, but the light on my Wingman doesn't go on, and catting /dev/js* comes up with device not found.  Anyone have any ideas?

Module                  Size  Used by

analog                 10016  0 

ns558                   4608  0 

adi                     8000  0 

joydev                  7936  0 

gameport                3584  3 analog,ns558,adi

nvidia               4819924  12 

nvidia_agp              5852  1 

agpgart                27624  2 nvidia_agp

tulip                  42464  0 

 :Crying or Very sad:   :Crying or Very sad: 

----------

## d13f00l

Bump, anyone?

----------

## d13f00l

Does anyone even have this gamepad?

----------

## Kaboosh

I do and get the same problem...it *sometimes* (1 in 10 chance) loads if I:

rmmod adi

modprobe adi

I hate Logitech - everything they make is crap!

 :Mad: 

----------

## razorback

Been through the same thing with the adi module. Finally made the following script to deal with the problem.

#!/bin/bash

if [ ! -e /sys/class/input/js0 ]

then

  modprobe -qr adi

  sleep 1

  modprobe -qr ns558

  sleep 1

  modprobe -qr gameport

  sleep 1

  modprobe -qr joydev

  sleep 1

  modprobe -q joydev

  sleep 1

  modprobe -q gameport

  sleep 1

  modprobe -q ns558

  sleep 2

  until [ -e /sys/class/input/js0 ]

  do

    if [ "lsmod | grep adi" ]

    then

    /sbin/modprobe -qr adi

    fi

    sleep 1

    /sbin/modprobe -q adi

    sleep 2

  done

  sleep 2

  aplay -q /usr/kde/3.4/share/sounds/KDE_Startup_new.wav

  if [ ! -e /dev/js0 ]

  then

    ln -s /dev/input/js0 /dev/js0

  fi

fi

It might take 1 minute or it might take 10 minutes but at some point the adi module will "take" and /dev/js0 will be created. What I find ironic is that with the 2.4 kernel this wasn't needed but I have had to do this with all the 2.6 kernels.

----------

## Kaboosh

Thank-you Mr. Razorback!

As far as workarounds go this will be fine.

It sure beats having somebody using my computer go "Why doesn't the joystick work?" and then not being able to give them a straight answer - this is one of the reasons I dumped windows 6 years ago and have never looked back   :Cool: 

----------

## mikemcquaid

I finally, finally found a solution to this problem.

We were creating kernel modules this term, so I thought I'd give it a go debugging the module and pointed out the problem to the maintainer and he pointed out a fix.

In the static void adi_init_digital, remove the line (should be 324 or around there)

```

udelay(-seq[i]*14);    /* It looks like mdelay() is off by approx 1.4% */

```

or comment it out to 

```

/* udelay(-seq[i]*14);    It looks like mdelay() is off by approx 1.4% */

```

Then, run make or make modules and make modules_install on your kernel sources, and it should work.

This line is actually a hack to work with some other distros/kernels, so don't worry about removing it.

I may make a patch and submit a bug report to bugzilla, if anyone things it would be worthwhile.

----------

## d13f00l

Thanks.

I found it works flawlessly if I use the gameport to USB adapter that came with it, however.  Awesome, regardless.  :Smile: 

----------

## mikemcquaid

d13fool, can you and anyone else who has this problem please confirm it and test my patch at the bug I filed.

gentoo-sources ADI joystick patch request

----------

## rubik-wuerfel

I just added a notice to this thread to http://gentoo-wiki.com/HOWTO_Joystick_Setup.  The solution described here worked perfectly well for me.

----------

