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

    RetroPie v4.8, SDL 2.0.20: EmulationStation unable to create window

    Scheduled Pinned Locked Moved Help and Support
    sdl2emulationstaion
    6 Posts 2 Posters 1.3k 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.
    • F
      FranceMSR
      last edited by FranceMSR

      Hi all, installed RetroPie v4.8 from scratch on Raspberry Pi v4. For my emulator I need to use SDL 2.0.20 for a good support of OpenGLES and GLSL.

      So I removed installed SDL2 with

      sudo apt remove --purge libsdl2-2.0-0 libsdl2-dev
      

      then built SDL2 from source code. My emulator works as expected (it runs from terminal without X11) but EmulationStation won't start.

      SDL built with

      ../configure
      

      and also with

      ../configure --enable-video-kmsdrm --enable-video-opengles --enable-video-opengl
      

      and also with

      ../configure --enable-video-kmsdrm --enable-video-opengles --enable-video-opengl --enable-video-rpi --enable-video-x11
      

      but nothing changes. The error is this:

      Can't load EGL/GL library on window creation
      

      With SDL 2.0.20 GL and GLSL versions are these:

      GL: OpenGL ES 3.1 Mesa 19.3.2
      GLSL: OpenGL ES GLSL ES 3.10
      

      So, why EmulationStation won't start and why don't you pre-install SDL 2.0.20 that has a big improvement on KMSDRM?

      UPDATE:
      Tried to remove then build EmulationStation from source, nothing changes

      BuZzB 1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators @FranceMSR
        last edited by BuZz

        @FranceMSR There are issues with SDL 2.0.20 which is why we haven't switched to it. We have a number of fixes against the code in our fork also. We also do some changes during the building in regards to dependencies and some workarounds - you can apply the changes from this and build it from our fork if you like https://github.com/RetroPie/RetroPie-Setup/pull/3390/files

        Some software (eg darkplaces quake) won't work though due to issues with the kmsdrm backend - https://github.com/libsdl-org/SDL/issues/5399

        This is another issue (But we have a fix for this in our repo) https://github.com/libsdl-org/SDL/issues/5348

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        F 2 Replies Last reply Reply Quote 0
        • F
          FranceMSR @BuZz
          last edited by

          @BuZz said in RetroPie v4.8, SDL 2.0.20: EmulationStation unable to create window:

          @FranceMSR There are issues with SDL 2.0.20 which is why we haven't switched to it. We have a number of fixes against the code in our fork also. We also do some changes during the building in regards to dependencies and some workarounds - you can apply the changes from this and build it from our fork if you like https://github.com/RetroPie/RetroPie-Setup/pull/3390/files

          Some software (eg darkplaces quake) won't work though due to issues with the kmsdrm backend - https://github.com/libsdl-org/SDL/issues/5399

          This is another issue (But we have a fix for this in our repo) https://github.com/libsdl-org/SDL/issues/5348

          Ok I made those changes in

          /home/pi/RetroPie-Setup/scriptmodules/supplementary/sdl2.sh
          

          then executed

          sudo /home/pi/RetroPie-Setup/retropie_packages.sh sdl2 install_bin
          

          Now both EmulationStation and my emulator work. Info about GL and GLSL show these values instead the previous reported ones:

          GL: 2.1 Mesa 19.3.2
          GLSL: 1.20
          

          I hope that I won't have problem in the future with OpenGL Shaders

          1 Reply Last reply Reply Quote 0
          • F
            FranceMSR @BuZz
            last edited by

            @BuZz said in RetroPie v4.8, SDL 2.0.20: EmulationStation unable to create window:
            ...you can apply the changes from this and build it from our fork if you like https://github.com/RetroPie/RetroPie-Setup/pull/3390/files

            Hi, here again. I made the same changes for a Raspberry Pi v3 and enabled fkms on config.txt (otherwise my emulator runs at 20 FPS). Now EmulationStation won't start with

            * failed to add service - already in use?
            

            Any tips? Thank you!

            F 1 Reply Last reply Reply Quote 0
            • F
              FranceMSR @FranceMSR
              last edited by

              @FranceMSR after the update of EmulationStation (from binary), followed by another installation of SDL 2.0.20 from RetroPie branch, now also my emulator runs slow (with or without fkms enabled in config.txt).

              What's wrong with Raspberry Pi 3?

              F 1 Reply Last reply Reply Quote 0
              • F
                FranceMSR @FranceMSR
                last edited by

                For who is interested, I have build Mesa 22.0.1, SDL 2.0.20 and EmulationStation from source code on latest Raspberry Pi OS Lite and all work as expected (Full KMS and other stuff)

                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.