LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-07-2005, 03:43 PM   #1
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Rep: Reputation: 30
Unhappy how to use a joystick


What are the steps you need to take to get a joystick working?

joystick model: Logitech Extreme 3D Pro

First I checked to see If the Joystick was detected: dmesg | grep usb
the grep list had my joystick listed so I started to play a game, but it wasn't detected by the game.

I ran modprobe joydev then started the game again.

I got this warning from the game (supertux )

warning: cannot open joystick -1
the simple directmedia error that occured was: there is 1 joystick availiable

After seeing this I know my joystick is getting detected, but it's still unusable for some reason.

Do I need to edit some file to tell the system where the joystick is?
And where do you download the Joystick module with jstest?
 
Old 04-08-2005, 01:57 AM   #2
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
maybe the permisions are to strict on the device-node try a 755
 
Old 04-08-2005, 02:50 PM   #3
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Original Poster
Rep: Reputation: 30
Nope. It wasn't a permisions problem. The permisions for js0-4 was 777. Anything else I should try? There has to be a reason that linux thinks the joystick is -1 not 0 or something else, and can't open it.
 
Old 04-08-2005, 03:20 PM   #4
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
try this as root just to see if the joystick works and the kernel can get data from it

cat /dev/input/js0-4

move the joystick around if you see a lot of strange karakters on the screen everything is almost ok
if not then you probablyneed to recompile your kernel again

then just a symlink needed i think

ln -s /dev/input/js0-4 /dev/input/js0
 
Old 04-08-2005, 05:47 PM   #5
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Original Poster
Rep: Reputation: 30
The cat command worked! Who'd have thought that viewing the output of the device could test a joystick. Linux is so cool!

OK so I don't have to recompile my kernal (guess I have to find someother excuse oh well!)

So... what's next?

oh, and how do you get the prompt back to the way it was?
 
Old 04-08-2005, 05:51 PM   #6
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
oh, and how do you get the prompt back to the way it was?
Thought I might need to clarify. After I exited the cat program (ctrl-c) the part that should say root@slackware looks just like the weird character that were being printed by cat.
 
Old 04-08-2005, 06:48 PM   #7
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
Do a reset. For konsole and gnome-terminal it's in one of the menus. For xterm it's in the ctrl+leftclick menu. Or you can close the window and open again.
 
Old 04-09-2005, 01:20 AM   #8
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
then just this command i think

ln -s /dev/input/js0-4 /dev/input/js0
 
Old 04-09-2005, 11:40 AM   #9
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Original Poster
Rep: Reputation: 30
It wont let me make the symbolic links to /dev/input/js0 because it says that it already exists (js0 was also the one that worked when I used cat)
 
Old 04-12-2005, 03:24 PM   #10
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Original Poster
Rep: Reputation: 30
Well, I tried plugging in the joystick in the other port, probing joydev before I plug it in (is this better or worse to modprobe after you plug something in?), and tried using feather to detect it (on another computer - I think my two cd drives are about ready to die on me )

Feather didn't have the right libraries to play the game so I couldn't test it out fully

I also tried plugging it in to the mouse port using a usb-ps/2 converter (weirder things have happened, right?)

Anyway, thought I'd try the simple things out

oh, and I probable should've tried the cat trick in an xterm instead of the consol - there was no weird letters doing it in the xterm
 
Old 04-17-2005, 12:52 PM   #11
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Original Poster
Rep: Reputation: 30
Finally a break through The joystick and game both worked perfectly on knoppix! Now I need to find out what's different between the two systems. Does KDE have some sort of magic hardware detection that could've affected it?

It still doesn't work in slackware though
 
Old 04-17-2005, 03:06 PM   #12
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Knoppix has excellent HW detection capbilities. Perhaps the issue is that Knoppix is loading a kernel module that Slack isn't. I'd suggest doing "lsmod" (as root, no quotes) in both Slack and Knoppix to compare. In order to manually load a module, you can run "modprobe xxx" (no quotes, and where xxx is the module name) Good luck with it -- J.W.
 
Old 04-20-2005, 09:30 AM   #13
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Original Poster
Rep: Reputation: 30
After trying to figure out all the differences by mouse and notepad.exe I realized something... Isn't there a linux tool for comparing two text files? I think I remember reading about that once
 
Old 04-20-2005, 11:03 AM   #14
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Yes, it's the "diff" command
Code:
diff <file1> <file2>
-- J.W.
 
Old 05-04-2005, 05:42 PM   #15
Kruncher
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 61

Rep: Reputation: 15
Try starting supertux from the command line like this "supertux -j 0"
 
  


Reply



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 Driver and API under kernel 2.6.12.3 using an USB joystick dispatcher Linux - Newbie 1 08-06-2005 09:43 AM
Joystick... Linux~Powered Linux - Games 1 07-24-2005 05:59 AM
Joystick Help sharkee Ubuntu 0 05-31-2005 05:44 AM
Joystick DaBlade Linux - Hardware 3 03-22-2005 04:58 AM
Joystick in RH 7.3?? lpriyamb Linux - General 5 10-21-2003 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:22 AM.

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
Open Source Consulting | Domain Registration