First, try to enable the service with the following command:
sudo systemctl enable xboxdrv.service
and then try starting it with:
sudo systemctl start xboxdrv.service
If the service is not found, then the service needs to be created.
Make a file called "xboxdrv.service" in the /etc/systemd/system
and copy/paste the following in it:
[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
Then enable the service:
sudo systemctl enable xboxdrv.service
Followed by starting the service:
sudo systemctl start xboxdrv.service
Make sure the Xbox controller is connected when you start the service.
enable
with my xbox controller connected, and thenstart
, I got the error in the output:Job for xboxdrv.service failed because of unavailable resources or another system error. See "systemctl status xboxdrv.service" and "journalctl -xeu xboxdrv.service" for details.
– luisito_36 Nov 03 '22 at 03:59/etc/systemd/system/xboxdrv.service
exists? Maybe there is a typo in the filename (or the file is located in a different directory). – engineerRed Nov 04 '22 at 16:14/etc/systemd/system/xboxdrv.service
already exists, I made it before! The problem is that the syntax ofExecStart=
have many codes that It couldn't startxboxdrv
, therefore I made a new answer below to fix it. – luisito_36 Nov 04 '22 at 18:49