RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    DualsShock 4 Solution

    Scheduled Pinned Locked Moved Help and Support
    ds4dualshock 4ds4drvplaystation 4controller
    11 Posts 4 Posters 3.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mosi0815
      last edited by

      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/1511855

      It 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-update

      This 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

      AlexMurphyA Z 2 Replies Last reply Reply Quote 2
      • AlexMurphyA
        AlexMurphy Banned @mosi0815
        last edited by

        @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.

        1 Reply Last reply Reply Quote 2
        • M
          mosi0815
          last edited by

          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. :)

          AlexMurphyA DarkWolfD Z 3 Replies Last reply Reply Quote 0
          • AlexMurphyA
            AlexMurphy Banned @mosi0815
            last edited by AlexMurphy

            @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.

            M 1 Reply Last reply Reply Quote 1
            • DarkWolfD
              DarkWolf @mosi0815
              last edited by

              @mosi0815 I had no problems using a ds4 controller via bluetooth... First connected some weeks ago

              System: Raspberry 3 Model B, RetroPie 4.2.1
              Storage: 16gb Micro SD, 64gb USB Drive
              Theme: Updated NBBA

              Documentation solves many problems: https://retropie.org.uk/docs/

              1 Reply Last reply Reply Quote 0
              • Z
                zeldalate @mosi0815
                last edited by

                @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.

                M 1 Reply Last reply Reply Quote 0
                • Z
                  zeldalate @mosi0815
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mosi0815 @AlexMurphy
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • M
                      mosi0815 @zeldalate
                      last edited by mosi0815

                      @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:blue

                      Let'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/brightness

                      To turn them off:
                      echo 0 > 0005:054C:05C4.0005:global/brightness

                      To turn them on again to the last set color:
                      echo 1 > 0005:054C:05C4.0005:global/brightness

                      DarkWolfD Z 2 Replies Last reply Reply Quote 1
                      • DarkWolfD
                        DarkWolf @mosi0815
                        last edited by

                        @mosi0815 that is some great infos there! Gonna try that out next week as I had a lot of problems with the ds4drv

                        System: Raspberry 3 Model B, RetroPie 4.2.1
                        Storage: 16gb Micro SD, 64gb USB Drive
                        Theme: Updated NBBA

                        Documentation solves many problems: https://retropie.org.uk/docs/

                        1 Reply Last reply Reply Quote 0
                        • Z
                          zeldalate @mosi0815
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          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.