README-linux.txt
author Gabriel Jacobo <gabomdq@gmail.com>
Thu, 14 Nov 2013 10:19:07 -0300
changeset 7980 3122e7af0bf5
parent 7973 5d12bfc720e1
child 8784 605c4b0ef03d
permissions -rw-r--r--
Adds joystick/udev troubleshooting information to README-linux.txt
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7972
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     1
================================================================================
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     2
Simple DirectMedia Layer for Linux
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     3
================================================================================
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     4
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     5
By default SDL will only link against glibc, the rest of the features will be
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     6
enabled dynamically at runtime depending on the available features on the target
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     7
system. So, for example if you built SDL with Xinerama support and the target
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     8
system does not have the Xinerama libraries installed, it will be disabled
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     9
at runtime, and you won't get a missing library error, at least with the 
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    10
default configuration parameters.
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    11
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    12
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    13
================================================================================
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    14
Build Dependencies
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    15
================================================================================
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    16
    
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    17
Ubuntu 13.04, all available features enabled:
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    18
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    19
sudo apt-get install build-essential mercurial make cmake autoconf automake \
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    20
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    21
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    22
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    23
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    24
7973
5d12bfc720e1 Added a few notes from Ryan's email to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7972
diff changeset
    25
NOTES:
5d12bfc720e1 Added a few notes from Ryan's email to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7972
diff changeset
    26
- This includes all the audio targets except arts, because Ubuntu pulled the 
5d12bfc720e1 Added a few notes from Ryan's email to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7972
diff changeset
    27
  artsc0-dev package, but in theory SDL still supports it.
5d12bfc720e1 Added a few notes from Ryan's email to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7972
diff changeset
    28
- DirectFB isn't included because the configure script (currently) fails to find
5d12bfc720e1 Added a few notes from Ryan's email to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7972
diff changeset
    29
  it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the 
5d12bfc720e1 Added a few notes from Ryan's email to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7972
diff changeset
    30
  configure script to include DirectFB support. Send patches.  :)
7972
96f2f61be1c6 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    31
7973
5d12bfc720e1 Added a few notes from Ryan's email to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7972
diff changeset
    32
7980
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    33
================================================================================
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    34
Joystick does not work
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    35
================================================================================
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    36
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    37
If you compiled or are using a version of SDL with udev support (and you should!)
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    38
there's a few issues that may cause SDL to fail to detect your joystick. To
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    39
debug this, start by installing the evtest utility. On Ubuntu/Debian:
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    40
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    41
    sudo apt-get install evtest
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    42
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    43
Then run:
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    44
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    45
    sudo evtest
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    46
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    47
You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    48
Now run:
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    49
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    50
    cat /dev/input/event/XX
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    51
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    52
If you get a permission error, you need to set a udev rule to change the mode of
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    53
your device (see below)    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    54
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    55
Also, try:
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    56
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    57
    sudo udevadm info --query=all --name=input/eventXX
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    58
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    59
If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    60
you need to set up an udev rule to force this variable.
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    61
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    62
A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks 
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    63
like:
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    64
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    65
   SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    66
   SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    67
   
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    68
You can set up similar rules for your device by changing the values listed in
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    69
idProduct and idVendor. To obtain these values, try:
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    70
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    71
    sudo udevadm info -a --name=input/eventXX | grep idVendor
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    72
    sudo udevadm info -a --name=input/eventXX | grep idProduct
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    73
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    74
If multiple values come up for each of these, the one you want is the first one of each.    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    75
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    76
On other systems which ship with an older udev (such as CentOS), you may need
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    77
to set up a rule such as:
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    78
    
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    79
    SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"
3122e7af0bf5 Adds joystick/udev troubleshooting information to README-linux.txt
Gabriel Jacobo <gabomdq@gmail.com>
parents: 7973
diff changeset
    80