LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2006, 04:25 AM   #1
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 214

Rep: Reputation: 33
Please help with Joystick setup.


Hello all.

I need help getting a joystick (Sidewinder Pro) to work in a Mepis 6.0 installation.

The joystick function is alive and well when I use SuSE in the same machine, but is never there with any flavour of Debian (tried in Knoppix and Ubuntu). I use the KDE => System Configuration => Peripherals => Joysticks, and it gives a message saying there was no joystick device /dev/js[0-4] found on the computer.

Thanks much for any help.
 
Old 09-03-2006, 04:45 AM   #2
PMorph
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 213

Rep: Reputation: 31
Does it work if you login as root?
 
Old 09-03-2006, 02:39 PM   #3
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 214

Original Poster
Rep: Reputation: 33
Joysticks (Debian)

Thanks for reply PMorph

No - even as root, it does not work . There are no /dev/js* devices.

All the now installed joystick tools (jscal, jastest, js_demo, jscalibrator and the KDE joystick configurator) cannot work because they at least expect a joystick device to be present first.

My earlier (unwise) adventures with the script /dev/MAKEDEV does create a set of joystick "entities" in the directory from which it is invoked, provided the directory is *not* /dev. Please appreciate that I was doing stuff I should never have, but here is what happens. First from within /dev ..
Code:
root@1[dev]# ./MAKEDEV -v js
create js0      c 13 0 root:root 0444
create djs0     c 13 128 root:root 0444
create js1      c 13 1 root:root 0444
create djs1     c 13 129 root:root 0444
create js2      c 13 2 root:root 0444
create djs2     c 13 130 root:root 0444
create js3      c 13 3 root:root 0444
create djs3     c 13 131 root:root 0444
root@1[dev]# ls js*
ls: js*: No such file or directory
Next - try that again from within root..
Code:
root@1[dev]# cd /
root@1[/]# sh /dev/MAKEDEV -v js
create js0      c 13 0 root:root 0444
create djs0     c 13 128 root:root 0444
create js1      c 13 1 root:root 0444
create djs1     c 13 129 root:root 0444
create js2      c 13 2 root:root 0444
create djs2     c 13 130 root:root 0444
create js3      c 13 3 root:root 0444
create djs3     c 13 131 root:root 0444
root@1[/]# ls js*
js0  js1  js2  js3
This time, it does something, but in the wrong place. I removed them before I made a real tangle.

As further information .. I have Google trawled and tried numerous "joystick" threads.
I now have a clean new installation, not mangled in any way by my (unwise) attempts to get a joystick installed. The main contributor of a very competent set of joystick device kernel modules was SUSE kernel programmer Vojtech Pavlik. This is now built in to the present (post 2.4) kernels. I do suspect it may require a "kernel reconfigure or recompile" in some way to get them switched on. I have never done this before.

The Synaptic package manager does install several varieties of Ubuntu-supported kernel. One can choose to suit the hardware, and I do know enough to edit the /boot/grub/menu.lst file to point at the new kernel that arrives in /boot.

Is this a "recompile" scenario looming?

Last edited by GTrax; 09-03-2006 at 02:45 PM.
 
Old 09-03-2006, 06:24 PM   #4
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
Quote:
Originally Posted by GTrax
it gives a message saying there was no joystick device /dev/js[0-4] found on the computer.
Is this a USB joystick? If so, the proper device is probably /dev/input/js0. As I recall, in Kubuntu I had to change the device path manually in the configuration dialog.

The good news is that USB joysticks should "just work" on modern distributions. I don't know what extra features yours might have, but movement and regular buttons should work fine.

If, on the other hand, it's a gameport joystick, you may be in for a rough time.
 
Old 09-04-2006, 08:13 AM   #5
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 214

Original Poster
Rep: Reputation: 33
Thanks for your continued attention.

No - it is not a USB joystick.

The only things in /dev/input are "event1, event2, mice, and mouse0". Whatever devices are created in these places by the kernal when it starts up are then used by other things like /etc/X11/xorg.conf, and commands like "jstest".

I do not feel it has to be "USB or nothing". The SUSE 10.1 found it immediately, automatically, and it "just worked" The whole reason I wanted Mepis/Ubuntu or anything Debian was the Synaptic package manager works fine, and YAST did not.

This is not a hardware problem. The need is to find the right information about the way to install a device quoted as supported in the current Linux kernel. The need for polled analogue-to digital coverter input here is not just because I would love to try it with the FlightGear simulator (hardly a game!), but is for a non-trivial industrial control application.
 
Old 09-04-2006, 08:41 AM   #6
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 214

Original Poster
Rep: Reputation: 33
Stuff in /dev (joysticks)

Having more thoughts

Hmm..
Quote:
As I recall, in Kubuntu I had to change the device path manually in the configuration dialog.
The Mepis installation is based on Ubuntu 6.0, and except for the ability to have a root user, seems identical, but they are not quite so. I used the Kwikdisk mounter and took a look at the earlier Ubuntu partition /dev, and *YES*, they are there! No celebrations yet, but at least we have a path forward.

