Too keen to use evdev (/dev/input/event%d) for joysticks, so ignores calibration

Bug #410187 reported by Chris Boyle
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
libsdl1.2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: libsdl1.2debian-alsa

I have a USB joystick which requires calibration (Saitek Cyborg 3D USB, ID 06a3:0006). I can calibrate it with jscal, but all SDL games (such as the Freespace port at http://scp.indiegames.us/ and the Descent port at http://icculus.org/d2x/ ) ignore the calibration. You can see why from the SDL source:

http://www.libsdl.org/cgi/viewvc.cgi/branches/SDL-1.2/src/joystick/linux/SDL_sysjoystick.c?view=markup
(look for "joydev_pattern" and "calibrate" in here)

SDL prefers to use /dev/input/event%d instead of /dev/input/js%d, even knowing there is no way to calibrate an event device. Therefore, if you have a joystick that (1) needs calibration and (2) also appears as an event device, you lose.

Workarounds:

 * Set SDL_JOYSTICK_DEVICE=/dev/input/js0 (a user can put this in /etc/environment and reboot to apply it everywhere).

 * rmmod evdev (quite likely to lose any unusual input devices you have).

 * Compile your own SDL with --disable-input-events

Possible fixes:

 * Compile SDL with --disable-input-events for everyone. This actually only affects the joystick driver, but breaks things for anyone who has a joystick that either only appears as an event device, or benefits from the "extra information about their hats or balls" that the SDL source mentions.

 * Tweak SDL_sysjoystick.c to prefer /dev/input/js0. Breaks things for anyone whose joystick needs the "extra information".

 * Best, in my opinion: extend the "special_joysticks" structure at the top of that file with a list of joystick names for which evdev should never be used, starting with "SAITEK CYBORG 3D USB".

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libsdl1.2 (Ubuntu):
status: New → Confirmed
Revision history for this message
EricDHH (ericdhh) wrote :

Ubuntu 14.04 LTS AMD64

Same bug exist on, now upcoming steam games use evdev and there is no point to calibrate the joystick there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.