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

    [SOLVED] EmulationStation crash after turning off DS4/PS4 controller

    Scheduled Pinned Locked Moved Help and Support
    ds4 bluetoothubuntu 18.04ds4crash
    20 Posts 2 Posters 1.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.
    • P
      Panja
      last edited by Panja

      Since one of the latest releases of RetroPie I'm having problems with my DualShock 4 controllers. When I turn them off, EmulationStation crashes.

      How to reproduce:

      • Start machine
      • Turn on DualShock 4 controller and let it connect
      • Start a game through RetroArch or any other emulator (Redream for instance)
      • Exit game
      • Turn off controller (10 sec press on the PS button)

      alt text

      This only occurs after running a game.
      If I start the machine, turn controller on and turn it off (without starting a game) there is no crash.
      Of course I've ran the ResetRomDirs command and also changed back to the Carbon theme.

      Setup:
      Ubuntu 18.04.2 LTS (GNU/Linux 4.18.0-25-generic x86_64)
      RetroPie v4.5 - commit 35555bc (had this problem on RP v4.4.16 as well)
      Machine: Intel NUC7i5BNK
      Processor: i5 7260U
      Ram: 8GB
      GFX: Intel Iris Plus Graphics 640
      Controller: 2x official Playstation DualShock 4 connected through Bluetooth

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Looks like this bug, triggered by a the new SDL version. What's your SDL version ? You can find out by running

         dpkg -l | grep libsdl2-2.0.0
        
        P 1 Reply Last reply Reply Quote 0
        • P
          Panja @mitu
          last edited by

          @mitu

          Do you ever sleep? ;-)
          Thanks for replying!

          SDL:

          ii  libsdl2-2.0-0:amd64                   2.0.9+1                                     amd64        Simple DirectMedia Layer
          
          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by

            This is not the distro provided SDL, otherwise I'm thinking you should have hit this bug before. Ubuntu 18.04 comes with SDL 2.0.8 - did you upgrade it manually to 2.0.9 ?
            On my Ubuntu updated system, the output of the command is

             dpkg -l | grep libsdl2-2.0.0
            ii  libsdl2-2.0-0:amd64                        2.0.8+dfsg1-1ubuntu1.18.04.3                 amd64        Simple DirectMedia Layer
            
            1 Reply Last reply Reply Quote 0
            • P
              Panja
              last edited by Panja

              I had to change SDL version when I tried the PS2 (PCSX2) emulator.
              After that I ran the ./retropie_packages.sh sdl command.
              After that I ran the ./retropie_packages.sh sdl2 command.
              That's probably why I'm running a different version?

              Would downgrading be a fix/workaround?

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @Panja
                last edited by mitu

                After that I ran the ./retropie_packages.sh sdl command.

                That will install the sdl1 packages, not the sdl2 packages. Reinstall you distro packages and try again.

                1 Reply Last reply Reply Quote 0
                • P
                  Panja
                  last edited by Panja

                  Sorry, I meant ./retropie_packages.sh sdl2
                  I've not installed sdl 1 (forgot to type the 2).

                  @mitu said in EmulationStation crash after turning off DS4/PS4 controller:

                  Reinstall you distro packages and try again.

                  Could you please elaborate how?

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @Panja
                    last edited by

                    @Panja said in EmulationStation crash after turning off DS4/PS4 controller:

                    Could you please elaborate how?

                    Try

                    sudo apt install --reinstall libsdl2-2.0.0
                    
                    1 Reply Last reply Reply Quote 0
                    • P
                      Panja
                      last edited by

                      @mitu

                      Note, selecting 'libsdl2-2.0-0' for regex 'libsdl2-2.0.0'
                      Reinstallation of libsdl2-2.0-0 is not possible, it cannot be downloaded.
                      
                      mituM 1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @Panja
                        last edited by

                        @Panja Do you have any custom repositories added ? Run an apt-get update before trying the re-install.

                        1 Reply Last reply Reply Quote 0
                        • P
                          Panja
                          last edited by

                          @mitu
                          I have the following repo's added:
                          ubuntu-x-swat
                          ubuntu Universe

                          Apt update has been run of course.

                          mituM 1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @Panja
                            last edited by

                            @Panja Then there's a problem with one of your extra repositories - leave just the Ubuntu ones, update and re-try.

                            1 Reply Last reply Reply Quote 0
                            • P
                              Panja
                              last edited by

                              @mitu

                              I have disabled both the repo's but still cannot re-install SDL.

                              mituM 1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator @Panja
                                last edited by

                                @Panja Can you install any other package ? What's the output of:

                                 apt-cache policy libsdl2-2.0-0
                                
                                P 1 Reply Last reply Reply Quote 0
                                • P
                                  Panja @mitu
                                  last edited by

                                  @mitu

                                  Yes, installing other packages is no problem.

                                  libsdl2-2.0-0:
                                    Installed: 2.0.9+1
                                    Candidate: 2.0.9+1
                                    Version table:
                                   *** 2.0.9+1 100
                                          100 /var/lib/dpkg/status
                                       2.0.8+dfsg1-1ubuntu1.18.04.3 500
                                          500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
                                       2.0.8+dfsg1-1ubuntu1 500
                                          500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
                                  
                                  mituM 1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator @Panja
                                    last edited by mitu

                                    @Panja Try

                                    sudo apt-get install --reinstall libsdl2-2.0-0=2.0.8+dfsg1-1ubuntu1.18.04.3
                                    

                                    or download the package directly and install it with dpkg -i <pkg.deb>.

                                    1 Reply Last reply Reply Quote 0
                                    • P
                                      Panja
                                      last edited by

                                      @mitu

                                      Some packages could not be installed. This may mean that you have
                                      requested an impossible situation or if you are using the unstable
                                      distribution that some required packages have not yet been created
                                      or been moved out of Incoming.
                                      The following information may help to resolve the situation:
                                      
                                      The following packages have unmet dependencies:
                                       libsdl2-dev : Depends: libsdl2-2.0-0 (= 2.0.9+1) but 2.0.8+dfsg1-1ubuntu1.18.04.3 is to be installed
                                      E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
                                      
                                      mituM 1 Reply Last reply Reply Quote 0
                                      • mituM
                                        mitu Global Moderator @Panja
                                        last edited by

                                        @Panja Remove the -dev package, you can install it later on from the repository.

                                        1 Reply Last reply Reply Quote 0
                                        • P
                                          Panja
                                          last edited by Panja

                                          @mitu

                                          sudo apt remove libsdl2-dev
                                          sudo apt-get install --reinstall libsdl2-2.0-0=2.0.8+dfsg1-1ubuntu1.18.04.3
                                          sudo apt install libsdl2-dev
                                          

                                          I now have:

                                          ii  libsdl2-2.0-0:amd64                   2.0.8+dfsg1-1ubuntu1.18.04.3                amd64        Simple DirectMedia Layer
                                          

                                          Gonna have a try with the controllers later on, when I'm actually at the machine itself.
                                          Will report back!

                                          1 Reply Last reply Reply Quote 0
                                          • P
                                            Panja
                                            last edited by

                                            @mitu

                                            I can confirm: downgrading SDL to v2.0.8 solved my problem!
                                            Thanks for the help, as always. :-)

                                            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.