2

OS: Ubuntu 16.04

Recently, when I plug a Playstation 3 controller in I get random mouse events. The mouse becomes uncontrollable until the PS3 controller is unplugged. I can not control the mouse with the PS3 controller, rather when the controller is plugged in the mouse jumps all round the screen. This issue did not exist prior to 2 weeks ago.

To remedy, I have tried

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo reboot

but this didn't solve the problem.

When the PS3 controller is plugged in, I tried

$ ls /dev/input/ | grep j
js0
js1

which is strange because I only have one controller/joystick plugged in. Then I tried

$ sudo jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Gasia Co.,Ltd PS(R) Gamepad Motion Sensors) has 3 axes (X, Y, Z)
and 0 buttons ().
Testing ... (interrupt to exit)
Axes:  0:  -193  1:  7374  2:  1731 

and

$ sudo jstest /dev/input/js1
Driver version is 2.1.0.
Joystick (Gasia Co.,Ltd PS(R) Gamepad) has 6 axes (X, Y, Z, Rx, Ry, Rz)
and 17 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR, ?, ?, ?, (null), (null), (null), (null)).
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off 11:off 12:off 13:off 14:off 15:off 16:off

In both of the above for js0 and js1 the values for each axis/button update.

I have also performed the same tests for the PS3 controller on a computer running Ubuntu 14.04. The controller works as expected: only js0 exists and jstest gives

$ sudo jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Gasia Co.,Ltd PS(R) Gamepad) has 27 axes (X, Y, Z, Rz, (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null))
and 19 buttons (Trigger, ThumbBtn, ThumbBtn2, TopBtn, TopBtn2, PinkieBtn, BaseBtn, BaseBtn2, BaseBtn3, BaseBtn4, BaseBtn5, BaseBtn6, BtnDead, BtnA, BtnB, BtnC, (null), (null), (null)).
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0  8:     0  9:     0 10:     0 11:     0 12:     0 13:     0 14:     0 15:     0 16:     0 17:     0 18:     0 19:     0 20:     0 21:     0 22:     0 23:

where all axes/buttons update.

I came across a similar issue here but unfortunately there was no success (I don't have xserver-xorg-input-joystick installed).

Any suggestions or solutions would be greatly appreciated!

Chris
  • 23

1 Answers1

0

According to this this reddit answer it is a kernel bug regression introduced by Sony employees - see here and here.

Another redditor has suggested to create an udev rule (see here). Will test and update the answer.

Update

The workaround is to run the following command upon sync'ing up the pad:

xinput set-prop "PLAYSTATION(R)3 Controller" "Device Enabled" 0

The redditor in question also suggests to create an udev script to automate this, haven't been able to make it work yet...

Emanuele
  • 1,044