Commit 85dd689ff9d48f7adaee8328456c6677213c9c62

Gabriel Jacobo 2013-11-14T10:19:07

Adds joystick/udev troubleshooting information to README-linux.txt

diff --git a/README-linux.txt b/README-linux.txt
index d147b16..e0f029d 100644
--- a/README-linux.txt
+++ b/README-linux.txt
@@ -30,3 +30,51 @@ NOTES:
   configure script to include DirectFB support. Send patches.  :)
 
 
+================================================================================
+Joystick does not work
+================================================================================
+
+If you compiled or are using a version of SDL with udev support (and you should!)
+there's a few issues that may cause SDL to fail to detect your joystick. To
+debug this, start by installing the evtest utility. On Ubuntu/Debian:
+
+    sudo apt-get install evtest
+    
+Then run:
+    
+    sudo evtest
+    
+You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
+Now run:
+    
+    cat /dev/input/event/XX
+
+If you get a permission error, you need to set a udev rule to change the mode of
+your device (see below)    
+    
+Also, try:
+    
+    sudo udevadm info --query=all --name=input/eventXX
+    
+If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
+you need to set up an udev rule to force this variable.
+
+A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks 
+like:
+    
+   SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
+   SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
+   
+You can set up similar rules for your device by changing the values listed in
+idProduct and idVendor. To obtain these values, try:
+    
+    sudo udevadm info -a --name=input/eventXX | grep idVendor
+    sudo udevadm info -a --name=input/eventXX | grep idProduct
+    
+If multiple values come up for each of these, the one you want is the first one of each.    
+
+On other systems which ship with an older udev (such as CentOS), you may need
+to set up a rule such as:
+    
+    SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"
+