Thrustmaster GP XID Pro Edition USB Controller – Setup for Ubuntu 20.04

GP XID Pro Edition Automatic Startup with Ubuntu 20.04

Purpose: By default, the GP XID Pro Edition isn’t enabled and functional in Ubuntu 20.04

Instructions: These will allow you to enable the controller with a single command, and then also have it start up automatically upon boot.

Make startup scripts directory

mkdir ~/startupscripts/

cd ~/startupscripts

Make the gamepad script

sudo vim thrustmaster.sh

(or you can use gedit if vim isn’t to your liking)

#!/bin/bash

sudo rmmod xpad

sudo xboxdrv –silent

save it

sudo chmod + x thrustmaster.sh

Export your startupscripts so the thrustmaster.sh command can be run from any directory. Run this from cli in any directory – type the following:

  • export PATH=$PATH:/home/feoleb/startupscripts

Create bash alias so you don’t have to type the .sh at the end

sudo vim ~/.bash_aliases

alias thrustmaster=’thrustmaster.sh’

save

run ‘source ~/.bashrc’ to reload bashrc without rebooting

Now if you type ‘thrustmaster’ from cli in any directory it will run

Also, to have this script run automagically, go to the root user (sudo su).

Then type ‘crontab -e’

Type @reboot home/yourusername/startupscripts/thrustmaster.sh

save

Now when you reboot, the script will automatically run and since it’s in the root crontab, there is no password required and it will just run.

If you want to test if it’s running you can try to run ‘thrustmaster’ via command line (in your username) and you should get an error saying something like the following:

— [ ERROR ] ——————————————————

Error couldn’t claim the USB interface: LIBUSB_ERROR_BUSY

Try to run ‘rmmod xpad’ and then xboxdrv again or start xboxdrv with the option –detach-kernel-driver.

That means it’s already running.Also the script should run automatically on boot because it’s in rc.local