1xboxdrv (1) User Commands xboxdrv (1)
2
3
4
6 xboxdrv - A Xbox/Xbox360 gamepad driver that works in userspace
7
9 xboxdrv [OPTION]... [--] [COMMAND] [ARGUMENTS]
10
12 xboxdrv is a driver for Xbox and Xbox360 gamepads. It works by reading
13 the raw data from the controller with the userspace library libusb and
14 then passes the interpreted data to the kernel via uinput. This allows
15 xboxdrv to provide regular joystick and event devices, which makes it
16 compatible with all Linux software.
17
18 Aside from the pure driver, xboxdrv also includes a rich set of config‐
19 uration options that allow you to tweak the abilities of the virtual
20 input devices that xboxdrv will create. This includes basic button and
21 axis remapping, as well as more complicated things like mouse and key‐
22 board emulation, auto-fire and throttle control emulation.
23
24 It is also possible for xboxdrv to read input data directly from an
25 event device, this allows the use of the configurability of xboxdrv on
26 regular PC joysticks, keyboards and mice and thus lets xboxdrv serve a
27 similar purpose as joy2key. See the option --evdev below for more in‐
28 formation.
29
30 When a COMMAND is provided xboxdrv will launch that application and be
31 running till that application exits. This is a convenience function to
32 make it easier to use xboxdrv in wrapper scripts. See the section
33 [Writing Start-Up Scripts for Games] for more information.
34
36 GENERAL OPTIONS
37 -h, --help
38 Display help text and exit.
39
40 -V, --version
41 Print the version number and exit.
42
43 -v, --verbose
44 Print verbose messages.
45
46 --debug
47 Print even more verbose messages then --verbose.
48
49 -s, --silent
50 Do not display controller events on the terminal. For regular
51 use this option should always be used as output data to the ter‐
52 minal can eat up quite a bit of CPU.
53
54 --quiet
55 Do not display startup text and suppress most other output.
56
57 --priority PRIORITY
58 Possible values for PRIORITY are "normal" and "realtime". Real‐
59 time scheduling gives the xboxdrv process higher priority and
60 thus allows it to function properly even when the machine is un‐
61 der load.
62
63 Note that realtime priority requires running xboxdrv as root,
64 when running xboxdrv as user there is no way to increase the
65 priority.
66
67 This option is deprecated, use chrt(1) instead to achive the
68 same effect.
69
70 LIST OPTIONS
71 --help-led
72 List possible values for the led.
73
74 --help-devices
75 List supported devices.
76
77 --list-supported-devices
78 List supported devices (used by xboxdrv-daemon.py).
79
80 --list-supported-devices-xpad
81 List supported devices in xpad.c style.
82
83 --help-abs
84 List all allowed EV_ABS symbols.
85
86 --help-rel
87 List all allowed EV_REL symbols.
88
89 --help-key
90 List all allowed EV_KEY symbols.
91
92 --help-x11keysym
93 List all allowed X11 Keysym symbols.
94
95 --help-axis
96 List all allowed XboxAxis symbols.
97
98 --help-button
99 List all allowed XboxButton symbols.
100
101 --help-all
102 List all symbols that can be used in --ui-buttonmap, --ui-ax‐
103 ismap, --buttonmap and --axismap. This option is the same as
104 --help-abs, --help-rel, --help-key, --help-x11keysym, --help-ax‐
105 is and --help-button.
106
107 CONFIG FILE OPTIONS
108 -c, --config FILE
109 Reads configuration information from FILE. Configurations from
110 file are handling as if they would be command line options at
111 the position of --config FILE.
112
113 The syntax of FILE is the familiar INI syntax used for many con‐
114 figuration files. Regular key/value pairs must go into the
115 [xboxdrv] section. '#' and ';' can be used for comments. Key
116 names have for most part the same name as command line options.
117 Command line options that take a list of input mappings (--ui-
118 buttonmap, --ui-axismap, --evdev-absmap, ...) can be split of
119 into their own section for better readability.
120
121 The examples/ directory contains some example configuration
122 files.
123
124 [xboxdrv]
125 silent=true
126 deadzone=6000
127 dpad-as-button=true
128 trigger-as-button=true
129
130 [ui-axismap]
131 x2=REL_X:10
132 y2=REL_Y:-10
133 x1=KEY_A:KEY_D
134 y1=KEY_W:KEY_S
135
136 [ui-buttonmap]
137 a=KEY_LEFTSHIFT
138 b=BTN_C
139 x=BTN_EXTRA
140 y=KEY_C
141
142 [ui-buttonmap]
143 lb=BTN_RIGHT
144 rb=KEY_SPACE
145
146 [ui-buttonmap]
147 lt=KEY_Z
148 rt=BTN_LEFT
149
150 [ui-buttonmap]
151 dl=KEY_4
152 dr=KEY_2
153 du=REL_WHEEL:-1:150
154 dd=REL_WHEEL:1:150
155
156 [ui-buttonmap]
157 back=KEY_TAB
158 start=KEY_ESC
159
160 # EOF #
161
162 --alt-config FILE
163 A shortcut for writing --next-config --config FILE.
164
165 To load multiple configuration options use:
166
167 xboxdrv --config first.ini --alt-config second.ini --alt-config third.ini
168
169 -o, --option NAME=VALUE
170 Set an option as if it would come from a config file from the
171 command line.
172
173 --write-config FILE
174 Write an example configuration file to FILE.
175
176 DAEMON OPTIONS
177 -D, --daemon
178 Run xboxdrv as daemon. If this option is given xboxdrv will lis‐
179 ten to udev for USB connection events and launch driver threads
180 for newly connected controllers.
181
182 Configuration options can still be supplied as usual. Note how‐
183 ever that xboxdrv when run as daemon will not create new uinput
184 devices on demand, instead it will only create devices once at
185 startup for the given configurations and then assign new con‐
186 trollers to these configurations. While this means xboxdrv can't
187 support an unlimited number of controllers, it also means that
188 xboxdrv can allow hot plugging even for applications that don't
189 support it themselves, as applications will only see the perma‐
190 nent device files, not the controller that xboxdrv will change
191 around under the hood.
192
193 An example configuration that supports three controller would
194 look like this:
195
196 xboxdrv --daemon \
197 # config options for the first controller
198 --next-controller \
199 # config options for the second controller
200 --next-controller
201 # config options for the third controller
202
203 The --match option can be used to limit the controller slots to
204 only those controllers that match the given RULE and thus be
205 used to assign configurations only to specific controllers.
206
207 --detach
208 Detaches xboxdrv from the current shell, only valid if --daemon
209 is given.
210
211 --pid-file FILE
212 Write the xboxdrv daemon process id to FILE.
213
214 --dbus BUS
215 Set which bus type xboxdrv should connect to. Allowed values for
216 BUS are session, system, disabled and auto. The default is auto,
217 which will detect the appropriate bus type depending on if xbox‐
218 drv is run as root (system or as user (session). Running with
219 disabled will disable D-Bus support completely.
220
221 --on-connect EXE
222 Launches EXE when a controller gets connected. As arguments
223 "BUSDEV:DEVNUM", "idVendor:idProduct", "NAME are provided.
224
225 --on-disconnect EXE
226 Launches EXE when a controller gets disconnected. As arguments
227 "BUSDEV:DEVNUM", "idVendor:idProduct", "NAME are provided.
228
229 DEVICE OPTIONS
230 -L, --list-controller
231 List available controllers on the system.
232
233 -i, --id N
234 Use controller with id N (default: 0), use --list-controller to
235 obtain a list of available controller.
236
237 -w, --wid N
238 Use wireless controller with wid N (default: 0).
239
240 --device-by-path BUS:DEV
241 Use the controller at BUS:DEV, do not do any automatic scanning.
242 Useful for cases when a controller isn't known by xboxdrv, but
243 supports one of the given protocols.
244
245 --device-by-id VENDOR:PRODUCT
246 Use device that matches VENDOR:PRODUCT (as returned by lsusb).
247 Useful for cases when a controller isn't known by xboxdrv, but
248 supports one of the given protocols.
249
250 --type TYPE
251 Ignore autodetection and enforce the controller type. Possible
252 values for TYPE:
253
254 · xbox
255
256 · xbox-mat
257
258 · xbox360
259
260 · xbox360-wireless
261
262 · xbox360-guitar
263
264 · firestorm
265
266 · firestorm-vsb
267
268 · saitek-p2500
269
270 · generic-usb
271
272 The generic-usb type is a special type that will work with any USB con‐
273 troller, it will however not interpret the input it gets, but just dump
274 it to the console for development purposes. See --generic-usb-spec for
275 further information.
276
277 -d, --detach-kernel-driver
278 Detaches the kernel driver that is currently associated with the
279 given device. This is useful when you have the xpad module load‐
280 ed and want to use xboxdrv without unloading it.
281
282 --generic-usb-spec NAME=VALUE,...
283 Allows to specify from which endpoint generic-usb will read. The
284 spec as the form of NAME=VALUE,.... Allowed values are:
285
286 vid=HEX
287 The vendor id of the controller to which this spec ap‐
288 plies
289
290 pid=HEX
291 The product id of the controller to which this spec ap‐
292 plies
293
294 if=NUM The interface from which GenericUSBController should be
295 read
296
297 ep=NUM The endpoint from which GenericUSBController should be
298 read
299
300 EVDEV OPTION
301 --evdev DEVICE
302 Allows you to read input data from a regular event device. This
303 allows you to use xboxdrv on regular PC joysticks. The data that
304 is read from the event device is converted internally into a
305 XboxMsg object and then passed through the same configuration
306 pipeline as it would be for a regular Xbox360 controller. This
307 allows you to make use of all the regular configurability, but
308 limits you to the number of axis and buttons that an Xbox360
309 controller provides.
310
311 As a regular PC joystick will most likely already create a
312 /dev/input/jsX device by itself, you might need to get rid of
313 that so that a game will properly detect the joystick device
314 created by xboxdrv. The easiest way to accomplish that is to
315 simply delete the old joystick and rename the device that xbox‐
316 drv created to /dev/input/js0. When you use udev, this operation
317 should be harmless and automatically reverse itself when you re‐
318 move the controller and plug it back in or when you reboot the
319 computer.
320
321 --evdev-debug
322 The evdev event handler will print all received events to std‐
323 out, this makes it easy to see which events a given controller
324 sends.
325
326 --evdev-no-grab
327 By default the evdev driver will grab the device, thus making it
328 impossible for other applications to receive events from that
329 device. This is done to avoid confusing applications, as other‐
330 wise an app would receive every event twice, once from the orig‐
331 inal device and once from the virtual xboxdrv one. In some cases
332 this behaviour is undesired, such when mapping only an otherwise
333 unhandled subset of keys of an device, i.e. mapping the multime‐
334 dia keys on a keyboard, so this option turns the grab off.
335
336 --evdev-absmap ABSMAP,...
337 ABSMAP = EVDEV_ABS [ "+", "-" ] "=" XBOXAXIS ;
338
339 Sets how evdev events are mapped to Xbox axis events. An example
340 configuration would look like this:
341
342 --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_THROTTLE=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y
343
344 xboxdrv will output on startup a full list of event names that
345 the given event device supports and that can be used in place of
346 EVDEV_ABS.
347
348 It is also possible to map half-axis with a command like:
349
350 --evdev-absmap ABS_Y+=LT,ABS_Y-=RT
351
352 This will map the upward movement of the Y axis to the left
353 trigger and the downward movement to the right trigger.
354
355 --evdev-keymap KEYMAP
356 Sets how evdev events are mapped to Xbox controller events. An
357 example configuration would look like this:
358
359 --evdev-keymap BTN_TRIGGER=a,BTN_THUMB=b,BTN_THUMB2=x
360
361 xboxdrv will output on start a full list of event names that the
362 given event device supports.
363
364 STATUS OPTIONS
365 -l, --led NUM
366 Set LED status. Possible values for NUM are:
367
368 LED Status Codes
369
370 Num Behavior
371 0 off
372 1 all blinking
373 2 1/top-left blink, then on
374 3 2/top-right blink, then on
375 4 3/bottom-left blink, then
376 on
377 5 4/bottom-right blink, then
378 on
379 6 1/top-left on
380 7 2/top-right on
381 8 3/bottom-left on
382 9 4/bottom-right on
383 10 rotate
384 11 blink
385 12 blink slower
386 13 rotate with two lights
387 14 blink
388 15 blink once
389
390 --rumble-gain AMOUNT
391 You can change the rumble strength via:
392
393 $ xboxdrv --rumble-gain 50%
394
395 Values larger then 100% are possible as well and will amplify
396 small rumble commands, rumble commands already at the maximum
397 will stay unchanged.
398
399 -q, --quit
400 Exit xboxdrv after setting LED or rumble values.
401
402 CHATPAD OPTIONS (EXPERIMENTAL)
403 Chatpad support is still experimental. Basic keyboard usage will work,
404 there is however currently no support for customization or the green
405 and orange key modifiers.
406
407 Starting xboxdrv multiple times in a row with the --chatpad option can
408 crash the controller. Unplugging it and plugging it back in should re‐
409 set it.
410
411 --chatpad
412 Enables the support for the Xbox360 Chatpad. WARNING: This is
413 preliminary code, it will crash your gamepad when xboxdrv is
414 started multiple times and won't provide proper keymapping for
415 any of the umlauts and special characters.
416
417 --chatpad-no-init
418 This will start chatpad support with out sending the init se‐
419 quence, thus potentially avoiding crashing the controller if
420 xboxdrv is started multiple times.
421
422 --chatpad-debug
423 Output raw chatpad data to the stdout for debugging purpose.
424
425 HEADSET OPTIONS (EXPERIMENTAL, XBOX360 USB ONLY)
426 Xboxdrv does not support the headset, the options below are for devel‐
427 opers only and will dump raw headset data, not .wav files.
428
429 --headset
430 Enable headset support and dump incoming data to stdout.
431
432 --headset-dump FILE
433 Enable headset support and dump incoming data to FILE.
434
435 --headset-play FILE
436 Enable headset support and send FILE to the headset for play‐
437 back.
438
439 FORCE FEEDBACK
440 --force-feedback
441 Enables the standard kernel force feedback interface. It is dis‐
442 abled by default as it causes trouble with some applications
443 running in Wine.
444
445 Since the Xbox360 controller supports just rumble not full force
446 feedback, xboxdrv tries to emulate other effects. This emulation
447 hasn't been tested much and might not always work as expected.
448 Bug reports and test cases are welcome.
449
450 Note that you must close the application that is using force
451 feedback always before you close the xboxdrv driver, else you
452 might end up with a hanging non-interruptable xboxdrv process
453 that will require a reboot to get rid of.
454
455 When using xboxdrv in daemon mode with multiple controller slots
456 you have to enable force feedback for each slot separately.
457
458 --ff-device DEVICEID
459 Select to which virtual device the force-feedback callbacks will
460 be connected to, it defaults to joystick. Other allowed values
461 are mouse, keyboard and any integer number. See --ui-buttonmap
462 for further information on how device-ids work.
463
464 -R, --test-rumble
465 Pressing LT will move the left rumble motor and pressing RT will
466 move the right one. Rumble motor strength depends on how hard
467 you press. This is useful for testing the rumble motors.
468
469 -r, --rumble L,R
470 Set the speed for both rumble motors. Values from 0 to 255 are
471 accepted, the default is 0,0.
472
473 CONTROLLER SLOT OPTIONS
474 Controller slots are used when running xboxdrv in daemon mode. Each
475 slot represents a complete controller configuration. If you want to use
476 multiple controller in daemon mode you have to supply multiple con‐
477 troller slots.
478
479 --controller-slot N
480 Switches to the controller slot with the number N, numbering
481 starts at zero.
482
483 --next-controller
484 Switches to the next controller slot.
485
486 --match RULE,...
487 Limits a controller slot to devices that match any one of the
488 given rules. Possible match rules are:
489
490 usbid=VENDOR:PRODUCT
491 Match controllers that have the given USB vendor and
492 product ids.
493
494 vendor=VENDOR
495 Match controllers that have the given USB idVendor.
496
497 product=PRODUCT
498 Match controllers that have the given USB idProduct.
499
500 property=PROPERTY:VALUE
501 Match against an arbitrary udev property, with name PROP‐
502 ERTY and value VALUE.
503
504 usbpath=BUS:DEV
505 Match against the USB path given by BUS and DEV.
506
507 usbserial=SERIAL
508 Match against the USB iSerial number.
509
510 --match-group RULE,...
511 Limits a controller slot to devices that match all of the given
512 rules. Possible match rules are the same as for --match.
513
514 CONFIG SLOT OPTIONS
515 You can use multiple configurations, called config slots, with your
516 controller. You switch between those multiple configurations by press‐
517 ing the Guide button by default, but you can also set another button
518 via the option --toggle.
519
520 --config-slot NUM
521 Select the config slot NUM.
522
523 --next-config
524 Allows the creation of an alternative uinput configuration to
525 which one can toggle at runtime by pressing the ui-toggle button
526 (defaults to guide).
527
528 $ xboxdrv \
529 --mouse \
530 --next-config
531 --ui-axismap X1=ABS_X,Y1=ABS_Y \
532 --ui-buttonmap A=JS_0,B=JS_1
533
534 The above configuration would install mouse emulation as first
535 configuration and a simple joystick emulation as second configu‐
536 ration. Allowing toggling between mouse emulation and joystick
537 handling by pressing the guide button.
538
539 Not that --next-config is currently limited to only configura‐
540 tions done with --ui-buttonmap and --ui-axismap, autofire,
541 throttle emulation, deadzones and all other things can currently
542 not be switched at runtime.
543
544 --toggle XBOXBTN
545 Sets the button that will be used to toggle between different
546 different configurations. A value of 'void' will disable the
547 toggle button. If no toggle button is specified, the guide but‐
548 ton will be used to toggle between configurations.
549
550 CONFIGURATION OPTIONS
551 --modifier MOD
552 Add a modifier to the modifier stack, see [Modifier] for a full
553 list of possible modifier.
554
555 --timeout MSEC
556 Specify the number of miliseconds that xboxdrv will wait for
557 events from the controller before moving on and processing
558 things like auto-fire or relative-axis. Default value is 10,
559 smaller values will give you a higher resolution auto fire and
560 relative event movement, but will waste some more CPU.
561
562 -b, --buttonmap BUTTON=BUTTON,...
563 Button remapping is available via the --buttonmap option. If you
564 want to swap button A and B start with:
565
566 $ xboxdrv --buttonmap A=B,B=A
567
568 If you want all face buttons send out A button events:
569
570 $ xboxdrv --buttonmap B=A,X=A,Y=A
571
572 Possible button names are (aliases are in parenthesis):
573
574 Button Names
575
576 ┌───────────────────────────┬────────────────────────────┐
577 │Name │ Description │
578 ├───────────────────────────┼────────────────────────────┤
579 │start, back │ start, back buttons │
580 ├───────────────────────────┼────────────────────────────┤
581 │guide │ big X-button in the middle │
582 │ │ (Xbox360 only) │
583 ├───────────────────────────┼────────────────────────────┤
584 │a(1), b(2), x(3), y(4) │ face buttons │
585 ├───────────────────────────┼────────────────────────────┤
586 │black, white │ black, white buttons │
587 │ │ (Xbox1 only, mapped to lb, │
588 │ │ rb on Xbox360) │
589 ├───────────────────────────┼────────────────────────────┤
590 │lb(5), rb(6) │ shoulder buttons (Xbox360 │
591 │ │ only, mapped to black, │
592 │ │ white on Xbox1) │
593 ├───────────────────────────┼────────────────────────────┤
594 │lt(7), rt(8) │ analog trigger (needs │
595 │ │ --trigger-as-button op‐ │
596 │ │ tion) │
597 ├───────────────────────────┼────────────────────────────┤
598 │tl, tr │ pressing the left or right │
599 │ │ analog stick │
600 ├───────────────────────────┼────────────────────────────┤
601 │du(up), dd(down), │ dpad directions (needs │
602 │dl(left), dr(right) │ --dpad-as-button option) │
603 ├───────────────────────────┼────────────────────────────┤
604 │green, red, yellow, blue, │ guitar buttons │
605 │orange │ │
606 └───────────────────────────┴────────────────────────────┘
607 Just like with --ui-buttonmap you can add button filter to each
608 button.
609
610 --axismap AXIS=MAPPING,...
611 Axis remapping is available via --axismap and works the same as
612 button mapping. In addition you can supply a sign to indicate
613 that an axis should be inverted. So if you want to invert the y1
614 axis start with:
615
616 $ xboxdrv --axismap -Y1=Y1
617
618 If you want to swap the left and right stick start with:
619
620 $ xboxdrv --axismap X2=X1,Y2=Y1,X1=X2,Y1=Y2
621
622 Possible axis names are: x1, y1, x2, y2, lt, rt
623
624 Swaping lt or rt with x1, y1, x2, y2 will not work properly,
625 since their range is different.
626
627 Just like with --ui-axismap you can add axis filter to each ax‐
628 is.
629
630 MODIFIER PRESET CONFIGURATION OPTIONS
631 The options in this sections are sortcuts for --modifier options. Un‐
632 like --modifier they are not order depended, but have a predefined or‐
633 der that is used no matter the order in which the options are given.
634
635 --autofire BUTTON=FREQUENCY,...
636 Autofire mapping allows you to let a button automatically fire
637 with a given frequency in miliseconds:
638
639 $ xboxdrv --autofire A=250
640
641 Combining --autofire with button map allows you to have one but‐
642 ton act as autofire while another one, emitting the same signal,
643 acts normally.
644
645 $ xboxdrv --autofire B=250 --buttonmap B=A
646
647 --axis-sensitivty AXIS=SENSITIVITY,...
648 The sensitive of an axis can be adjusted via --axis-sensitivty:
649
650 $ xboxdrv --axis-sensitivty X1=-1.0,Y1=-1.0
651
652 A value of 0 gives you the default linear sensitivity, values
653 larger then 0 will give you higher sensitivity, while values
654 smaller then 0 will give you lower sensitivity. Sensitivity val‐
655 ues in the range of [-1, 1] will generally give good results,
656 everything beyond that won't be of much practical use.
657
658 Sensitivity works by applying:
659
660 t = 2 ** sensitivity;
661 pos = (1.0f - (1.0f - pos) ** t) ** (1 / t);
662
663 To the value of the axis, this means that both the minimum value
664 and the maximum value of the axis will always stay the same,
665 just the response inbetween changes.
666
667 For a complete freeform way to change the axis response see the
668 Response Curve Filter.
669
670 --calibration CALIBRATIONSPEC
671 If your gamepad for some reason can't reach the maximum value or
672 isn't centered properly you can fix that via the calibration op‐
673 tions:
674
675 $ xboxdrv --calibration X2=-32768:0:32767
676
677 X2 is the axis name and the three values that follow are min,
678 center and max. Simply insert the values that jstest reports
679 when your axis is in the respective positions.
680
681 You can also use the calibration option if you want to make your
682 joystick more sensitive. A setting of:
683
684 xboxdrv --calibration AXIS=MIN:CENTER:MAX,...
685
686 Will cause the joystick device report maximum position when your
687 stick is only moved half the way.
688
689 --deadzone NUM
690 The deadzone is the area at which the sticks do not report any
691 events. The default is zero, which gives the best sensitifity
692 but might also cause trouble in some games in that the character
693 or camera might move without moving the stick. To fix this one
694 has to set the value to something higher:
695
696 $ xboxdrv --deadzone 4000
697
698 A value of 4000 works quite well for most games.
699
700 You can also give the deadzone in percentage:
701
702 $ xboxdrv --deadzone 15%
703
704 --deadzone-trigger NUM
705 The left and right trigger have a separate deadzone value which
706 can be specified with:
707
708 $ xboxdrv --deadzone-trigger 15%
709
710 --dpad-rotation DEGREE
711 Allows you to rotate the dpad. DEGREE must be a multiple of 45.
712 This can be useful in isometric games where the playfield itself
713 is rotated, thus a:
714
715 xboxdrv --dpad-rotation 45
716
717 Will give you controls that are relative to your character in‐
718 stead of your viewpoint.
719
720 --four-way-restrictor
721 The --four-way-restrictor option allows to limit the movement on
722 both analogsticks to only four directions (up, down, left,
723 right), the diagonals (up/left, up/right, down/left, down/right)
724 are filtered out from the output. This option is useful for
725 games such as Tetris, that don't need diagonals and where you
726 don't want to accidently trigger the down-move while trying to
727 do a left/right move.
728
729 --relative-axis AXIS=NUM,...
730 The function --relative-axis allows you to change the behaviour
731 of an axis so that your movement of it moves its value up or
732 down instead of applying it directly. This allows you to simu‐
733 late throttle control for flightsim games.
734
735 Since the axis might be upside down, you might want to use the
736 --axismap function to reverse it.
737
738 $ xboxdrv --relative-axis y2=64000 --axismap -y2=y2
739
740 --square-axis
741 The Xbox360 gamepad, as most other current day gamepads, fea‐
742 tures a circular movement range, which restricts the movement so
743 that the distance to the center never gets beyond 1. This means
744 that when you have the controller at the top/left the value re‐
745 ported is (0.7, 0.7) (i.e. length 1, angle 45) instead of (1,1).
746 This behaviour is different then most classic PC joysticks,
747 which had a square range and would report (1,1) when hold in the
748 top/left corner.
749
750 Some old games (i.e. mostly DOS stuff) require a square movement
751 range and will not function properly with the Xbox360 gamepad.
752 Via the --square-axis option you can work around this issue and
753 diagonals will be reported as (1,1).
754
755 UINPUT PRESET CONFIGURATION OPTIONS
756 The following options are simple shortcuts for common configurations
757 that can be accomplished manually by using --ui-buttonmap and --ui-ax‐
758 ismap.
759
760 --trigger-as-button
761 LT and RT send button instead of axis events
762
763 --trigger-as-zaxis
764 Combine LT and RT to form a zaxis instead
765
766 --dpad-as-button
767 The DPad sends button instead of axis events.
768
769 --dpad-only
770 Both sticks are ignored, only the DPad sends out axis events.
771 Useful for games that might get confused by additional analog
772 axis. Combining this option with --trigger-as-button is recom‐
773 mend in most situations.
774
775 --guitar
776 Sets a predefined button and axis mapping for use with guitar
777 controllers. This mainly gets rid of a few unnecessary buttons
778 and axis not used by a guitar controller.
779
780 -m, --mouse
781 Lets the controller act as a mouse. It is indendical to:
782
783 $ xboxdrv \
784 --dpad-as-button
785 --deadzone 4000
786 --trigger-as-zaxis
787 --axismap "-y2=y2,-trigger=trigger"
788 --ui-axismap "x1=REL_X:15:20,y1=REL_Y:15:20,y2=REL_WHEEL:5:100,x2=REL_HWHEEL:5:100,trigger=REL_WHEEL:5:100"
789 --ui-buttonmap "a=BTN_LEFT,b=BTN_RIGHT,x=BTN_MIDDLE,y=KEY_ENTER,rb=KEY_PAGEDOWN,lb=KEY_PAGEUP,"
790 --ui-buttonmap "dl=KEY_LEFT,dr=KEY_RIGHT,du=KEY_UP,dd=KEY_DOWN,"
791 --ui-buttonmap "start=KEY_FORWARD,back=KEY_BACK,guide=KEY_ESC,tl=void,tr=void"
792
793 You can customize it by the usual means, just make sure that
794 --mouse comes before your customization options on the command
795 line.
796
797 Note that if you have your mouse buttons switched you must ad‐
798 just the above to match your mouse configuration or the button
799 events will come out wrong.
800
801 --mimic-xpad
802 Causes xboxdrv to use the same axis and button names as the xpad
803 kernel driver for wired Xbox360 controller
804
805 --mimic-xpad-wireless
806 Causes xboxdrv to use the same axis and button names as the xpad
807 kernel driver for wired Xbox360 controller
808
809 UINPUT CONFIGURATION OPTIONS
810 --no-uinput
811 Do not to start UInput, instead simply read events from the con‐
812 troller, useful for debugging.
813
814 --no-extra-devices
815 By default xboxdrv will allocate multiple uinput devices and
816 sort events to each of them. Thus mouse related events like
817 BTN_LEFT or REL_X will go to a virtual mouse device, while ABS_X
818 events would go to a virtual joystick device and KEY_ESC would
819 go to a virtual keyboard device.
820
821 This option disables that automatism and all events will go to
822 the same virtual device.
823
824 Manual assignment to a specific device (i.e. KEY_ESC@keyboard,
825 BTN_A@joystick, ...) is still possible.
826
827 --no-extra-events
828 By default xboxdrv will allocate multiple uinput devices and
829 sort events to each of them. Thus mouse related events like
830 BTN_LEFT or REL_X will go to a virtual mouse device, while ABS_X
831 events would go to a virtual joystick device and KEY_ESC would
832 go to a virtual keyboard device.
833
834 To make sure sure that a mouse, keyboard or joystick device is
835 properly detected by Xorg, the kernel or libraries such SDL
836 xboxdrv will insert extra dummy events. For example a mouse de‐
837 vice needs REL_X and REL_Y events to be detected as such, but a
838 configuration that only wants to emulate the mouse buttons won't
839 provide those, thus xboxdrv will add them automatically. The
840 --no-extra-events option will switch this behaviour off.
841
842 --device-name NAME
843 Changes the descriptive name the device will have. This options
844 acts the same as --device-names CURRENTSLOT.auto=NAME
845
846 --device-names TYPE.SLOT=NAME,...
847 Changes the descriptive name the device will have. TYPE is one
848 of mouse, keyboard, joystick, auto or a number. SLOT is a slot
849 number or auto. The auto name acts as wild card and matches ev‐
850 erything.
851
852 --device-usbid VENDOR:PRODUCT:VERSION:BUS
853 Changes the vendor, product, version and bus id that the device
854 will have. The last two arguments are optional. This options
855 acts the same as --device-usbids CURRENTSLOT.auto=VENDOR:PROD‐
856 UCT:VERSION:BUS
857
858 --device-usbids TYPE.SLOT=VENDOR:PRODUCT:VERSION:BUS,...
859 Changes the vendor, product, version and bus id the device will
860 have. TYPE is one of mouse, keyboard, joystick, auto or a num‐
861 ber. SLOT is a slot number or auto. The auto name acts as wild
862 card and matches everything.
863
864 --ui-clear
865 Removes all uinput mappings and will leave the driver in a blank
866 state and only map those things you added yourself. If you only
867 want to get rid of individual buttons you can use the 'void'
868 event.
869
870 --ui-buttonmap UIBUTTONSPEC,...
871 UIBUTTONSPEC = XBOXBUTTON [ "+" XBOXBUTTON ] [ "^" FILTER ] ... "=" ( RELSPEC | BTNSPEC | EXECSPEC ) ;
872 RELSPEC = [ DEVICEID "-" ] "REL_" [ ":" [ VALUE ] [ ":" REPEAT ] ] ;
873 BTNSPEC = [ DEVICEID "-" ] ( ( "BTN_" NAME ) | ( "KEY_" NAME ) ) { "+" BTNSPEC } ;
874 EXECSPEC = PROGRAM { ":" ARGUMENT } ;
875 XBOXBUTTON = "a" | "b" | "x" | "y" | "lb" | "rb" | "lt" | "rt" |
876 "tl" | "tr" | "start" | "select" | "back" | "guide" | "black" | "white" ;
877 FILTER = "toggle" | "invert" | "autofire" [ ":" RATE ] [ ":" DELAY ] | log [ ":" STRING ] ;
878 NAME = STRING ;
879 VALUE = NUMBER ;
880 REPEAT = NUMBER ;
881 DEVICEID = NUMBER ;
882
883 Allows you to change the event code that is send to the kernel
884 for buttons. The usage is similar to the normal button mapping,
885 except that the right hand side is an event name from /usr/in‐
886 clude/linux/input.h. You can use all KEY_ or BTN_ codes for
887 --ui-buttonmap.
888
889 If the right hand side is left empty all the supplied filters
890 will be added to the already existing button binding instead of
891 a new one.
892
893 Aside from the named keys, you can also give the input code di‐
894 rectly as number via the syntax KEY_#NUM.
895
896 Instead of the low level KEY_ names, which represent keycodes,
897 you can also use the higher level X11 keysyms XK_, the keysyms
898 have the advantage that they map directly to the key you expect,
899 while a KEY_ name gets mangled by the X11 keymap and will often
900 not report what you expect in case you use a keymap that is dif‐
901 ferent then your keyboard (i.e. dvorak on a qwerty keyboard).
902
903 A full list of valid X11 keysyms can be optained with
904 --help-x11keysym.
905
906 For joystick buttons there is in addition to the BTN_JOYSTICK,
907 BTN_X, etc. macros the special name JS_$NUM, which sets the giv‐
908 en button to the $NUMS joystick button, i.e.:
909
910 $ xboxdrv --ui-clear --ui-buttonmap A=JS_0,B=JS_1
911
912 Note that this will only work if no other joystick button ids
913 are in the way.
914
915 You can also map a button to a REL_ event. In that case you can
916 supply additional paramaters in the form of:
917
918 $ xboxdrv --ui-buttonmap X=REL_???:VALUE:REPEAT
919
920 VALUE gives the value of the event (default: 10)
921
922 REPEAT gives the number of milisecond to pass before the event
923 is fired again (default: 5)
924
925 The special 'void' event allows you to clear any existing bind‐
926 ings for a given button, which can be useful in cases when a
927 game only supports a limited number of buttons.
928
929 You can also prepend a device_id to the UIBUTTONSPEC which al‐
930 lows you to create multiple uinput devices. By default 'auto' is
931 assumed as device_id which automatically try to do the right
932 thing, sending keyboard events to a keyboard device and mouse
933 events to a mouse device. Other possible values are 'mouse' and
934 'keyboard'. A device_id of '0' refers to the first joystick de‐
935 vice, values larger then 0 to the second, third, etc.
936
937 Note that the 'mouse' and 'keyboard' device_id names do not give
938 you a mouse or keyboard device, these are just symbolic names
939 for the devices into which xboxdrv will sort events that look
940 like a mouse or keyboard event. The final determination of which
941 device gets handled as what will be done by the Kernel or Xorg
942 depending on what events a device provides.
943
944 An example configuration making use of device_id would look like
945 this:
946
947 xboxdrv -s \
948 --ui-clear \
949 --ui-buttonmap A=JS_0@0,B=JS_1@0 --ui-axismap X2=ABS_X@0,Y2=ABS_Y@0
950 --ui-buttonmap X=JS_0@0,Y=1-JS_1@0 --ui-axismap X2=ABS_X@1,Y2=ABS_Y@1
951
952 In this example the left stick creates a joystick device and the
953 right stick creates a separate joystick device.
954
955 When using multiple controller slots you can additionally append
956 the slot id and thus assign events across controller slot bound‐
957 aries. The syntax for that is:
958
959 BTN_A@{deviceid}.{slotid}
960
961 Instead of giving just a single button, it is also possible to
962 give two buttons to --ui-buttonmap to allow shifting:
963
964 xboxdrv -s \
965 --ui-clear \
966 --ui-buttonmap A=JS_0,B=JS_1,LB+A=JS_2,LB+B=JS_3
967
968 In this example LB acts as shift button, if A is pressed without
969 LB it will send out a JS_0 event, but if LB is pressed it will
970 send a JS_2 event instead. This allows you to multiply the num‐
971 ber of available buttons on the controller.
972
973 See the section KEYBOARD EMULATION below on how to resolve is‐
974 sues with Xorg not detecting the virtual keyboard that xboxdrv
975 creates.
976
977 You can also apply filters to button events:
978
979 xboxdrv -s \
980 --ui-buttonmap A^toggle=JS_0
981
982 For documentation on the filters you can apply to events see
983 [Button Filter].
984
985 --ui-axismap UIAXISSPEC,...
986 UIAXISSPEC = [ XBOXBTN "+" ] XBOXAXIS { "^" FILTER } "=" ( RELSPEC | RELREP | KEYSPEC | ABSSPEC ) ;
987 KEYSPEC = [ "key:" ] "KEY_" NAME ":" "KEY_" NAME ":" THRESHOLD ;
988 RELSPEC = [ "rel:" ] "REL_" NAME ":" VALUE ":" REPEAT ;
989 RELREP = "rel-repeat:" "REL_" NAME ":" VALUE ":" REPEAT ;
990 ABSSPEC = [ "abs:" ] "ABS_" NAME ;
991 FILTER = ( "calibration" | "cal" ) ":" MIN ":" CENTER ":" MAX |
992 ( "sensitifity" | "sen" ) ":" SENSITIFITY |
993 ( "deadzone" | "dead" ) ":" MIN ":" MAX ":" SMOOTH |
994 ( "relative" | "rel" ) ":" SPEED |
995 ( "responsecurve" | "response" | "resp" ) { ":" VALUE }
996 XBOXBTN = "a" | "b" | "x" | "y" | "start" | "back" | "guide" | "lb" | "rb" | ...
997 XBOXAXIS = "x1" | "y1" | "x2" | "y2" | "z" | "lt" | "rt" | "dpad_x" | "dpad_y" ;
998 VALUE = NUMBER ;
999 REPEAT = NUMBER ;
1000 THRESHOLD = NUMBER ;
1001 NAME = STRING ;
1002
1003 Similar to --ui-buttonmap this option allows you to change the
1004 event code that is send to the kernel for axes. The events that
1005 are available are the same as for --ui-buttonmap.
1006
1007 $ xboxdrv --ui-axismap X1=REL_???:VALUE:REPEAT
1008
1009 VALUE gives the maximum value of the event, the actual value
1010 that gets send is VALUE * axis_state. (default: 10)
1011
1012 REPEAT gives the number of milisecond to pass before the event
1013 is fired again (default: 5).
1014
1015 The value of -1 has a special meaning, it will result in the REL
1016 event being fired as soon as possible (i.e. every timeout
1017 miliseconds). This is the recomment way for handling mouse emu‐
1018 lation, as it will keep REL events syncronized and thus avoid
1019 jaggies in the movement, that will result from manually specify‐
1020 ing a timeout.
1021
1022 $ xboxdrv --ui-axismap X1=KEY_UP:KEY_DOWN:THRESHOLD
1023
1024 KEY_UP gives the keycode to be send when the axis is moved up
1025
1026 KEY_DOWN gives the keycode to be send when the axis is moved
1027 down
1028
1029 THRESHOLD gives the threshold that triggers the sending of an
1030 event
1031
1032 Just like --ui-buttonmap, you can also use shift keys in place
1033 of the XBOXAXIS:
1034
1035 $ xboxdrv --ui-axismap X1=ABS_X,LB+X1=ABS_RX
1036
1037 This allows you to send ABS_X events normally and ABS_RX events
1038 when the LB button is held down.
1039
1040 For information on how to use axis filters, see [Axis Filter].
1041
1043 Input event handler decide what comes out of the virtual input devices
1044 that xboxdrv creates. They for example decide that when button A is
1045 pressed on a gamepad, that a virtual keyboard will emit a press of the
1046 space key.
1047
1048 Furthermore input event handler can also perform some basic transforma‐
1049 tion of the input signals, thus a joystick can be used to send WASD
1050 keys.
1051
1052 BUTTON EVENT HANDLER
1053 A button event handler decides what happens when a button is pressed,
1054 it needs to be specified with the --ui-buttonmap option. The example
1055 below shows the simplest use case:
1056
1057 $ xboxdrv --ui-buttonmap A=key:KEY_A
1058
1059 Here key is the name of the button event handler, while KEY_A is an ar‐
1060 gument for the event handler. What kind of arguments an event handler
1061 allows depends on the event handler.
1062
1063 There is also a shorthand form of specifing event handlers by just
1064 writing:
1065
1066 $ xboxdrv --ui-buttonmap A=KEY_A
1067
1068 Here no handler is specified explicitly, if that is the case, the ap‐
1069 propriate handler will be guessed based on the event type. EV_KEY
1070 events will be handled by the key handler, EV_REL by the rel handler
1071 and EV_ABS by the abs handler.
1072
1073 key:KEY_EVENT, key:KEY_EVENT:KEY_EVENT:HOLD_THRESHOLD_MSEC
1074 The key handler is the most basic one, it maps a button directly
1075 to a virtual key or another button.
1076
1077 If additional arguments are supplied the button will be able to
1078 send out two different events. The first event specified will be
1079 send when the button is clicked normally, while the second event
1080 will be send in case the button is hold down for the time speci‐
1081 fied in HOLD_THRESHOLD_MSEC.
1082
1083 An example for the hold button would look like:
1084
1085 xboxdrv \
1086 --ui-buttonmap A=JS_0:JS_1:500
1087
1088 This will send JS_0 events when the button is pressed and switch
1089 to JS_1 events when the button was hold for 500 miliseconds.
1090
1091 The hold button feature is useful to effectly double the number
1092 of available buttons, thus the dpad can for example be used to
1093 send out eight different button events instead of just four,
1094 which is enough to handle weapons in most FPS games.
1095
1096 abs not yet implemented
1097
1098 rel:REL_EVENT:VALUE:REPEAT
1099 The rel handler will send out a REL event whenever the button is
1100 pressed. VALUE gives the value of the event that will be send,
1101 while REPEAT gives the number of miliseconds till the event will
1102 be send again.
1103
1104 A typical use for REL events is emulation of the scroll wheel of
1105 a mouse, an example configuration would be:
1106
1107 xboxdrv \
1108 --ui-buttonmap Y=rel:REL_WHEEL:1:500,A=rel:REL_WHEEL:-1:500
1109
1110 Here Y will scroll up and A will scroll down.
1111
1112 cycle-key:KEY_EVENT:...
1113 The cycle-key handler will switch the KEY_EVENT that gets send
1114 with each button press. This is useful in situations where a
1115 range of buttons should be mapped to a single key. For example a
1116 FPS might have weapons mapped from 1 to 6, but only a single key
1117 on the gamepad is free, thus one could write:
1118
1119 xboxdrv \
1120 --ui-buttonmap A=cycle-key:KEY_1:KEY_2:KEY_3:KEY_4:KEY_5:KEY_6
1121
1122 cycle-key-named:NAME:KEY_EVENT:...
1123 The cycle-key-named handler works exactly like the cycle-key
1124 handler, except that a name has to be supplied for the cycle se‐
1125 quence. The name of the sequence is used by cycle-key-ref to ac‐
1126 cess the sequence and reuse it for another button.
1127
1128 In this simple example A is used to toggle through all weapon
1129 keys forward, while B is used to toggle the keys backwards:
1130
1131 xboxdrv \
1132 --ui-buttonmap A=cycle-key-named:weapons:KEY_1:KEY_2:KEY_3:KEY_4,B=cycle-key-ref:weapons
1133
1134 cycle-key-ref:NAME:DIRECTION, sequence-key-ref:NAME:DIRECTION
1135 The cycle-key-ref handler will access and reuse the named cycle
1136 keysequence given by NAME. If DIRECTION can either be 'forward'
1137 or 'backward', if no direction is supplied it will default to
1138 'backward'.
1139
1140 See cycle-key-named for a full example.
1141
1142 sequence-key-named:NAME:KEY_EVENT:...
1143 The sequence-key-named works exactly the same as the cy‐
1144 cle-key-named, with the only difference being that the se‐
1145 quence-key-named will not wrap around when reaching the begin‐
1146 ning or end of the sequence.
1147
1148 This behaviour is useful in flight simulations or other games
1149 where thrusters might be controllered by numeric keys and it
1150 wouldn't make much sense to jump from zero to full thrust in one
1151 go.
1152
1153 To move backwards through the sequence another key must be bound
1154 to sequence-key-ref.
1155
1156 exec The exec button handler allows to launch an application when the
1157 button was pressed. An example would look like this:
1158
1159 xboxdrv \
1160 --ui-buttonmap A=exec:/home/juser/local/bin/screenshot.sh
1161
1162 Possible uses for the button are the ability to do screenshots
1163 or perform other tasks that are outside the main application you
1164 are using xboxdrv with.
1165
1166 macro A button can be bound to a macro via:
1167
1168 xboxdrv \
1169 --ui-buttonmap A=macro:/home/juser/.xboxdrv/somefile.macro
1170
1171 The .macro file has the form of:
1172
1173 send KEY_LEFTSHIFT 1
1174 wait 500
1175 send KEY_LEFTSHIFT 0
1176
1177 All abs, rel and key events can be send from a macro file.
1178
1179 AXIS EVENT HANDLER
1180 Axis event handler decide what happens when an axis is moved. Like
1181 button event handler they come in different forms and like button event
1182 handler they provide a shortcut form. EV_KEY events will be handled by
1183 the key handler, EV_REL by the rel handler and EV_ABS by the abs han‐
1184 dler.
1185
1186 abs:ABS_EVENT
1187 The abs handler is the simplest of them all, it will simply send
1188 out the value it gets as input as the given ABS_EVENT event to
1189 the kernel. Thus a basic configuration to make the left stick
1190 behave as joystick would look like this:
1191
1192 xboxdrv \
1193 --ui-axismap X1=abs:ABS_X,Y1=abs:ABS_Y
1194
1195 key:KEY_UP:KEY_DOWN:THRESHOLD
1196 KEY_UP gives the keycode to be send when the axis is moved up
1197
1198 KEY_DOWN gives the keycode to be send when the axis is moved
1199 down
1200
1201 THRESHOLD gives the threshold that triggers the sending of an
1202 event
1203
1204 Just like --ui-buttonmap, you can also use shift keys in place
1205 of the XBOXAXIS:
1206
1207 $ xboxdrv --ui-axismap X1=ABS_X,LB+X1=ABS_RX
1208
1209 This allows you to send ABS_X events normally and ABS_RX events
1210 when the LB button is held down.
1211
1212 rel:REL_EVENT:VALUE:REPEAT
1213 VALUE gives the maximum value of the event, the actual value
1214 that gets send is VALUE * axis_state. (default: 10)
1215
1216 REPEAT gives the number of milisecond to pass before the event
1217 is fired again (default: 5).
1218
1219 The value of -1 has a special meaning, it will result in the REL
1220 event being fired as soon as possible (i.e. every timeout
1221 miliseconds). This is the recomment way for handling mouse emu‐
1222 lation, as it will keep REL events syncronized and thus avoid
1223 jaggies in the movement, that will result from manually specify‐
1224 ing a timeout.
1225
1226 The rel handler is mainly useful for mouse pointer emulation, if
1227 you want to emulate a mouse scroll wheel use the rel-repeat han‐
1228 dler instead.
1229
1230 rel-repeat:REL_EVENT:VALUE:REPEAT
1231 The rel-repeat handler is similar to the rel handler, but opti‐
1232 mized for emulating the scroll wheel of a mouse.
1233
1234 VALUE isn't scaled to how far the axis has moved, instead it is
1235 constant, instead the time given in REPEAT is scaled according
1236 to the axis movement. Thus the further the stick is moved, the
1237 more events will be send.
1238
1239 The need for both rel-repeat and rel arises from the fact that
1240 Xorg converts scroll wheel movement to button presses before
1241 they are handed to an application, thus an application never
1242 properly sees the changes in VALUE, by scaling REPEAT instead
1243 that problem is worked around.
1244
1246 Input filter allow to manipulate the events that come from the con‐
1247 troller. They can be used on --buttonmap, --axismap, --ui-buttonmap and
1248 --ui-axismap. The difference between the two is that the --ui-... ver‐
1249 sions applies to the uinput events, while the other version applies to
1250 Xbox360 controller events.
1251
1252 BUTTON FILTER
1253 tog, toggle
1254 The toggle filter will turn the button into a toggle button,
1255 clicking the button will set it to pressed state and pressing it
1256 again will unpress it. Useful for games where you might want to
1257 permanently run or duck without holding the button pressed.
1258
1259 inv, invert
1260 The invert filter will keep the button in pressed state when it
1261 is not pressed and in unpressed state when it is pressed.
1262
1263 auto, autofire:RATE:DELAY
1264 The autofire filter allows to repeatatly send button press
1265 events when the button is held down. It takes two optional pa‐
1266 rameters:
1267
1268 RATE is the number of miliseconds between button press events.
1269
1270 DELAY the amount of miliseconds till the autofire will start,
1271 before that delay the button will act as normal.
1272
1273 click-press
1274 The click-press filter will transmit a single button click when
1275 the button is pressed.
1276
1277 click-release
1278 The click-release filter will transmit a single button click
1279 when the button is released.
1280
1281 click-both
1282 The click-both filter will transmit a single button click when
1283 the button is pressed and another one when it is released.
1284
1285 const:VALUE
1286 The const filter will ignore the input signal and send a con‐
1287 stant value to the output. This can be used for example in com‐
1288 bination with multiple configurations to signal a game or anoth‐
1289 er application which configuration is currently active.
1290
1291 delay:TIME
1292 A button has to be held down for TIME miliseconds before it will
1293 emit an event, press events shorter then that will be ignored.
1294
1295 log:STRING
1296 The log filter will output everything to stdout that goes
1297 through it to, this is useful for debugging the filter. A STRING
1298 can be provided as parameter that will be outputed before the
1299 event.
1300
1301 AXIS FILTER
1302 cal, calibration:MIN:CENTER:MAX
1303 See --calibration.
1304
1305 sen, sensitivity:SENSITIVITY
1306 See --axis-sensitivity.
1307
1308 dead, deadzone:VALUE, deadzone:MIN:CENTER:MAX
1309 Deadzone filter applies a deadzone to the current axis. If only
1310 MIN is provided, the parameter will be interpreted as
1311 -MIN:MIN:1. If the argument is 1, smooth filtering will be ap‐
1312 plied so that the end of the deadzone is 0. Setting the argument
1313 to 0 will apply a simple cut-off filter, where all events small‐
1314 er then the threshold are ignored.
1315
1316 rel, relative:SPEED
1317 See --relative-axis.
1318
1319 resp, response:VALUES:...
1320 The response curve filter allows you to completely change the
1321 way an axis reacts. The filter takes a list of VALUES that are
1322 then linearly interpolated and spread across the full range of
1323 the axis. An example would look like this:
1324
1325 xboxdrv \
1326 --ui-axismap x1^resp:-32768:-4000:0:4000:32767
1327
1328 Here the X1 axis is manipulated so that it will have a lower
1329 sensitivity in the center and a higher one on the outside.
1330
1331 const:VALUE
1332 The const filter will ignore the input signal and send a con‐
1333 stant value to the output. This can be used for example in com‐
1334 bination with multiple configurations to signal a game or anoth‐
1335 er application which configuration is currently active.
1336
1337 log:STRING
1338 The log filter will output everything to stdout that goes
1339 through it to, this is useful for debugging the filter. A STRING
1340 can be provided as parameter that will be outputed before the
1341 event.
1342
1343 MODIFIER
1344 While button and axis filter only apply to a single axis or button at a
1345 time, modifiers apply to the complete controller at once and can thus
1346 be used to perform modifications that require input from multiple axis
1347 or buttons. Most of the modifiers explained below replicate functional‐
1348 ity provided by regular options, but allow more fine tuning, such as
1349 limiting the effects to a single analog stick instead of just applyig
1350 it to all. Note that modifiers are applied one after the other, so or‐
1351 der is important.
1352
1353 dpad-rotate=DEGREE
1354 See --dpad-rotation.
1355
1356 dpad-restrictor=RESTRICTON
1357 Restricts the dpad movement, values for RESTRICTON can be:
1358
1359 x-axis: only allow movement in the X axis
1360
1361 y-axis: only allow movement in the Y axis
1362
1363 fourway: allow movement in X and Y axis, but filter out diago‐
1364 nals
1365
1366 4wayrest, four-way-restrictor=XAXIS:YAXIS
1367 See --four-way-restrictor.
1368
1369 square, square-axis=XAXIS:YAXIS
1370 See --square-axis.
1371
1372 rotate=XAXIS:YAXIS:DEGREE:MIRROR
1373 Rotates the stick given by XAXIS and YAXIS by DEGREE and option‐
1374 ally MIRRORS it.
1375
1376 stat, statistic
1377 The statistic modifier doesn't actually modify anything, instead
1378 it collects statistics on the controller, such as how many times
1379 a button has been pressed. The results of the collections will
1380 be displayed on shutdown of xboxdrv.
1381
1382 Note that the stat modifier is part of the modifier stack, thus
1383 to get correct results you must make sure that it comes first in
1384 the stack when it should work on real events and not be confused
1385 by auto-fire or similar modifications.
1386
1388 USING A SINGLE CONTROLLER
1389 Plug in your Xbox360 gamepad and then unload the xpad driver via:
1390
1391 $ rmmod xpad
1392
1393 If you want to permanently unload it add the following line to
1394 /etc/modprobe.d/blacklist.conf:
1395
1396 blacklist xpad
1397
1398 Next you have to load the uinput kernel module which allows userspace
1399 programms to create virtual input devices and the joydev module handles
1400 the /dev/input/jsX devices:
1401
1402 $ modprobe uinput
1403 $ modprobe joydev
1404
1405 You also have to make sure that you have access rights to /dev/in‐
1406 put/uinput, either add yourself to the appropriate group, adjust the
1407 permissions or run xboxdrv as root.
1408
1409 Once ensured that xpad is out of the way and everything is in place
1410 start the userspace driver with:
1411
1412 $ xboxdrv
1413
1414 Or in case you don't have the neccesary rights (being in group root
1415 should often be enough) start the driver as root via:
1416
1417 $ sudo xboxdrv
1418
1419 This will create /dev/input/js0 and allow you to access the gamepad
1420 from any game. To exit the driver press Ctrl-c.
1421
1422 By default xboxdrv will echo all controller events to the console, this
1423 makes it easy to see if things are properly working, but will eat a lot
1424 of CPU, thus it is strongly recomment to disabled that output with the
1425 --silent option.
1426
1427 The trigger buttons are handled by xboxdrv normally as axis, giving you
1428 analog feedback, while this reproduces the Xbox360 controller the most
1429 accurately, it will confuse many and only be useful in a few, racing
1430 games mainly. So in the majority of cases it is recomment to change the
1431 triggers to regular buttons via:
1432
1433 $ xboxdrv --trigger-as-button
1434
1435 USING MULTIPLE CONTROLLER
1436 If you want to use multiple wired controllers you need to start multi‐
1437 ple instances of the xboxdrv driver and append the -i argument to se‐
1438 lect the appropriate controller like this:
1439
1440 $ xboxdrv -i 1
1441
1442 If you have multiple wireless controller you need to start multiple in‐
1443 stances of the xboxdrv driver and append the --wid option like this:
1444
1445 $ xboxdrv --wid 1
1446
1447 You have to sync the wireless controller as usual.
1448
1449 To see a list of all the controllers that xboxdrv detects being con‐
1450 nected to your system use:
1451
1452 $ xboxdrv --list-controller
1453
1454 HOTPLUGGING AND XBOXDRV DAEMON
1455 To allow hotplugging of gamepads xboxdrv has to be run in daemon mode.
1456 This is accomplished with the --daemon option:
1457
1458 $ xboxdrv --daemon
1459
1460 When launched in daemon mode xboxdrv will listen to udev events and
1461 thus be notified whenever a new USB device gets plugged into the com‐
1462 puter. It will then match that device against its list of supported de‐
1463 vices and launch a separate thread to handle that gamepad.
1464
1465 Note that xboxdrv will not allow an arbitrary large number of con‐
1466 trollers to be used in that mode, it can only handle as many con‐
1467 trollers as you have allocated controller slots at startup. New slots
1468 can be allocated with --next-controller and by default one slot is al‐
1469 ways allocated, thus to support three controller you would run it with:
1470
1471 $ xboxdrv --daemon --next-controller --next-controller
1472
1473 Each controller slot can be configured individually and you can limit
1474 which gamepad gets assigned to which slot with the --match option.
1475
1476 Note that xboxdrv will create the virtual uinput devices on startup,
1477 not when a gamepad gets plugged in, this allows to plug in gamepads
1478 even after a game or an application like XBMC has already been launched
1479 and still have it all function properly.
1480
1481 In daemon mode xboxdrv can be detached from the current shell via --de‐
1482 tach, to get a handle on it to kill it you can write its pid via the
1483 --pid-file:
1484
1485 $ sudo xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid
1486
1488 When Xboxdrv is run as daemon it will export some API functions via D-
1489 Bus, thus allowing to make configuration changes at runtime. The D-Bus
1490 interface can be accessed either by the numerous language bindings pro‐
1491 vided or via the generic command line tool dbus-send or by the more
1492 userfriendly xboxdrvctl tool. Examples below are given for the raw
1493 dbus-send.
1494
1495 Introspection is provided via the usual means:
1496
1497 dbus-send --session --type=method_call --print-reply \
1498 --dest=org.seul.Xboxdrv /org/seul/Xboxdrv org.freedesktop.DBus.Introspectable.Introspect
1499
1500 dbus-send --session --type=method_call --print-reply \
1501 --dest=org.seul.Xboxdrv /org/seul/Xboxdrv/ControllerSlots/0 org.freedesktop.DBus.Introspectable.Introspect
1502
1503 dbus-send --session --type=method_call --print-reply \
1504 --dest=org.seul.Xboxdrv /org/seul/Xboxdrv/Daemon org.freedesktop.DBus.Introspectable.Introspect
1505
1506 Status information on available slots, configuration and active con‐
1507 trollers can be obtained via:
1508
1509 dbus-send \
1510 --session --type=method_call --print-reply \
1511 --dest=org.seul.Xboxdrv /org/seul/Xboxdrv/Daemon org.seul.Xboxdrv.Daemon.Status
1512
1513 Setting the LED on controller 0 can be done via:
1514
1515 dbus-send --session --type=method_call --print-reply \
1516 --dest=org.seul.Xboxdrv /org/seul/Xboxdrv/ControllerSlots/0 org.seul.Xboxdrv.Controller.SetLed int32:4
1517
1518 Setting the rumble motors on controller 0 can be done via:
1519
1520 dbus-send --session --type=method_call --print-reply \
1521 --dest=org.seul.Xboxdrv /org/seul/Xboxdrv/ControllerSlots/0 org.seul.Xboxdrv.Controller.SetRumble int32:255 int32:255
1522
1523 Setting a specific controller slot configuration, just as --toggle BTN
1524 allows, can be done with:
1525
1526 dbus-send --session --type=method_call --print-reply \
1527 --dest=org.seul.Xboxdrv /org/seul/Xboxdrv/ControllerSlots/0 org.seul.Xboxdrv.Controller.SetConfig int32:2
1528
1530 Knowing how to test a xboxdrv configuration is absolutely crucial in
1531 understanding what is wrong in a given setup. Testing the configuration
1532 in a game is most often not helpful, since you won't see the true cause
1533 beyond endless layers of abstraction between you and the actual events.
1534 Luckily there are a few tools you can use to test, all of these are
1535 command line based and it is recomment that you get familar with them
1536 when you want to do any more complex configuration.
1537
1538 EVTEST
1539 evtest lets you read raw input events from /dev/input/eventX. The event
1540 devices are the very core of all event handling, things like the joy‐
1541 stick devices are derived from the event device, so if you want to fix
1542 some issue on the joystick device, you have to fix the event device.
1543
1544 evtest is available in the tools/ directory or as part of your distri‐
1545 bution in the package evtest. your distribution.
1546
1547 JSTEST
1548 jstest lets you read the output out of a joystick event device
1549 (/dev/input/js0).
1550
1551 jstest is available in the tools/ directory or as part of your distri‐
1552 bution joystick.
1553
1554 SDL-JSTEST
1555 sdl-jstest lets you see events as games using SDL see them. This is
1556 very important when you want to set and test the SDL_LINUX_JOYSTICK en‐
1557 vironment variables.
1558
1559 It is currently available via:
1560
1561 $ svn co svn://svn.berlios.de/windstille/trunk/sdl-jstest
1562
1563 Or from the same Ubuntu PPA that also contains xboxdrv in the package
1564 sdl-jstest.
1565
1566 XEV
1567 xev lets you see the events that Xorg sees. Note however that you might
1568 not see all events, since some will be grapped by your Window manager
1569 before they reach xev, this is normal.
1570
1571 xev is part of every Linux distribution, on Ubuntu its available via:
1572
1573 $ apt-get install x11-utils
1574
1575 JSCALC AND JSCALIBRATOR
1576 Both of these tools lets you calibrate your gamepad, however with pret‐
1577 ty much all current gamepads this is no longer needed and actually
1578 harmful as it might overwrite a perfectly good working configuration
1579 with a broken one (unplugging the gamepad or a reboot will fix that).
1580 So avoid them unless you clearly understand the issues of using them.
1581
1582 If your gamepad produces incorrect data and you do want to calibrate it
1583 you might want to check out the option --calibration, which lets you
1584 tweak the way xboxdrv interprets your gamepad data.
1585
1586 MOUSE
1587 No tools for testing the output on /dev/input/mouseX are known.
1588
1589 NOTE
1590 If the tools provide no output at all, this might not be due to a wrong
1591 configuration, but due to Xorg grabbing your event device and locking
1592 it, see Xorg section for possible fixes.
1593
1595 The configurations below are just a few random examples, further exam‐
1596 ples can be found in the examples/ directory of the xboxdrv source tree
1597 or in /usr/share/doc/xboxdrv/examples/.
1598
1599 TURNING TRIGGERS INTO BUTTONS
1600 By default xboxdrv will handle the trigger as analog axis, not buttons,
1601 while this is beneficial for racing games, it will confuse many other
1602 games, thus xboxdrv provides an easy way to change the handling into
1603 buttons via the --trigger-as-button option:
1604
1605 $ xboxdrv --trigger-as-button
1606
1607 CONFIGURE A DEADZONE
1608 Many gamepads don't center exactly at zero, but at random values around
1609 it. This 'noise' can confuse some games and is thus be best filtered
1610 out, this can be accomplished with:
1611
1612 $ xboxdrv --deadzone 25%
1613
1614 The percentance is the amount of noise that will get filtered out, you
1615 can also give raw device values if you leave out the % sign. If you
1616 want to have a deadzone only on a specific axis you have to use axis
1617 filter:
1618
1619 $ xboxdrv --buttonmap X1^deadzone:15000
1620
1621 KEYBOARD EMULATION
1622 The following configuration will cause xboxdrv to emulate a keyboard,
1623 which can be useful for games that are played with keyboard, like Flash
1624 games or games that don't support a joystick. Since different games use
1625 different keyboard keys you might have to adjust the keybindings to fit
1626 the game:
1627
1628 $ xboxdrv \
1629 --ui-clear \
1630 --ui-buttonmap a=XK_a,b=XK_b,x=XK_x,y=XK_y \
1631 --ui-buttonmap dl=XK_Left,dr=XK_Right,du=XK_Up,dd=XK_Down
1632
1633 FIGHTING GAMES:
1634 In this configuration the left and right trigger get turned into digi‐
1635 tal buttons. All axis except the dpad are ignored. RB and RT are mapped
1636 to act as if buttons 1,2 and 3 are pressed simultaniously which is use‐
1637 ful for some special attacks. Instead of using the native button
1638 names, the 1,2,3,... aliases are used, which makes things a little
1639 easier to read:
1640
1641 $ xboxdrv \
1642 --dpad-only \
1643 --trigger-as-button \
1644 --buttonmap lb=1,x=2,y=3,lt=4,a=5,b=6 \
1645 --buttonmap rb=1,rb=2,rb=3 \
1646 --buttonmap rt=4,rt=5,rt=6
1647
1648 CH FLIGHTSTICK EMULATION IN DOSBOX:
1649 In dosbox.conf set:
1650
1651 [joystick]
1652 joysticktype = ch
1653
1654 Start xboxdrv with:
1655
1656 $ xboxdrv -s \
1657 --trigger-as-zaxis --square-axis \
1658 --relative-axis y2=64000 --axismap -y2=x2,x2=y2
1659
1660 Your right analog stick will act as trottle control, the trigger as
1661 rudder. Using --modifier to install a four-way restrictor might also be
1662 worth a consideration to not accidently touch the throttle when the
1663 rudder is moved.
1664
1665 USING MOUSE EMULATION AND JOYSTICK AT THE SAME TIME
1666 To use mouse emulation and joystick at the same time you have to regis‐
1667 ter two configuration with xboxdrv, this works via:
1668
1669 $ xboxdrv --next-config --mouse
1670
1671 The --next-config option will open up a second configuration and all
1672 configuration options on the right side of it will go there, while ev‐
1673 erything on the left side of it will go into the first configuration.
1674 Toggling between the configurations works with the guide button, you
1675 can have as many configuratios as you want.
1676
1677 MAPPING EVERY BUTTON MULTIPLE
1678 Some games might require more buttons then your gamepad has, in those
1679 situation it can be useful to map a button twice by using shifted but‐
1680 tons:
1681
1682 $ xboxdrv \
1683 --ui-clear \
1684 --ui-axismap X1=ABS_X,Y1=ABS_Y \
1685 --ui-buttonmap a=JS_0,b=JS_1,x=JS_2,y=JS_3 \
1686 --ui-buttonmap lb+a=JS_4,lb+b=JS_5,lb+x=JS_6,lb+y=JS_7 \
1687 --ui-buttonmap rb+a=JS_8,rb+b=JS_9,rb+x=JS_10,rb+y=JS_11
1688 .fi
1689
1690 Here all face buttons are get mapped three times, once when
1691 pressed normally, once when pressed while LB is held down and
1692 once when RB is held down, thus given you for the six buttons
1693 12 virtual ones.
1694
1695 SAUERBRATEN
1696 First analogstick gets mapped te cursor keys, second analogstick gets
1697 mapped to mouse. Note: This is just an incomplete example, not a per‐
1698 fectly playable configuration, you have to do tweaking yourself.
1699
1700 $ xboxdrv \
1701 --ui-axismap x2=REL_X:10,y2=REL_Y:-10,x1=KEY_LEFT:KEY_RIGHT,y1=KEY_UP:KEY_DOWN \
1702 --ui-buttonmap a=BTN_RIGHT,b=BTN_LEFT,x=BTN_EXTRA \
1703 --ui-buttonmap rb=KEY_5,lb=KEY_6,lt=BTN_LEFT,rt=BTN_RIGHT \
1704 --ui-buttonmap y=KEY_ENTER,dl=KEY_4,dr=KEY_2,du=KEY_1,dd=KEY_3,back=KEY_TAB,start=KEY_ESC \
1705 -s --deadzone 6000 --dpad-as-button --trigger-as-button
1706
1707 WARSOW
1708 Note: This is just an incomplete example, not a perfectly playable con‐
1709 figuration, you have to do tweaking yourself.
1710
1711 $ xboxdrv \
1712 --ui-axismap x2=REL_X:10,y2=REL_Y:-10,x1=KEY_A:KEY_D,y1=KEY_W:KEY_S \
1713 --ui-buttonmap a=KEY_LEFTSHIFT,b=BTN_C,x=BTN_EXTRA,y=KEY_C \
1714 --ui-buttonmap lb=BTN_RIGHT,rb=KEY_SPACE \
1715 --ui-buttonmap lt=KEY_Z,rt=BTN_LEFT \
1716 --ui-buttonmap dl=KEY_4,dr=KEY_2,du=REL_WHEEL:-1:150,dd=REL_WHEEL:1:150 \
1717 --ui-buttonmap back=KEY_TAB,start=KEY_ESC \
1718 -s --deadzone 6000 --dpad-as-button --trigger-as-button
1719
1721 When you want full game specific configurability and automatic launch‐
1722 ing of xboxdrv, it is easiest to write little startup scripts for your
1723 games that will launch xboxdrv, launch your game and then when the game
1724 is finished tear down xboxdrv:
1725
1726 #!/bin/sh
1727
1728 exec xboxdrv \
1729 --trigger-as-button -s \
1730 -- \
1731 your_favorite_game
1732
1733 # EOF #
1734
1735 Here your_favorite_game is the executable of your game and is passed to
1736 xboxdrv as last argument. This will cause xboxdrv to start the game and
1737 keep running as long as the game is running, when the game is done,
1738 xboxdrv will quit automatically.
1739
1740 If you want to pass parameters to the game you have to add a -- separa‐
1741 tor, as otherwise your options to the game would be eaten up by xbox‐
1742 drv.
1743
1745 To let SDL know which axis act as a hat and which act as normal axis
1746 you have to set an environment variable:
1747
1748 $ SDL_LINUX_JOYSTICK="'Xbox Gamepad (userspace driver)' 6 1 0"
1749 $ export SDL_LINUX_JOYSTICK
1750
1751 You might also need in addition use this (depends on the way SDL was
1752 compiled):
1753
1754 $ SDL_JOYSTICK_DEVICE="/dev/input/js0"
1755 $ export SDL_JOYSTICK_DEVICE
1756
1757 This will let the DPad act as Hat in SDL based application. For many
1758 games the driver will work without this, but especially in Dosbox this
1759 variable is very important.
1760
1761 If you use options in xboxdrv that change the number of axis you have
1762 to adjust the variable accordingly, see:
1763
1764 · ⟨ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars⟩
1765
1766 SDL_LINUX_JOYSTICK
1767 Special joystick configuration string for linux. The format is "name
1768 numaxes numhats numballs" where name is the name string of the joy‐
1769 stick (possibly in single quotes), and the rest are the number of ax‐
1770 es, hats and balls respectively.
1771
1772 SDL_JOYSTICK_DEVICE
1773 Joystick device to use in the linux joystick driver, in addition to
1774 the usual: /dev/js*, /dev/input/event*, /dev/input/js*
1775
1777 "NO XBOX OR XBOX360 CONTROLLER FOUND"
1778 This means that either your controller isn't plugged in or is not rec‐
1779 ognized by the driver. To fix this you need to know the idVendor and
1780 the idProduct numbers, which you can find out via:
1781
1782 $ lsusb -v
1783
1784 Once done you can try to add them to this array in src/xpad_device.cpp:
1785
1786 XPadDevice xpad_devices[] = { ... }
1787
1788 If you have success with that, send a patch to <grumbel@gmail.com>, if
1789 not, contact me too, I might be able to provide additional help.
1790
1791 As an alternative you can also use the --device and --type option to
1792 enforce a USB device as well as a controller type an bypass any auto
1793 detection.
1794
1795 "UNKNOWN DATA: BYTES: 3 DATA: ..."
1796 This means that your controller is sending data that isn't understood
1797 by the driver. If your controller still works, you can just ignore it,
1798 the Xbox360 controller seems to send out useless data every now and
1799 then. If your controller does not work and you get plenty of those
1800 lines when you move the sticks or press buttons it means that your con‐
1801 troller talks an un-understood protocol and some reverse enginiering is
1802 required. Contact <grumbel@gmail.com> and include the output of:
1803
1804 $ lsusb -v
1805
1806 Along with all the "Unknown data" lines you get.
1807
1808 "ERROR: NO STUITABLE UINPUT DEVICE FOUND"
1809 Make sure that uinput and joydev kernel modules are loaded. Make sure
1810 that you have a /dev/input/uinput, /dev/uinput or /dev/misc/uinput and
1811 permissions to access it.
1812
1813 Before reporting this as a bug make sure you have tested if the driver
1814 itself works with:
1815
1816 $ xboxdrv --no-uinput -v
1817
1818 THE WIRELESS CONTROLLER DOESN'T WORK
1819 You have to sync the controller befor it can be used, restart of the
1820 driver isn't needed and the driver should let you now when it recieves
1821 a connection after you sync the controller.
1822
1823 KEYBOARD EMULATION
1824 When you try to let xboxdrv send a keyboard events via --ui-buttonmap
1825 or --ui-axismap Xorg must register the device as keyboard device to
1826 work properly. This seems to work automatically when you bind more then
1827 two keyboard keys, if you bind less you need to create the file
1828 /etc/hal/fdi/preprobe/xboxdrv.fdi containing:
1829
1830 <?xml version="1.0" encoding="UTF-8"?>
1831 <deviceinfo version="0.2">
1832 <device>
1833 <match key="input.product" string="Xbox Gamepad (userspace driver) - Keyboard Emulation">
1834 <addset key="info.capabilities" type="strlist">input.keys</addset>
1835 </match>
1836 </device>
1837 </deviceinfo>
1838
1839 This will tell HAL and later Xorg that xboxdrv acts as keyboard.
1840
1841 WACOM ISSUES
1842 In some older kernels a Wacom graphic tablet creates a joystick device,
1843 so xboxdrv or any other real joysticks ends up as /dev/input/js1 in‐
1844 stead of /dev/input/js0. In many games this causes the joystick to not
1845 function any more.
1846
1847 A temporary workaround for this is to simply delete the joystick device
1848 js0 and replace it with a symbolic link js1 via:
1849
1850 $ sudo ln -sf /dev/input/js1 /dev/input/js0
1851
1852 This workaround will only last till the next reboot, since the device
1853 names are dynamically created, but for the time being there doesn't
1854 seem to any other way to easily work around this issue.
1855
1856 In newer kernels this issue is fixed.
1857
1858 UINPUT ISSUES
1859 On Ubuntu 9.04 the permissions of the uinput device have changed to
1860 0640, meaning only root has access to the device. To change this back
1861 so that users in the group root have access the device and in turn can
1862 run xboxdrv without sudo you have to create a file called
1863 /etc/udev/rules.d/55-permissions-uinput.rules with the content:
1864
1865 KERNEL=="uinput", MODE="0660", GROUP="root"
1866
1867 WINE ISSUES
1868 When using the Xbox360 gamepad in Wine it is not specially handled as
1869 Xbox360 gamepad, but as generic DirectInput gamepad. This means games
1870 will not display the proper button labels, but just numbers (i.e.
1871 'Btn1' instead of 'A' for example). Aside from that it should work
1872 fine.
1873
1874 XInput support (the Microsoft DirectInput replacment, not the Xorg xin‐
1875 put) is as of January 2011 not implemented in Wine, so games that re‐
1876 quire XInput and don't have an DirectInput fallback will not work with
1877 a Xbox360 controller, unofficial patches however do exist.
1878
1880 If you start xboxdrv and instead of having a fully working joystick,
1881 you end up controlling the mouse that might be due to recent changes in
1882 Xorg and its device hotplug handling. There are four workarounds, the
1883 one that involves editing /etc/hal/fdi/policy/preferences.fdi is the
1884 recommont one.
1885
1886 TEMPORARY WORKAROUND USING HAL-DEVICE
1887 Get the device id from hal:
1888
1889 $ hal-find-by-property --key 'info.product' --string 'Xbox Gamepad (userspace driver)'
1890
1891 Then remove the device from hal with:
1892
1893 $ hal-device -r $DEVICEID
1894
1895 TEMPORARY WORKAROUND USING XINPUT
1896 Second workaround works with xinput:
1897
1898 $ xinput list
1899 $ xinput set-int-prop $DEVICEID 'Device Enabled' 32 0
1900
1901 PERMANENT WORKAROUND USING .FDI FILES
1902 The former two workarounds are just temporary and have to be redone af‐
1903 ter each start of xboxdrv, the last workaround is a permanent one:
1904
1905 You have to edit:
1906
1907 /etc/hal/fdi/policy/preferences.fdi
1908
1909 And insert the following lines:
1910
1911 <match key="input.product" string="Xbox Gamepad (userspace driver)">
1912 <remove key="input.x11_driver" />
1913 </match>
1914
1915 PERMANENT WORKAROUND BY DISABLING DEVICE AUTO DETECTION
1916 A fourth workaround involved disabling the autodetection of Xorg com‐
1917 pletly, you can do that by adding the following lines to
1918 /etc/X11/xorg.conf:
1919
1920 Section "ServerFlags"
1921 Option "AutoAddDevices" "False"
1922 EndSection
1923
1924 Note that without auto detection you will have to manually configure
1925 all your mice and keyboards or your Xorg Server won't start up proper‐
1926 ly. So unless you are already familiar with editing Xorg you better
1927 avoid this workaround. Workaround 3) has basically the same effect, ex‐
1928 cept that auto detection only gets disabled for the single device it is
1929 causing problems.
1930
1932 For documentation on the FF interface see:
1933
1934 · ⟨http://github.com/github/lin‐
1935 ux-2.6/blob/f3b8436ad9a8ad36b3c9fa1fe030c7f38e5d3d0b/Documenta‐
1936 tion/input/ff.txt⟩
1937
1938 · /usr/include/linux/input.h
1939
1940 Additional, non Linux related, force feedback related information can
1941 be found at:
1942
1943 · ⟨http://www.immersion.com/developer/downloads/ImmFundamentals/HTML/⟩
1944
1945 · ⟨http://msdn.microsoft.com/en-us/library/bb219655(VS.85).aspx⟩
1946
1947 fftest is an application you can use to test the force feedback inter‐
1948 face.
1949
1950 Force feedback is disabed by default since it causes trouble in certain
1951 application. "Tomb Raider: Legend" for example when run in Wine crashes
1952 at startup when rumble is enabled, while it works perfectly normal when
1953 rumble is disabled.
1954
1956 X11 KEYSYM ISSUES
1957 X11 keysyms might not work correctly in --ui-buttonmap a=XK_Foobar when
1958 Foobar is mapped to multiple keycodes in the keymap.
1959
1960 Workaround: Use KEY_ instead or cleanup your keymap
1961
1962 Newer versions of Xorg will also do perform some auto configuration
1963 that might lead to your keymap being switched whenever a new keyboard
1964 is detected, in cases of custom Xmodmaps this might confuse xboxdrv and
1965 make the XK_ style names unusable. No workaround for that is known
1966 right now.
1967
1968 NON-INTERRUPTABLE PROCESSES DUE TO FORCE FEEDBACK
1969 Force feedback support is brittle, if you Ctrl-c the driver in the
1970 wrong moment you will end up with a dead uninterruptable process and
1971 basically have to reboot. This looks like it might be a kernel issue
1972 and not a xboxdrv one.
1973
1974 Workaround: Kill the app that uses xboxdrv before xboxdrv itself.
1975
1976 QUESTIONS, BUG REPORTS AND FEATURE REQUESTS
1977 Bug reports and feature request can be report to the xboxdrv issue
1978 tracker at:
1979
1980 ⟨https://github.com/Grumbel/xboxdrv/issues/new⟩
1981
1982 General questions and requests for configuration help should be direct‐
1983 ed to the xboxdrv mailing list at:
1984
1985 ⟨http://groups.google.com/group/xboxdrv⟩
1986
1988 Copyright © 2010-2011 Ingo Ruhnke <grumbel@gmail.com> License GPLv3+:
1989 GNU GPL version 3 or later ⟨http://gnu.org/licenses/gpl.html⟩ . This is
1990 free software: you are free to change and redistribute it. There is NO
1991 WARRANTY, to the extent permitted by law.
1992
1994 xboxdrvctl(1), evtest(1), jstest(1), jstest-gtk(1), xev(1), fftest(1),
1995 lsusb(1)
1996
1997
1998
19990.8.3 2011-07-20 xboxdrv (1)