Adds joystick/udev troubleshooting information to README-linux.txt
authorGabriel Jacobo <gabomdq@gmail.com>
Thu, 14 Nov 2013 10:19:07 -0300
changeset 79803122e7af0bf5
parent 7979 93d31af030bc
child 7981 6d538bc1b395
Adds joystick/udev troubleshooting information to README-linux.txt
README-linux.txt
     1.1 --- a/README-linux.txt	Thu Nov 14 01:00:08 2013 -0500
     1.2 +++ b/README-linux.txt	Thu Nov 14 10:19:07 2013 -0300
     1.3 @@ -30,3 +30,51 @@
     1.4    configure script to include DirectFB support. Send patches.  :)
     1.5  
     1.6  
     1.7 +================================================================================
     1.8 +Joystick does not work
     1.9 +================================================================================
    1.10 +
    1.11 +If you compiled or are using a version of SDL with udev support (and you should!)
    1.12 +there's a few issues that may cause SDL to fail to detect your joystick. To
    1.13 +debug this, start by installing the evtest utility. On Ubuntu/Debian:
    1.14 +
    1.15 +    sudo apt-get install evtest
    1.16 +    
    1.17 +Then run:
    1.18 +    
    1.19 +    sudo evtest
    1.20 +    
    1.21 +You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
    1.22 +Now run:
    1.23 +    
    1.24 +    cat /dev/input/event/XX
    1.25 +
    1.26 +If you get a permission error, you need to set a udev rule to change the mode of
    1.27 +your device (see below)    
    1.28 +    
    1.29 +Also, try:
    1.30 +    
    1.31 +    sudo udevadm info --query=all --name=input/eventXX
    1.32 +    
    1.33 +If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
    1.34 +you need to set up an udev rule to force this variable.
    1.35 +
    1.36 +A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks 
    1.37 +like:
    1.38 +    
    1.39 +   SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
    1.40 +   SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
    1.41 +   
    1.42 +You can set up similar rules for your device by changing the values listed in
    1.43 +idProduct and idVendor. To obtain these values, try:
    1.44 +    
    1.45 +    sudo udevadm info -a --name=input/eventXX | grep idVendor
    1.46 +    sudo udevadm info -a --name=input/eventXX | grep idProduct
    1.47 +    
    1.48 +If multiple values come up for each of these, the one you want is the first one of each.    
    1.49 +
    1.50 +On other systems which ship with an older udev (such as CentOS), you may need
    1.51 +to set up a rule such as:
    1.52 +    
    1.53 +    SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"
    1.54 +