Last active
July 7, 2023 04:50
-
-
Save encounter/458c518c6e4a7b896de7 to your computer and use it in GitHub Desktop.
Xbox 360 Wireless Controllers xboxdrv/systemd/udev rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is configuration for the Xbox 360 Wireless Gaming Receiver to support hotplugging with xboxdrv. | |
By default, it enables 4 controllers and doesn't require the xpad module to be blacklisted. | |
File locations: | |
/usr/lib/systemd/system/xboxdrv.service | |
/etc/udev/rules.d/99-xboxdrv.rules | |
To activate: | |
sudo systemctl disable xboxdrv | |
sudo systemctl stop xboxdrv | |
sudo systemctl daemon-reload | |
sudo udevadm control --reload-rules | |
Plug in the wireless adapter and view the output of | |
sudo systemctl status xboxdrv | |
to see if it starts properly. | |
Unplug and make sure it stops. (It will throw errors while stopping) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ | |
ENV{ID_VENDOR_ID}=="045e", ENV{ID_MODEL_ID}=="0719", GOTO="xboxdrv_rules" | |
GOTO="xboxdrv_rules_end" | |
LABEL="xboxdrv_rules" | |
ACTION=="add", RUN+="/usr/bin/systemctl start xboxdrv" | |
ACTION=="remove", RUN+="/usr/bin/systemctl stop xboxdrv" | |
LABEL="xboxdrv_rules_end" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Xbox controller driver daemon | |
Documentation=man:xboxdrv(1) | |
[Service] | |
Type=forking | |
User=root | |
PIDFile=/var/run/xboxdrv.pid | |
ExecStart=/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus disabled --silent \ | |
--deadzone 4000 --deadzone-trigger 10% --force-feedback --mimic-xpad-wireless --detach-kernel-driver \ | |
--next-controller --deadzone 4000 --deadzone-trigger 10% --force-feedback --mimic-xpad-wireless --detach-kernel-driver \ | |
--next-controller --deadzone 4000 --deadzone-trigger 10% --force-feedback --mimic-xpad-wireless --detach-kernel-driver \ | |
--next-controller --deadzone 4000 --deadzone-trigger 10% --force-feedback --mimic-xpad-wireless --detach-kernel-driver | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Those files don't work for me, if anyone has the same problem, try my configs instead, replace
--device-by-id 413d:2104
with your own device ID listed inlsusb
UPDATE:
Found a simpler solution, not need to install xboxdrv or write the service/rules files :
sudo modprobe xpad
lsusb
to get the ids (xxxx:yyyy)echo "xxxx yyyy" | sudo tee /sys/bus/usb/drivers/xpad/new_id
UPDATE2:
Better to use the service/rules instead.