DualsShock 4 Solution
-
Hello everybody,
I just found out why the DS4 required this really bad ds4drv. It's because Sony changed the BT protocol slightly. I started to search kernel bugtrackers when I found out that the controllers work perfectly fine with Ubuntu 16.10 and 17.04.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1511855It was fixed in kernel 4.5. Retropie 4.2/Raspbian ships with an older version.
As a workaround until Raspbian kernel gets updated via apt I'd suggest the following:sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo BRANCH=next rpi-updateThis installs a 4.9 kernel. Then the controller works perfectly including rumble. The question is how many other regression bugs are in the new kernel build. Till now I found none which would affect my gaming setup.
Maybe somebody can update the WIKI page, or can I do it?
Regards
Ralph -
@mosi0815 the same thing can be achieved by running
sudo rpi-update
in the console. However, I don't think this is recommended as 4.9 is not a stable release. The kernel RetroPie uses is currently 4.4.50 which is the latest stable version. -
I got a command not found when I tried to start rpi-update. Don't know why. Whatever.
It's easy to try and revert. If everything works for my use case I don't care if it's stable. :) -
@mosi0815 Coincidentally, the new kernel release (stable) is now 4.9.24, so I wouldn't worry too much.
EDIT: This is as of 2 days ago. -
@mosi0815 I had no problems using a ds4 controller via bluetooth... First connected some weeks ago
-
@mosi0815 the only question I have Is without the ds4drv is there any way to change the light bar color? Because thats a cool little feature.
-
@mosi0815 if "sudo rpi-update" command does not work run "sudo apt-get install rpi-update" and then use use "sudo rpi-update"
Earlier versions of raspbian do not have rpi-update installed by default.
-
@AlexMurphy Yes it's now in the repo. So DS4 works out of the box if all updates are installed. The only thing not working on the Pi is rumble. It does on my PC. So I read through kernel changelogs. 4.10 supports rumble.
-
@zeldalate Yes it's possible. Just read through the drivers source. The default behavior ist to assign the same colors the PS4 does. With the exception that a real PS4 remembers which controller has which number. The Linux kernel just uses the connection order.
Under /sys/class/leds/ you find a folder for every LED and one to toggle them. (red/green/blue/global)
It looks something like this: 0005:054C:05C4.0005:blueLet's set it to pink at full brightness:
sudo -i
cd /sys/class/leds
echo 245 > 0005:054C:05C4.0005:red/brightness
echo 17 > 0005:054C:05C4.0005:green/brightness
echo 230 > 0005:054C:05C4.0005:blue/brightnessTo turn them off:
echo 0 > 0005:054C:05C4.0005:global/brightnessTo turn them on again to the last set color:
echo 1 > 0005:054C:05C4.0005:global/brightness -
@mosi0815 that is some great infos there! Gonna try that out next week as I had a lot of problems with the ds4drv
-
@mosi0815 thanks for the reply I will test that out soon. It makes perfect sense to me sounds simple enough. Is echo 1 to enable and echo 0 off? Nvm ill try it out tomorrow if I can.
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.