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 initializing SDL! Wayland not available

    Scheduled Pinned Locked Moved Help and Support
    pi 5sdlwayland
    20 Posts 6 Posters 10.8k 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
      dirtykid
      last edited by

      Sorry if this has been posted before, I searched the forum and didn't find it. I'm brand new to Raspberry Pi and got the Pi 5 for my son. I am trying to set up RetroPie. I followed the command line code on GitHub and got the following error after the reboot when typing emulationstation in the terminal.

      “error initializing SDL! Wayland not available”
      Renderer failed to initialize!
      Window failed to initialize!

      Just wondering how to solve this error.

      thanks for all the support!

      1 Reply Last reply Reply Quote 0
      • windgW
        windg
        last edited by

        You have to install RetroPie on top of Pi OS Bookworm Lite 64 bit with the help of this guide : https://retropie.org.uk/docs/Manual-Installation/ . Did you follow this procedure ? If not then maybe this is why you have this issue.

        My English isn't at a good level.

        D 1 Reply Last reply Reply Quote 0
        • D
          dirtykid @windg
          last edited by

          @windg

          I followed this link exactly.

          1 Reply Last reply Reply Quote 0
          • windgW
            windg
            last edited by

            I can't confirm this issue. I just did a clean install and all core packages install without issues.

            My English isn't at a good level.

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

              Support for the Pi5 is still pending in RetroPie and some issues are to be expected. Are you launching EmulationStation from the desktop environment ?

              What's the version of SDL you have installed ? You can query it by running dpkg -l | grep libsdl2 from the command line.

              1 Reply Last reply Reply Quote 0
              • N
                nick81
                last edited by

                I'm getting the exact same issue.

                This is what I've done so far:

                Fresh install of Raspberry PI OS 64bit for Pi5, the recommended one.
                Updated everything
                Installed RetroPie following these steps: https://retropie.org.uk/docs/Manual-Installation/
                Tried to run emulationstation

                Get this error:

                “error initializing SDL! Wayland not available”
                Renderer failed to initialize!
                Window failed to initialize!

                I've gone into the advanced settings of raspi-config and i have made sure wayland is on, which it is.

                Any help would be appreciated, I'm new to all this so please co easy on me

                ii  libsdl2-2.0-0:arm64                  2.26.3+1rpi                         arm                                                 64        Simple DirectMedia Layer
                hi  libsdl2-dev:arm64                    2.26.3+1rpi                         arm                                                 64        Simple DirectMedia Layer development files
                ii  libsdl2-gfx-1.0-0:arm64              1.0.4+dfsg-4+b1                     arm                                                 64        drawing and graphical effects extension for SDL2
                ii  libsdl2-image-2.0-0:arm64            2.6.3+dfsg-1                        arm                                                 64        Image loading library for Simple DirectMedia Layer 2, libraries
                ii  libsdl2-mixer-2.0-0:arm64            2.6.2+dfsg-2                        arm                                                 64        Mixer library for Simple DirectMedia Layer 2, libraries
                ii  libsdl2-ttf-2.0-0:arm64              2.20.1+dfsg-2                       arm                                                 64        TrueType Font library for Simple DirectMedia Layer 2, libraries
                
                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @nick81
                  last edited by

                  @nick81 said in error initializing SDL! Wayland not available:

                  I've gone into the advanced settings of raspi-config and i have made sure wayland is on, which it is.

                  This is not needed. Same question as before - are you launching EmulationStation from the desktop environment ?

                  N 1 Reply Last reply Reply Quote 0
                  • N
                    nick81 @mitu
                    last edited by nick81

                    @mitu yeah, from the terminal within raspberry Pi OS.

                    I have just noticed that i had an update available but it keeps failing with this error:

                    libsdl2-dev: Depends: libsdl2-2.0-0 (=2.26.3+1rpi) but 2.26.5+dfsg-1 is to be installed

                    Not sure if the issues are related at all.

                    Any ideas please ? :)

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

                      @nick81 said in error initializing SDL! Wayland not available:

                      @mitu yeah, from the terminal within raspberry Pi OS.

                      As @windg noted before, and it's also outlined in the documentation, this is not a supported configuration. Exit/stop the desktop environment and launch EmulationStation from the console terminal.

                      N 2 Replies Last reply Reply Quote 0
                      • N
                        nick81 @mitu
                        last edited by

                        @mitu sorry Mitu, noobie here. How do i do that? :)

                        1 Reply Last reply Reply Quote 0
                        • N
                          nick81 @mitu
                          last edited by

                          @mitu I've figured it out! it's CTRL +ALT + F1, then i ran emulationstation and it's working!!! Thanks very much!

                          D AshpoolA mituM 3 Replies Last reply Reply Quote 0
                          • D
                            dirtykid @nick81
                            last edited by

                            @nick81 Sweet yup this is what I needed! Got it working!

                            Thank you!

                            P 1 Reply Last reply Reply Quote 0
                            • P
                              pi_pilot @dirtykid
                              last edited by pi_pilot

                              @dirtykid @nick81 @mitu @windg

                              Great work folks. I got it working too after quitting the wayland desktop environment.

                              @nick81 "I've figured it out! it's CTRL +ALT + F1, then i ran emulationstation and it's working!!! Thanks very much!" Bonza!

                              Pretty cool as I copied my old Buster roms folder over to the bookworm image in the desktop environment, quit wayland, launched emulationstation and there they all were.

                              I am running the following GPIO arcade deck and am having trouble getting GPIOnext setup.

                              I have a usb gamepad and that is working ok.

                              But how do I get this dual arcade stick working that recommends GPIOnext ?

                              https://www.jaycar.com.au/raspberry-pi-retro-arcade-game-console-with-hdmi-port/p/XC9062

                              Instruction Manual: https://www.jaycar.com.au/medias/sys_master/images/images/10072126095390/XC9062-manualMain.pdf

                              Or is there a better driver/setup I can use ?

                              I have updated the retropie setup script, is there another package I should be installing ?

                              Note: I am also attempting to get RetroPie running in vertical mode, but when I ~CTRL +ALT + F1~ it reverts to landscape.
                              I have set the Display settings to rotate right in the desktop environment.

                              P 1 Reply Last reply Reply Quote 0
                              • AshpoolA
                                Ashpool @nick81
                                last edited by

                                @nick81 Just FYI - that is just opening a virtual console (in debian there are 7 of 'em - F7 would be the one the desktop environment runs in) and not shuting down the desktop.
                                If it is just retropie you may want to run on that install, selecting boot to cli from the raspberry config would IMHO be the better option.

                                P.S.: Btw. that is exactly the reason why it is recommended to use the Lite Version (64bit for the Pi5) of the OS, as that one doesn't include a preinstalled Desktop Environment (In the Raspberry Pi Imager, it can be found under "Raspberry Pi OS (other)" [It's not on the root-level of the OS selection menu]).

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

                                  @nick81 said in error initializing SDL! Wayland not available:

                                  @mitu I've figured it out! it's CTRL +ALT + F1, then i ran emulationstation and it's working!!! Thanks very much!

                                  This only works until the next reboot, when the desktop environment will start again. You need to disable the login manager by running

                                  systemctl set-default multi-user.target
                                  

                                  It doesn't seem you've carefully read the documentation, since it's outlined specifically that RetroPie is not supported on a desktop environment and you need to start from a RaspiOS Lite image, not the full RaspiOS image.

                                  P 1 Reply Last reply Reply Quote 0
                                  • P
                                    pi_pilot @mitu
                                    last edited by pi_pilot

                                    @mitu I like having access to the desktop environment prior to launching emulation station.

                                    I have a few other issues to deal with as well. See above reply.

                                    Scenario is a retro arcade party and some one suggests a game, you can just reboot back to the desktop environment, open firefox, download the rom, and place it in your roms folder, then quit the desktop environment, launch emulationstation and the new game is there.

                                    Edit: Bottom line is - will I get better performance (eg; less tearing and lag) on resource intensive games like Twinkle Star Sprites on a PI4B by running Bookworm rather than Buster given the updates in Bookworm 64bit ?

                                    AshpoolA P 2 Replies Last reply Reply Quote 0
                                    • AshpoolA
                                      Ashpool @pi_pilot
                                      last edited by Ashpool

                                      @pi_pilot said in error initializing SDL! Wayland not available:

                                      you can just reboot back to the desktop environment

                                      As I mentioned in my above post: alt+ctrl+F1-7 is just switching between the virtual consoles offered by the OS - the desktop runs in Slot7, so if you switch to VCon1 via alt+ctrl+F1, the desktop isn't really closed/exited/shut-down - you can simply switch back to it via alt+ctrl+F7 (no reboot required). But that is IMHO an environment, which under retropie context, opens up just to many can-of-worms of possible errors.

                                      [Edit: IMHO better way is to boot to the cli, starting the desktop via wayfire-pi/startx (depending whether you want wayland or x) and (important enabled whence configuring the keyboard) shut down the DE again with ctrl+alt+backspace]

                                      P 1 Reply Last reply Reply Quote 1
                                      • P
                                        pi_pilot @Ashpool
                                        last edited by pi_pilot

                                        @Ashpool thanks for the tip on

                                        @Ashpool said in error initializing SDL! Wayland not available:

                                        alt+ctrl+F7 ~ switch to desktop environment.

                                        @Ashpool said in error initializing SDL! Wayland not available:

                                        alt+ctrl+F1 ~ switch to command line interface

                                        1 Reply Last reply Reply Quote 0
                                        • P
                                          pi_pilot @pi_pilot
                                          last edited by pi_pilot

                                          @pi_pilot said in error initializing SDL! Wayland not available:
                                          > Edit: Bottom line is - will I get better performance with emulationstation/retropie (eg; less tearing and lag) on resource intensive games like Twinkle Star Sprites on a PI4B by running Bookworm rather than Buster given the updates in Bookworm 64bit ?

                                          1 Reply Last reply Reply Quote 0
                                          • P
                                            pi_pilot @pi_pilot
                                            last edited by pi_pilot

                                            @pi_pilot Update:

                                            So I got the system running in vertical (portrait) mode on my Pi4B, with a few tweaks booting from the Bookworm Desktop (not lite), and got GPIOnext running too.

                                            First to GPIOnext for my dual stick arcade controller, I needed to install evdev which after a few goes got it all setup.

                                            6 Button Controller setup is as follows

                                            3 5 6
                                            2 1 4

                                            Works good for Hyper Olympics.

                                            For EmulationStation I have to launch using the following launch parameters after exiting wayland to terminal (ctr-alt-F1) ...

                                            emulationstation --screensize 1080 1920 --screenrotate 1

                                            Once launched into emulationstation I went into the retroarch menu and set

                                            settings->video->output->video->screenresolution->1920x1080
                                            AND
                                            settings->video->output->video->videorotation->270
                                            AND
                                            settings->video->output->video->aspectratio->16:9

                                            Important! Remember to go back to the main menu in the retroarch dialogue and go to configuration and save configuration, so that changes you made are written to the retroarch config file.

                                            It stretches all games to full screen on my monitor but I can live with that.

                                            Performance does seem a bit better compared to the standard buster release of retropie.

                                            New thread here:

                                            https://retropie.org.uk/forum/topic/34969/launching-retropie-emulationstation-from-bookworm-desktop-not-lite-vertical-portrait-mode-gpionext

                                            1 Reply Last reply Reply Quote 0
                                            • P pi_pilot referenced this topic on
                                            • S SunGautam referenced this topic on
                                            • 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.