/dev/js0 and js1 and js2 and js3 and...
/dev/djs0 and djs1 and djs2 and djs3 , the djs[0-3] devices being the "digital" variety. I do not know what USB joystick devices would appear as.

thanks AdaHacker

OK - so for me the line of least resistance is simply to move to Kubuntu. But it leaves unanswered for others the question. What are the proper actions to make a wanted device appear in the /dev place?
 
Old 09-04-2006, 11:14 AM   #7
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 214

Original Poster
Rep: Reputation: 33
Joystick devices in Ubuntu mystery

OK - I have carefully looked, and it is not straightforward. We are just looking for any joystick devices that may be in Debian-type installations.

I have a Mepis 6.0 installation on sda, it being the main one.
I have a (K)Ubuntu installation on hda, and I can boot it using the Ubuntu CD.

The Mepis iconbar has a very nice KDE tool called KwikDisk, which I use to look at the other distro partitions.
When I use it to look at the /dev that belongs to Kubuntu, I do see the devices js0, js1, js2, js3 and also djs0, djs1, djs2, djs3.

The mystery is when I actually start up Kubuntu on hda for real, and use Konqueror to have a look at /dev, we see something else. There is a symlink called "js0" which points to a character device called /dev/input/js0. We do *not* see the device files we know are there from when we viewed that same /dev from a different running system. Using "ls /dev/j*) from a terminal also only shows the symlink. Is the content of /dev somehow being masked so we only see a kind of Ubuntu version?

The KDE joystick setup tool still cannot find it.
Th Synaptic pakage manager in Kubuntu, set up on the default Ubuntu repositories, does not include KwikDisk among its choices. Somehow, Kubuntu is beginning to feel a bit inflexible. The question remains - what is the procedure for making a supported device appear?
 
Old 09-04-2006, 05:11 PM   #8
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
I don't understand why you're looking at partitions for different distributions. With the advent of udev, device nodes are created and destroyed dynamically, so looking at /dev/ on a system when it's not running won't necessarily tell you anything.

The first thing I'd do is check lsmod and make sure your joystick drivers are loaded. If the drivers aren't loaded, then I wouldn't expect the device nodes to be there. I assume you're connecting through a gameport on a sound card, so you might also check that the gameport driver is loaded. You might also want to check the documentation for your sound card driver. Some drivers require a kernel option to be set in order to turn on the gameport.

My apologies if you've already done all that. I just thought I'd mention it since you seemed a little hung up on the device nodes.
 
Old 09-04-2006, 05:45 PM   #9
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 214

Original Poster
Rep: Reputation: 33
Joystick devices in Debian

I was looking there because I do not know any better. I was thinking that in /dev would be every valid "device" of any kind.

Especially, I found it curious that the very devices being asked for were all there when I sneaked a look into the non-running partition, but had gone away when I ran the Kubuntu distro in that partition.

But ... OK, I never knew about udev, so we stop that. and use lsmod to find out more...

There are 98 lines in that output, maybe we don't paste it all here, but there is a "joydev" in the first few lines..
Code:
lsmod > modules.txt
Module                  Size  Used by
rfcomm                 40216  0 
l2cap                  26244  5 rfcomm
bluetooth              49892  4 rfcomm,l2cap
joydev                 10048  0 
ppdev                   9220  0 
cpufreq_powersave       1920  0
etc..
This is from the Kubuntu distro. I will try it in the other one also.
 
Old 09-04-2006, 06:02 PM   #10
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 214

Original Poster
Rep: Reputation: 33
More information..

The joystick connector is the usual one where a MIDI port is used for the purpose, just like on any soundcard, but in this case, the sound is the AC97 built into the ASUS A7N8X motherboard which uses the Nvidia nForce chipset. The connector has a adapter cableform which goes to the header on the motherboard.
Quote:
Some drivers require a kernel option to be set in order to turn on the gameport.
Is there maybe a HowTo somewhere that explains what you do to set a kernel option to turn things on and off?
 
Old 09-04-2006, 06:15 PM   #11
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
For a gameport joystick, you'll need the "joydev", "gameport", and possibly "ns558" for the port to function. You'll also need the "analog" (generic analog joystick driver) or "sidewinder" (SideWinder-specific driver) driver for the stick to work.

As for the sound car driver, you may or may not need to set an option. It depends on your card and driver. I have no idea about your particular hardware - you'd have to check the kernel documentation for whatever driver your sound card uses. If an option is needed for the gameport, it would be a simple line in /etc/modprobe.conf or in a file under the /etc/modprobe.d directory. The kernel documentation would tell you what to add, if it's required.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Joystick Setup - Fedora Core 4 amb1en7 Linux - Hardware 1 10-28-2005 06:38 PM
Joystick Driver and API under kernel 2.6.12.3 using an USB joystick dispatcher Linux - Newbie 1 08-06-2005 09:43 AM
Joystick Help sharkee Ubuntu 0 05-31-2005 05:44 AM
joystick and rudder setup dave37 Linux - Hardware 1 03-20-2005 07:43 PM
Tweek or remap a joystick setup for racer! DavidPhillips Linux - General 0 05-08-2004 06:30 PM


All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration