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

    Error creating SDL window!

    Scheduled Pinned Locked Moved Help and Support
    sdl windowinitialize eglopengl
    7 Posts 2 Posters 5.4k 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.
    • O
      OJ1977
      last edited by

      Hi all, I recently decided to create a new retropie setup on a larger SD card and have had nothing but trouble with the latest image. Upon boot I am kicked out of retropie intro screen and receive the following error:

      Error creating SDL window!
      Could not initialise EGL
      Renderer failed to initialize!
      Window failed to initialise!

      Tech Specs:
      System - Raspberry PI4 8gig
      Power - Official power supply
      Keyboard - Official keyboard
      PI case - retroflag (PI removed from case to make sure this is not an issue)
      Connecting to HDTV via HDMI

      SD Preperation:
      SD Card - Sandusky Ultra 128gig
      SD card access - micro SD to USB adapter sdhc sdxc compatible
      Computer System - Windows 7 PC
      Repartitioned with Partition Manager
      Reformatted with recommended SD card formatter

      Imaging:
      Retropie version - Img file - retropie-buster-4.8-rpi4_400.img. Latest release from Retropie website - extracted with 7zip to img file.

      Once I received the initialize error I plugged the sd card back into my PC and edited the the config document and uncommented the following by removing the preceding hash symbol #:

      dtoverlay=vc4-fkms-v3doverscan_scale=1

      With this uncommented I am able to boot up into retropie but still get warnings that I am using the Experimental OpenGL driver.

      Strange thing is that if I turn off the experimental opengl driver the dtoverlay text in the config document gets recommented (preceding # symbol comes back) and pi reverts back to the Error Creating SDL window! Problem again.

      It’s almost as if the image is designed for desktop environments, rather than the raspberry pi4 - this is pure speculation.

      Questions:

      How is the dtoverlay text i I commented from the config file linked to the SDL / EGL errors, and why, when uncommented, does this allow retropie to load up?

      Have I missed a step to get the pi and running?

      By default, should the experimental OpenGL driver be on?

      Final notes:

      This error occurs on all three micro sd cards I own. One of which worked perfectly well on an older version of retropie…until I Reimaged it with retropie-buster 4.8 (same error).

      Thanks I’m advance for any help, and feel free to weigh in on this issue from any angle that might provide resolution.

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

        How is the dtoverlay text i I commented from the config file linked to the SDL / EGL errors, and why, when uncommented, does this allow retropie to load up?

        The RetroPIe image has the line uncommented - are you sure you haven't run any additional scripts (for the Retroflag case maybe) that modified the config.txt file ?

        Have I missed a step to get the pi and running?

        No, the image should work out-of-the box without any extra configuration.

        By default, should the experimental OpenGL driver be on?

        On a Pi4, yes.

        O 1 Reply Last reply Reply Quote 0
        • O
          OJ1977 @mitu
          last edited by

          @mitu This error has occurred on all three of my sd CARDS. In each case I wrote a fresh image to the SD card and installed retropie as a new installation - the error shows up on first boot, straight after a succsessful image write with Etcher. Also, In order to rule out any issues the retroflag case might cause, I removed the case and all of the connections so I had the base PI, power supply, Keyboard, and controller.

          This makes no sense to me, and I'm struggling to even think of any logical reason why this might happen.

          Even though I still get the open GL is enabled warning, the PI seems to be fine and it has played everything i have installed.

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

            Post your config.txt file, from the image you're writing.

            O 1 Reply Last reply Reply Quote 0
            • O
              OJ1977 @mitu
              last edited by mitu

              @mitu here is the config.txt information:

              # For more options and information see
              # http://rpf.io/configtxt
              # Some settings may impact device functionality. See link above for details
              
              # uncomment if you get no picture on HDMI for a default "safe" mode
              #hdmi_safe=1
              
              # uncomment this if your display has a black border of unused pixels visible
              # and your display can output without overscan
              #disable_overscan=1
              
              # uncomment the following to adjust overscan. Use positive numbers if console
              # goes off screen, and negative if there is too much border
              #overscan_left=16
              #overscan_right=16
              #overscan_top=16
              #overscan_bottom=16
              
              # uncomment to force a console size. By default it will be display's size minus
              # overscan.
              #framebuffer_width=1280
              #framebuffer_height=720
              
              # uncomment if hdmi display is not detected and composite is being output
              #hdmi_force_hotplug=1
              
              # uncomment to force a specific HDMI mode (this will force VGA)
              #hdmi_group=1
              #hdmi_mode=1
              
              # uncomment to force a HDMI mode rather than DVI. This can make audio work in
              # DMT (computer monitor) modes
              #hdmi_drive=2
              
              # uncomment to increase signal to HDMI, if you have interference, blanking, or
              # no display
              #config_hdmi_boost=4
              
              # uncomment for composite PAL
              #sdtv_mode=2
              
              #uncomment to overclock the arm. 700 MHz is the default.
              #arm_freq=800
              
              # Uncomment some or all of these to enable the optional hardware interfaces
              #dtparam=i2c_arm=on
              #dtparam=i2s=on
              #dtparam=spi=on
              
              # Uncomment this to enable infrared communication.
              #dtoverlay=gpio-ir,gpio_pin=17
              #dtoverlay=gpio-ir-tx,gpio_pin=18
              
              # Additional overlays and parameters are documented /boot/overlays/README
              
              # Enable audio (loads snd_bcm2835)
              dtparam=audio=on
              
              [pi4]
              # Enable DRM VC4 V3D driver on top of the dispmanx display stack
              #dtoverlay=vc4-fkms-v3d
              max_framebuffers=2
              
              [all]
              dtoverlay=vc4-fkms-v3d
              overscan_scale=1
              # Overlay setup for proper powercut, needed for Retroflag cases
              dtoverlay=gpio-poweroff,gpiopin=4,active_low=1,input=1
              

              I removed the # symbol from just before the dtoverlay=vc4-fkms-v3d overscan_scale=1 line as seen above in the [all] section. By removing the # symbol the PI boots correctly; with the # symbol the PI will not start retropie and generates the SDL window error.

              Thanks for your help.

              O mituM 2 Replies Last reply Reply Quote 0
              • O
                OJ1977 @OJ1977
                last edited by OJ1977

                @OJ1977

                OK, i think I have resolved the issue.

                Upon all fresh installs I recieved the SDL window error.

                I ran sudo raspi-config and manually selected the Fake KMS driver - without manually changing it retropie would not start.

                Thanks for your help regardin gthis issue. OJ

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

                  @OJ1977 said in Error creating SDL window!:

                  here is the config.txt information:
                  ...

                  This is not the config.txt present on the RetroPie Pi4 image.
                  As I said before, the config.txt on the RetroPie image already has the lines:

                  ...
                  
                  [pi4]
                  # Enable DRM VC4 V3D driver on top of the dispmanx display stack
                  dtoverlay=vc4-fkms-v3d
                  max_framebuffers=2
                  

                  Judging from the extra lines added at the end, I assume you're either using a RetroFlag/3rd party modified image or some additional scripts from RetroFlag have been run and have modified the config.txt.

                  1 Reply Last reply Reply Quote 1
                  • 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.