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

    Ubuntu 20.04 EmulationStation crash after turning off DS4/PS4 controller

    Scheduled Pinned Locked Moved Help and Support
    ps4 controller
    6 Posts 2 Posters 1.0k 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.
    • D
      depawlur
      last edited by

      I found similar thread from 2019, but it doesn't help me with the same problem

      My rig is Ubuntu 20.04

      • 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)
        dQE1wi3.png

      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 20.04.4 LTS (5.12.0-051200rc2-generic)
      RetroPie v4.7.9 commit: e54b8fa
      Machine: Lenovo Tiny
      Processor: Intel(R) Core(TM) i5-6500
      Ram: 8GB
      GFX: Intel Iris Plus Graphics 640
      Controller: 2x official Playstation DualShock 4 connected through Bluetooth

      for reference:
      Re: [SOLVED] EmulationStation crash after turning off DS4/PS4 controller

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

        Run EmulationStation with the --debug parameter from a terminal, reproduce the issue and then upload the log file ($HOME/.emulationstation/es_log.txt) to pastebin.com to take a look.

        D 1 Reply Last reply Reply Quote 0
        • D
          depawlur @mitu
          last edited by depawlur

          Hey @mitu,

          apologies for the delay, here's the pasebin: https://pastebin.com/mhsvTcNu

          so, interestingly if I launch the game, then exit, then go and re-configure ps4 controller, then poiwer it off, I get:
          Mar 13 01:34:00 lvl1: ...launch terminated with nonzero exit code 256!

          Let me know if you want me to get that debug log as well.

          I tested similar behavior with other controller (some chinese knock off that emulates xbox360 controller) and it didn't crash.

          Thank you

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

            This looks similar to this issue, which is triggered by libSDL sending the some extra centering events after the disconnect. The bug was reported upstream here, and looks like it was solved on 04.2020, which makes me think the libSDL version in Ubuntu 20.04 doesn't have this fix.
            On a Raspberry Pi, RetroPie uses a libSDL version which contains a fix for this issue (and a few others), but on Ubuntu it uses the system's package. You may try to install a newer libSDL version (2.0.14) separately and test EmulationStation with that version if you can, to see if you can still reproduce the problem.

            D 1 Reply Last reply Reply Quote 0
            • D
              depawlur @mitu
              last edited by

              @mitu
              How do I properly install it?

              also what package is that?
              libSDL or libSDL-dev?

              also is it libSDL or libsdl2?

              sorry, appreciate your help.

              I followed instructions here, tried to install from ubuntu repo as well as compiled it, but same effect for me.

              Thanks!

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

                @depawlur said in Ubuntu 20.04 EmulationStation crash after turning off DS4/PS4 controller:

                How do I properly install it?
                also what package is that?
                libSDL or libSDL-dev?
                also is it libSDL or libsdl2?

                The package in the Ubuntu version you're using does not have the bug fixed. I see that Ubuntu 21.04 (the upcoming version) will have a newer version with the fix I was mentioning before.
                You can install it from source, but if it's not something you've done before, I'd say wait for the new Ubuntu version. libsdl2 uses the traditional ./configure; make; make install installation process, common for many open source projects.

                You should look into why your controller disconnects - maybe there's an issue with it or the connection to your system.

                I followed instructions here, tried to install from ubuntu repo as well as compiled it, but same effect for me.

                We don't have instructions for building SDL, if you're referring to the RetroPie install instructions, then I don't think it's any difference how you make the installatio - on a PC the RetroPie packages are always installed from source.

                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.