/* * title "Dodgy controller" * author "Dylan Lom" * date "2021-08-11" * link stylesheet "/main.css" */ # $(echo $title) I bought a $30 "new" DualShock3 controller from eBay... it's fake. As a result when I plug it into my computer it gets recognised as an Xbox controller and... doesn't send any inputs (jump to the next section if you just want to know how I fixed it) The four lights continually flash when I plug it in and it eventually goes to sleep. The dmesg output is... weird to say the least
   [  +4.573524] usb 1-3.3: new full-speed USB device number 43 using xhci_hcd
   [  +0.100387] usb 1-3.3: not running at top speed; connect to a high speed hub
   [  +0.000799] usb 1-3.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00
   [  +0.000002] usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
   [  +0.000000] usb 1-3.3: Product: PS3 Controller
   [  +0.000001] usb 1-3.3: Manufacturer: Sony
   [  +0.007953] input: Sony PS3 Controller Motion Sensors as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.3/1-3.3:1.0/0003:054C:0268.0018/input/input84
   [  +0.058882] input: Sony PS3 Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.3/1-3.3:1.0/0003:054C:0268.0018/input/input83
   [  +0.000336] sony 0003:054C:0268.0018: input,hiddev0,hidraw6: USB HID v81.11 Joystick [Sony PS3 Controller] on usb-0000:00:14.0-3.3/input0
   [  +1.144159] usb 1-3.3: USB disconnect, device number 43
   [  +1.503464] usb 1-3.3: new full-speed USB device number 44 using xhci_hcd
   [  +0.101397] usb 1-3.3: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.10
   [  +0.000001] usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
   [  +0.000001] usb 1-3.3: Product: Controller
   [  +0.000001] usb 1-3.3: Manufacturer: Sony
   [  +0.005481] input: Microsoft X-Box 360 pad as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.3/1-3.3:1.0/input/input85
So it connects, disconnects and reconnects with a different vendor and product id (I think I'm reading this correctly -- I've tried to stay away from scary system logs in the past). Anyway after wasting a lot of time trying to connect the controller like it was an actual sony controller I accepted it almost certainly... wasn't. A check on Windows (where it does actually work OOTB) confirms this, as the device is simply called 'Controller'. I tried the patches suggested in [this issue][1] but didn't have any luck. I don't know how they are ID'ing their fakes to a particular brand either, I can't work out where mine came from. ## The fix Eventually I found [this gist][2], which suprising works! Just run it as root :^). So the next step was to get it running automatically with udev I guess, I've pretty much accepted I'm not getting wireless working at this point... I don't know much about udev either, but I'll leave the [rule & patched script][3] I wrote to get the controller automatically connected here in case someone wants it. I haven't actually done much testing with the controller yet -- the jstest-gtk window shows a concerning lack of movement in the horizontal for the right analog stick (steam's controller window gives full movement however). If I have more problems actually getting the thing to work I'll maybe amend it here :) [1]: https://github.com/falkTX/qtsixa/issues/4 [2]: https://gist.github.com/dnmodder/de2df973323b7c6acf45f40dc66e8db3 [3]: https://gist.github.com/dylan-lom/f0a4edc598e3a738cfc9c34f1a7c5216