Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Help with joystick

Need help with peripherals or devices?
Post Reply
Message
Author
phaeton
Posts: 44
Joined: 2005-06-02 21:00

Help with joystick

#1 Post by phaeton »

I'm trying to get my joystick to work. Here's where I'm at right now.

There are no js* devices in /dev or /dev/input when I boot the computer. Typing lsmod shows gameport and analog modules already loaded. I can type:
mknod input/js0 c 13 0
ln -s input/js0 js0
to create a joystick device. Then I can load the proper modules to make it work.
modprobe joydev
modprobe ns558
modprobe sidewinder

I have to unload the analog module though becuase it isn't the correct module for my joystick (the sidewinder is). At that point it works. After I reboot the computer, the js device is gone and I have to repeat the entire process.

What do I need to do to make the js device stay through a reboot or make it autodetected and created on boot?

I hope this makes since and appreciate any help.

phaeton
Posts: 44
Joined: 2005-06-02 21:00

#2 Post by phaeton »

I finally got the joystick working properly, so I figured I'd post a follow-up showing my solution in case anyone else had a similar issue.

First, to get the js0 device to stay through a reboot, I added

Code: Select all

M input/js0	c 13 0
to the end of the /etc/udev/links.conf file. The device doesn't actually stay through a reboot, but gets recreated at each boot by the udev script.

Then I had a problem getting the ns558 module to work. I had to load it, unload it, then load it again to get it to work. I found an explanation for this behavior at http://lkml.org/lkml/2005/7/8/244. Following the https://www.redhat.com/archives/fedora- ... 04967.html link in that post, I created a script that runs on startup to load everything. Here is the script that worked for me.

Code: Select all

#! /bin/sh

modprobe -r analog
modprobe joydev
modprobe sidewinder
modprobe ns558
sleep 1
modprobe -r ns558
modprobe ns558
ln -s /dev/input/js0 /dev/js0
The analog module gets loaded earlier in the boot up, so I had to remove it to stop it from interfering with the sidewinder module. I think I know where the analog gets loaded, but I decided to just remove it using this script instead of altering other system files. I had to add the sleep line to prevent a module loading error. I added this to the /etc/init.d directory and linked it in the appropriate run levels.

I don't know if this was the best way to solve the issue, but it worked for me.

Post Reply