Steam for Linux

Steam for Linux

Not enough ratings
Making a X360/Shanwan controller work in Linux
By littledpurple
Making a X360/Shanwan (058e:028e) controller work in Linux
Hello there! I have a Defender Scorpoin L3 gamepad.

It can work in two modes: as an Xbox 360 gamepad (058e:028e) and as a Shanwan PS3 gamepad (2563:0575). Here is a screenshot of lsusb in both modes.

As you see, Linux recognizes it in both modes. It works fine in Shanwan mode, but in Xbox mode keys are not working!

How to make it work
I'm using Raspbian, but it should work in any GNU/Linux distro.
So, how to make it work? Huh, it's easy.
1. Open terminal and enter root console with sudo -s or su
2. Now install pyusb library with pip3 install pyusb
Now you can close the console.
3. Download (HUUUGE thanks to dnmodder for making this script) or direct link and put it in home directory (~/)
4. Allow execution of There are 2 main ways: right click and going to properties or just write in console sudo chmod +x
5. To make it work you can just execute the script with root privelegies! (sudo ./ or sudo python ~/

Add it to autostart
In Raspbian (or another LXDE distro) you need to create fixcontroller.desktop file (actually, you can name it whatever you like) in ~/.config/autostart/
and put this code
[Desktop Entry] Version=1.0 Name=Fixcontroller Comment=Fixing controller Exec=sudo ./ Terminal=false Type=Application OnlyShowIn=Gnome;Unity;LXDE; X-GNOME-Autostart-Phase=Initialization
Putting this script in autostart is not the best way, because your controller needs to be plugged in during the script execution. If you insert your controller after, it won't work! You need to reboot or manually run the script. Would be better to execute the script when device is connected, but I don't know how to do this.