"All work and no fun makes Jack a dull boy …."
If you own a PC joystick and you're a gamer who just migrated to GNU / Linux and you enter the wonderful world of Linux gaming (haha what wonderful world its nightmare :), perhaps you will want an easy way to make your Joystick work on GNU / Linux.
In this article I'll try my best to explain how you can relavitely easy make your Linux joystick (joy stick 🙂 ), bring you the happiness of playing old arcades in an old school joystick way.
1. Install necessery packages for joystick under Linux
gamelinux:~# apt-get install –yes joystick jstest-gtk joy2key gjoypad xserver-xorg-input-joystick
xserver-xorg-input-joystick-dev kodi-peripherals
2. Test wherher joystick is properly detected by kernel
gamelinux:~# cat /dev/input/js0
If above cat command returns a bunch of weird signs in your terminal, that means the joystick was successfully detected and should be working.
3. Load Joystick necessery Linux modules if your Gamepad is not properly detected
Note that I assume you're super user most of below commands are preferrably to be run as root:
If you're Gamepad is not detected, you'll have to manually create /dev/input/js0
gamelinux:~# cd /dev/input
gamelinux;~# MAKEDEV js0
Further on you'll need to perhaps load at least the following 3 modules which gives support for a number of JoySticks / Gamepad devices
gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe sidewinder
gamelinux:~# modprobe gameport
Just in case if you're planning to play old Arcade games I recommend you load also following bunch of modules:
gamelinux:~# modprobe snd-seq
gamelinux:~# modprobe 3c59x
gamelinux:~# modprobe snd-emu10k1
gamelinux:~# modprobe snd-pcm-oss
gamelinux:~# modprobe snd-mixer-oss
gamelinux:~# modprobe snd-seq-oss
If you get an error message and don't suceed to calibrate your gamepad, you need to look under to know the modules that fit your Joystick model.
For a MS Sidewinder gamepad
gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe sidewinder
gamelinux:~# modprobe analog
## This one work only for analog pad, like joysticks
For a Logitech WingMan digital gamepad
gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe adi
## Specific driver for Logitech gamepads
For a Logitech WingMan gamepad (analog)
gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe analog
## Module for analog gamepads
gamelinux:~# modprobe pcigame
## Module for PCI card (??)
gamelinux:~# modprobe adi
## Module for Logitech pads
For a MS SideWinder ForceFeedBack Pro
gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe analog
gamelinux:~# modprobe sidewinder
gamelinux:~# modprobe iforce
## Force Feedback driver
gamelinux:~# modprobe evdev
For a Guillemot dual analog gamepad (gameport, non-USB)
gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe guillemot
gamelinux:~# modprobe analog
## to check
gamelinux:~# modprobe iforce
## to check
If auto-detect of joystick doesn't work (hopefully not your case)
gamelinux:~# modprobe usbhid
gamelinux:~# modprobe joydev
– Enable Joystick for KDE Users
Luckily though historically the kcontrol package was required but nowadays, KDE users could usually calibrate joystick via KDE K Control Centrer
To make joystick configuration permanent on Linux you need to add the modules that worked with your Joystick device to /etc/modules,
for eample I own
JOYSTICK GENIUS MAXFIRE G-08XU
And my
/etc/modules file
looks like so:
gamelinux:~# cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
snd-seq
3c59x
snd-emu10k1
snd-pcm-oss
snd-mixer-oss
snd-seq-oss
joydev
In case of some problems with SoundCard conflicting joystick or the other way around you might also want to add into /etc/modprobe.d/options something similar to
gamelinux:~# vim /etc/modprobe.d/options
gamelinux:~# options snd_ens1371 joystick_port=1
4. Calibrate your joystick either using jstest / jscal commands or GNOME's jstest-gtk
To calibrate joystick in text mode use below commands
jscal /dev/input/js0
jstest /dev/input/js0
For the lazy ones you can calibrate your joystick via GNOME's graphical tool jstest-gtk
jstest-gtk
This article is just a basic explanation on how to make your joystick work, for thoroughful advanced explanation on JoySticks and Gamepads I recommend ArchLinux Wiki explanation on how to configure Gamepads
5. Create missing Symlinks from /dev/input/js0 to /dev/js0
I've personally experienced a problem with Xmame / Xmess (Multimedia Arcade Emulator) and other old arcade Virtual Machine Emulators that are supposed to recognize the joystick, but because it is common that the joystick is trying to be invoked via /dev/js0 /dev/js1 (depending on its model), but somehow this links are missing, thus I had to manually create the links with ln command, like so:
– For /dev/input/js0 to link /dev/js0
cd /dev; ln -sf /dev/input/js0;
– For /dev/input/js1 to link /dev/js1
cd /dev; ln -sf /dev/input/js1;
More helpful Articles

Tags: gamepads linux howto, genius, guilemot joystick, howto, joypad, joystick, Linux, maxfire, sitewinder, wingman joystick
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
$ sudo -i
root@commodore:~# apt-get install –yes joystick jstest-gtk joy2key gjoypad
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen…. Fertig
E: Paket –yes kann nicht gefunden werden.
E: Paket gjoypad kann nicht gefunden werden.
root@commodore:~#
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Notify me of followup comments via e-mail
View CommentView Comment