Dualshock controllers on 4.4 with 3B+
-
Maybe in some distant future SDL and all the emulators will find some approach for correct use of the motion controls. But for now, I think the best approach is just to disable them altogether. The nice thing about these rules is that they can be commented out very easily.
-
@rsn8887 I agree, it's a quick fix that's easy to implement (maybe toggled on/off).
-
EDIT: The instructions below don't work. See the latest post in this thread for the correct instructions.
I did some reading and I think the fix involves creating a new file, named
/etc/udev/rules.d/81-disable-DS3-and-DS4-motion-controls.rules
with content
#disable DS3 motion controls SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", NAME=="Sony PLAYSTATION(R)3 Controller Motion Sensors", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ID_INPUT_JOYSTICK}="" SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", NAME=="Sony PLAYSTATION(R)3 Controller Motion Sensors", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}="" #disable DS4 motion controls SUBSYSTEM=="input", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", NAME=="ZZZZ", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ID_INPUT_JOYSTICK}="" SUBSYSTEM=="input", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", NAME=="ZZZZ", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
Where XXXX, YYYY, and ZZZZ are the as-of-yet-unknown strings idVendor, idProduct, and name of the motion control device linked to a DS4 Controller. These variables could be determined if someone with a DS4 connected could run
cat /proc/bus/input/devices
and post the output here. More lines might be neccessary if the DS4 Controller strings change depending on whether it is connected via BT, USB cable or Sony dongle.The idVendor and idProduct parts might even be removed, and we might only match the name.
I suppose the file should have root permissions (?).
I have a hunch this might work but haven't tested it.
Further reading:
https://hackaday.com/2009/09/18/how-to-write-udev-rules/
and
https://github.com/denilsonsa/udev-joystick-blacklist -
@rsn8887 Here's a DS4 connected via bluetooth
I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller Touchpad" P: Phys=00:1a:7d:da:71:09 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:71/0005:054C:09CC.0002/input/input2 U: Uniq=dc:0c:2d:86:41:f6 H: Handlers=event0 B: PROP=5 B: EV=b B: KEY=2420 0 10000 0 0 0 0 0 0 0 0 B: ABS=2608000 0 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller Motion Sensors" P: Phys=00:1a:7d:da:71:09 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:71/0005:054C:09CC.0002/input/input3 U: Uniq=dc:0c:2d:86:41:f6 H: Handlers=event1 B: PROP=40 B: EV=19 B: ABS=3f B: MSC=20 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller" P: Phys=00:1a:7d:da:71:09 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:71/0005:054C:09CC.0002/input/input1 U: Uniq=dc:0c:2d:86:41:f6 H: Handlers=js0 event2 B: PROP=0 B: EV=20001b B: KEY=7fdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3003f B: MSC=10 B: FF=1 7030000 0 0
-
Perfect thanks, so my solution would be this, completely untested so far:
-
ssh into your RetroPie
-
enter
sudo nano /etc/udev/rules.d/51-disable-DS3-and-DS4-motion-controls.rules
- paste the following the editor
#disable DS3 motion controls SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", NAME=="Sony PLAYSTATION(R)3 Controller Motion Sensors", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ID_INPUT_JOYSTICK}="" SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", NAME=="Sony PLAYSTATION(R)3 Controller Motion Sensors", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}="" #disable DS4 motion controls SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", NAME=="Wireless Controller Motion Sensors", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ID_INPUT_JOYSTICK}="" SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", NAME=="Wireless Controller Motion Sensors", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
-
Hit
CTRL-x
andy
to save -
reboot and see if motion controls are disabled
It probably requires some tweaking still, but something along these lines should work.
I am confused that the Name is "Wireless Controller" and not Dualshock 4 or some such. Maybe a bug in the Linux Kernel?
-
-
This post is deleted! -
So question, on 4.4 am i the only one that had to assign the hotkey to the ps button? Even though the config shows select as the hotkey it would not work. I had to make the ps button the hotkey for it to work.
-
@edmaul69 Mine works as select :\
-
@hooperre yeah it was the wirdest thing.
-
@rsn8887
Tried it with 2 x DS4 controllers. It doesn't work.Did anyone manage to get this working?
-
Thanks but “it doesn’t work” is a pretty useless bug report. I should say I haven’t gotten around to testing this. You might have to check the device name strings of your controllers and make sure the script lines match those strings exactly. You can get a printout of the strings by running ‘cat /proc/bus/input/devices’ from the shell while your DS4 controllers are connected.
It could also be something else.
-
@rsn8887 said in Dualshock controllers on 4.4 with 3B+:
cat /proc/bus/input/devices
With 2 x DS4 controllers connected via bluetooth..
I: Bus=0003 Vendor=0572 Product=c688 Version=0800 N: Name="IR-receiver inside an USB DVB receiver" P: Phys=usb-3f980000.usb-1.1.3/ir0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/rc/rc0/input0 U: Uniq= H: Handlers=kbd event0 B: PROP=0 B: EV=100013 B: KEY=40c0200 100891 0 0 0 0 118000 180 1 9e1680 0 0 ffe B: MSC=10 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller Touchpad" P: Phys=b8:27:eb:52:c0:44 S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:09CC.0005/input/input14 U: Uniq=dc:0c:2d:4d:c9:b5 H: Handlers=event1 B: PROP=5 B: EV=b B: KEY=2420 0 10000 0 0 0 0 0 0 0 0 B: ABS=2608000 0 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller Motion Sensors" P: Phys=b8:27:eb:52:c0:44 S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:09CC.0005/input/input15 U: Uniq=dc:0c:2d:4d:c9:b5 H: Handlers=event2 B: PROP=40 B: EV=19 B: ABS=3f B: MSC=20 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller" P: Phys=b8:27:eb:52:c0:44 S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:09CC.0005/input/input13 U: Uniq=dc:0c:2d:4d:c9:b5 H: Handlers=event3 js0 B: PROP=0 B: EV=20001b B: KEY=7fdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3003f B: MSC=10 B: FF=1 7030000 0 0 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller Touchpad" P: Phys=b8:27:eb:52:c0:44 S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:054C:09CC.0006/input/input17 U: Uniq=70:20:84:3d:bb:34 H: Handlers=event4 B: PROP=5 B: EV=b B: KEY=2420 0 10000 0 0 0 0 0 0 0 0 B: ABS=2608000 0 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller Motion Sensors" P: Phys=b8:27:eb:52:c0:44 S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:054C:09CC.0006/input/input18 U: Uniq=70:20:84:3d:bb:34 H: Handlers=event5 B: PROP=40 B: EV=19 B: ABS=3f B: MSC=20 I: Bus=0005 Vendor=054c Product=09cc Version=8100 N: Name="Wireless Controller" P: Phys=b8:27:eb:52:c0:44 S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:054C:09CC.0006/input/input16 U: Uniq=70:20:84:3d:bb:34 H: Handlers=event6 js1 B: PROP=0 B: EV=20001b B: KEY=7fdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3003f B: MSC=10 B: FF=1 7030000 0 0
-
@edmaul69 Just installed a brand new DS4 controller (usb wired) with Retropie 4.4 and B+ (fresh install) and it's seen as 2 controllers. Still buttons and Select as hotkey work as they should.
No tested yet how this impacts on additional controller; will any additional gamepad be seen as player 3 ? -
@darkblaster77 said in Dualshock controllers on 4.4 with 3B+:
With 2 x DS4 controllers connected via bluetooth..
I made a mistake, I should have used
ATTRS{name}
instead ofNAME
. Also, it is not possible to use idVendor/idProduct and name in the same rule, because they belong to different parents.Here are the corrected instructions. I tested this and it works for me. Emulationstation sees only one controller per DS4 and AdvanceMAME does not react to controller motion events anymore.
-
ssh into your RetroPie
-
enter
sudo nano /etc/udev/rules.d/51-disable-DS3-and-DS4-motion-controls.rules
- paste the following into the editor
#disable DS3/DS4 motion controls SUBSYSTEM=="input", ATTRS{name}=="*Motion Sensors", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
-
Hit
CTRL-x
andy
to save -
reboot and verify that motion controls are disabled. For example Emulationstation should only detect 1 controller per DS4 etc.
-
-
I just tested the above solution and it works for me.
-
That solution worked perfectly! Thank you!!!!
-
@rsn8887
It is working flawlessly!!! Greatly appreciate your help. =) -
I wonder if this solution could be included into the next Retropie release?
-
I have tried the above for my Offical Dualshock 3 and I still can't configure the input. It seems when I get to the "Right trigger" part it jumps forward and sets as not defined. Interestingly, when running cat /proc/bus/input/device, the Motion Sensors entry is still appearing. Any ideas?
-
I have only tested this myself using Dualshock 4 controllers connected via Sony dongles.
I think from the reports by other users here we can assume that it also works for Dualshock 4 connected via internal Bluetooth module.
Dualshock 4 report as
"Wireless Controller Motion Sensors"Dualshock 3 should report as
"Sony PLAYSTATION(R)3 Controller Motion Sensors"Since both these strings end with the words "Motion Sensors" my rule, which matches any string ending in "Motion Sensors" should work the same for DS3 and DS4.
Maybe you can check your string by connecting your DS3 controllers and entering the command
cat /proc/bus/input/devices
?Maybe someone else can test it with DS3 controllers to see if it is only you?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.