Home Store Blog Development

Xbox360 controller


#1

Hi

It appears that my xbox360 controller is not correctly detected by default in ubuntu-budgie 18.10 whereas in xubuntu 18.10 it is directly operational out of the box.

Work around:
I installed xboxdrv:

sudo apt install xboxdrv

I unloaded xpad:

sudo rmmod xpad

I created a service file for xboxdrv (found here):

[Unit]
Description=Xbox controller driver daemon

[Service]
Type=simple
User=root
PIDFile=/var/run/xboxdrv.pid
ExecStartPre=/usr/share/ubuntu-xboxdrv/xboxdrv-pre
EnvironmentFile=/usr/share/ubuntu-xboxdrv/uxvars
ExecStart=/usr/bin/xboxdrv --daemon --silent --pid-file /var/run/xboxdrv.pid --dbus disabled $XBOXDRV_OPTIONS $PAD_OPTIONS $CONTROLLER0_OPTIONS --next-controller $PAD_OPTIONS $CONTROLLER1_OPTIONS --next-controller $PAD_OPTIONS $CONTROLLER2_OPTIONS --next-controller $PAD_OPTIONS $CONTROLLER3_OPTIONS

[Install]
WantedBy=multi-user.target

I enabled this service to load at startup and launched it:

sudo systemctl enable xboxdrv
sudo service xboxdrv start

I’m not sure I’m doing the right thing but it works.
If you have a better solution, it would be great.