Skip to content

Instantly share code, notes, and snippets.

Last active February 2, 2023 14:48
What would you like to do?
This script should no longer be necessary thanks to the latest changes made to the master branch of the xpad [] driver, please give it a try and report any regressions you find.
#!/usr/bin/env python3
import os
import sys
import usb.core
import usb.util
except ImportError:
print("First, install the pyusb module with PIP or your package manager.")
if os.geteuid() != 0:
print("You need to run this script with sudo")
dev = usb.core.find(find_all=True)
for d in dev:
if d.idVendor == 0x045e and d.idProduct == 0x028e:
d.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)
Copy link

Two options.

sudo apt install python3-pyusb
sudo pip3 install pyusb

Copy link

@amardhruva I have tried the xpad kernel driver and can confirm it fixes the problem without having to run the workaround script.

Copy link

Thank you! I've tried everything on the net and this fixed my controller being detected but not outputting anything on Kali Linux 6.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment