Linux command
xboxdrv 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Start driver for connected controller
sudo xboxdrv
Run as daemon
sudo xboxdrv --daemon --detach
Run with PID file
sudo xboxdrv --daemon --detach --pid-file [/var/run/xboxdrv.pid]
Use configuration file
sudo xboxdrv -c [/etc/default/xboxdrv]
Silent mode
sudo xboxdrv --silent
List connected controllers
sudo xboxdrv --list-controller
Map triggers as buttons
sudo xboxdrv --trigger-as-button
Set custom deadzone
sudo xboxdrv --deadzone [4000]
说明
xboxdrv is a userspace driver for Xbox and Xbox 360 controllers on Linux. It provides an alternative to the xpad kernel driver with additional features like button remapping, deadzone configuration, and multiple controller support. The driver creates virtual input devices through uinput, making controllers work with games and applications. Daemon mode automatically handles controller connection/disconnection events. Configuration files allow per-controller settings and complex mappings. The driver supports wired USB controllers and wireless controllers with the Xbox 360 wireless receiver.
参数
- -D, --daemon
- Run as daemon, listening for USB events.
- --detach
- Detach from terminal when daemonizing.
- --pid-file _file_
- Write PID to file.
- -c, --config _file_
- Use configuration file.
- --silent
- Suppress normal output.
- --list-controller
- List connected controllers.
- -l, --led _num_
- Set LED status (0-off, 1-4 player number).
- --deadzone _value_
- Set analog stick deadzone.
- --trigger-as-button
- Map triggers as buttons.
FAQ
What is the xboxdrv command used for?
xboxdrv is a userspace driver for Xbox and Xbox 360 controllers on Linux. It provides an alternative to the xpad kernel driver with additional features like button remapping, deadzone configuration, and multiple controller support. The driver creates virtual input devices through uinput, making controllers work with games and applications. Daemon mode automatically handles controller connection/disconnection events. Configuration files allow per-controller settings and complex mappings. The driver supports wired USB controllers and wireless controllers with the Xbox 360 wireless receiver.
How do I run a basic xboxdrv example?
Run `sudo xboxdrv` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -D, --daemon do in xboxdrv?
Run as daemon, listening for USB events.