How to make Steam recognize your gamepad in Linux

Just a little something I found.

I have a cheap chinese PS3 gamepad (“SZMY-POWER CO.,LTD. GAMEPAD 3 TURBO”, not that it would say much though), which is properly recognized by the system, but not Steam. It turned out, the problem is with the device’s permissions. For some unknown reason Steam and some games require joystick device to be world-writable. Pretty dumb, since there’s only need to read what it does, not to tell it what to do. But anyway, the solution is simple. You need to do something like

# chmod +w /dev/input/js0 /dev/input/event16

Make sure these devices correspond your gamepad. Yes, you need both js* and event* devices.

Now, that would be a pretty annoying thing to do every time you want to play with gamepad. There’s udev for this, and it’s used by all modern systems (seriously, I haven’t heard of a distro that would still use hal). So you need to create a rules file (e. g. /etc/udev/rules.d/99-gamepad-permission-fix.rules) with the following content:

KERNEL=="js*", SUBSYSTEM=="input", ENV{ID_VENDOR_ID}=="0e8f", ENV{ID_MODEL_ID}=="310d", MODE="0666"
KERNEL=="event*", SUBSYSTEM=="input", ENV{ID_VENDOR_ID}=="0e8f", ENV{ID_MODEL_ID}=="310d", MODE="0666"

You can see your gamepad’s vendor ID and model ID in dmesg or lsusb. If you don’t want to reboot, issue this command

# udevadm control --reload-rules

and re-plug your gamepad. Now it should be recognized by the Steam’s Big Picture Mode and some games, like “You Have to Win the Game”.


It turned out, that I need a full featured website much less than a simple blog. I don’t want to have a blog on Tumblr, but I do like their implementation of it, so I went with Chyrp, which is pretty close. But then Chyrp died, so I moved to Hugo. The blog is NSFW, as I might occasionally post some pr0n and other disturbing stuff.