Error create sdl window

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...

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

In my code, I had these things that would check if my code had errors in creating a SDL window, initializing GLEW, whatever. They would go off and my program would still work and in the guide I’m following, no errors went off what so ever. Can someone tell me what I’m doing wrong?

Also, the glClearColor() doesn’t seem to work. I think its related to the errors above.

My code:

// g++ `pkg-config --cflags glew sdl2` main.cpp `pkg-config --libs glew sdl2`
#include <GL/glew.h>
#include <SDL.h>
#include <iostream>
#include <string>

enum class GameState { PLAY, EXIT };

class MainGame
{
public:
    MainGame();
    ~MainGame();

    void run();

private:
    void initSystems();
    void gameLoop();
    void processInput();
    void drawGame();

    SDL_Window* _window;
    int _screenWidth;
    int _screenHeight;

    int _errorCount;

    GameState _gameState;
};

//Function To Display A Error Message When Something Doesnt Work As Inteded/Properly.
void fatalError(std::string errorMsg)
{
    std::cout << errorMsg << std::endl;
}

//When Called, Inits Most Of The Important Vars, Sets Game State And Does An Error Check
MainGame::MainGame()
{
    _errorCount = 0;
    _window = nullptr;
    _screenWidth = 1024;
    _screenHeight = 768;
    _gameState = GameState::PLAY;

    if (_window == nullptr) {
        fatalError("SDL Window Could Not Be Created.");
        _errorCount += 1;
    }

    SDL_GLContext glContext = SDL_GL_CreateContext(_window);

    if (glContext == nullptr) {
        fatalError("SDL_GL Context Could Not Be Created.");
        _errorCount += 1;
    }

    GLenum error = glewInit();

    if (error != GLEW_OK) {
        fatalError("Could Not Initialize Glew.");
        _errorCount += 1;
    }

    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

    glClearColor(0.0f, 1.0f, 1.0f, 1.0f);
}

MainGame::~MainGame()
{
}

void MainGame::run()
{
    initSystems();
    gameLoop();
}

// Initializes The SDL Window.
void MainGame::initSystems()
{
    SDL_Init(SDL_INIT_EVERYTHING);
    _window = SDL_CreateWindow("Game Engine", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, _screenWidth, _screenHeight, SDL_WINDOW_OPENGL);
}

void MainGame::gameLoop()
{
    while (_gameState != GameState::EXIT) {
        processInput();
        drawGame();
    }
}

void MainGame::processInput()
{
    SDL_Event evnt;
    while (SDL_PollEvent(&evnt) == true) {
        switch (evnt.type) {
        case SDL_QUIT:
            _gameState = GameState::EXIT;
            break;
        case  SDL_MOUSEMOTION:
            std::cout << evnt.motion.x << ", " << evnt.motion.y << "n";
            break;
        }
    }
}

void MainGame::drawGame()
{
    glClearDepth(1.0);
    glClear(GL_COLOR_BUFFER_BIT);
    glClear(GL_DEPTH_BUFFER_BIT);

    SDL_GL_SwapWindow(_window);
}

int main(int argc, char** argv)
{
    MainGame mainGame;
    mainGame.run();

    return 0;
}

  1. Ребят, судя по инструкции, то Retropie можно повверх установить? и запускать когда хочешь не удаляя в при этом основную ОС

    https://retropie.org.uk/docs/Manual-Installation/

    я правильно понял? и ромы можно так на прямую скачивать без ПК? обязательно нужен геймпад?

  2. Ставить на ос можно, ромы из интернета… не думаю…
    Геймпад можно заменить клавиатурой(но зачем)

  3. После установки и запуска выдает след ошибки

    lvl0: Error creating SDL window!
    Could not get EGL display
    lvl0: Renderer failed to initialize!
    lvl0: Window failed to initialize!

  4. Попробуйте

    sudo rpi-update

  5. Что-то у меня начала ОС тупить с ошибками грузится Exagear какой то , можно как нибудь ОС до начального состояния откатить?

I have manually installed RetroPie, using the terminal and some tutorials..
Finally ready to start everything up… and then get this error:

Error Creating SDL window!
Could not get EGL display
Renderer failed to initialize!
Window failed to initialize!

Then I changed the dtoverlay=vc4-kms-v3d code. Taking it off (and later also back on again in the config.txt.) Also Tried changing GL drivers.

Now the error is: * failed to add service — already in use?

What to do now?

asked May 9, 2020 at 5:56

Maurice L's user avatar

Maurice LMaurice L

212 silver badges4 bronze badges

0

Set the Pi to boot to command line only.

This can be done by selecting the option from the gui menu somehow (no gui handy at the mo) or via

sudo raspi-config

Select option 3 then B1 then B1 or B2 (I recommend to use a password).

Do not run the desktop.

Start retro-pi from the command line.

By the way, retro-pi have a very good set of support users at their own forum

answered May 9, 2020 at 17:49

User avatar

owatnext

Posts: 22
Joined: 21 Apr 2016, 22:35

Failed to create SDL window: Couldn’t find matching GLX

Hello
I am having an issue with this «GLX error.» From what I have gathered, I need to instal or enable some SDL module? I’m not sure exactly, but if that is the case, here is my SDL results of installed packages.

Code: Select all

pi@MorrowindPi:~ $ dpkg -l *libsdl*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  libsdl-1.3-0   <none>       <none>       (no description available)
ii  libsdl-image1. 1.2.12-5+b5  armhf        Image loading library for Simple 
ii  libsdl-mixer1. 1.2.12-11+b1 armhf        Mixer library for Simple DirectMe
ii  libsdl-ttf2.0- 2.0.11-3     armhf        TrueType Font library for Simple 
un  libsdl1.2      <none>       <none>       (no description available)
un  libsdl1.2-all  <none>       <none>       (no description available)
un  libsdl1.2-esd  <none>       <none>       (no description available)
un  libsdl1.2-nas  <none>       <none>       (no description available)
un  libsdl1.2-oss  <none>       <none>       (no description available)
ii  libsdl1.2debia 1.2.15-10+rp armhf        Simple DirectMedia Layer
un  libsdl1.2debia <none>       <none>       (no description available)
un  libsdl1.2debia <none>       <none>       (no description available)
un  libsdl1.2debia <none>       <none>       (no description available)
un  libsdl1.2debia <none>       <none>       (no description available)
un  libsdl1.2debia <none>       <none>       (no description available)
un  libsdl1.2debia <none>       <none>       (no description available)
ii  libsdl2-2.0-0: 2.0.4+dfsg2- armhf        Simple DirectMedia Layer
glxError.png

Sorry if this is broken up information, I’m just not really sure where to start. Any info you need, just ask and I will provide it. :)

User avatar

psi29a

Posts: 5275
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Failed to create SDL window: Couldn’t find matching GLX

Post

by psi29a » 24 Feb 2017, 11:33

What you forgot to mention and I had to infer from your dpkg list is that you are running on armhf.

There can a few things at play here:
* you don’t have an opengl stack
* your driver doesn’t expose the necessary GL bits
* if using debian’s builds of armhf, it is compiled against GLESv2 which won’t work

Can you give a bit more context here, including your platform?

User avatar

owatnext

Posts: 22
Joined: 21 Apr 2016, 22:35

Re: Failed to create SDL window: Couldn’t find matching GLX

Post

by owatnext » 24 Feb 2017, 15:09

Raspberry Pi model 3 B+
Raspbian Jessie, most up to date version.
I know there are problems with OpenMW and Debian/Raspberry Pis, but I have created exceptions in my preferences to allow it to download required packages in the form of a preferences file in /etc/apt/

User avatar

owatnext

Posts: 22
Joined: 21 Apr 2016, 22:35

Re: Failed to create SDL window: Couldn’t find matching GLX

Post

by owatnext » 24 Feb 2017, 22:05

psi29a wrote:So you’ve enabled the VC4 driver and run glxinfo to verify that VC4 is listed and not swrast or llvmpipe

No, I haven’t actually. I’ll try that as soon as I get the chance and I’ll keep you updated. Thanks :)

Update:
Alright, so I’ve tried enabling the driver via raspi-config, and it initially failed. I checked the terminal output and it appears that the programme had an issue with installing two unauthenticated packages, «compton libconfig9.»
So, I manually installed them, successfully at that. Then I didn’t have an issue enabling the driver (this one: G1 GL (Full KMS) OpenGL desktop driver with full KMS), so I did. Yet, even after that, I got the same error.

Here is the output of glxinfo, if that helps.

Spoiler: Show

glxgears runs fine, doesn’t drop below 60fps if that means anything. I should have checked before I tried enabling the driver :P
But if I recall properly from months ago, it did run. (Don’t quote me on that though.)

User avatar

owatnext

Posts: 22
Joined: 21 Apr 2016, 22:35

Re: Failed to create SDL window: Couldn’t find matching GLX

Post

by owatnext » 27 Feb 2017, 22:05

psi29a wrote:

Try looking at dmesg and see if you can spot anything VC4 related.

Code: Select all

[    3.495676] [drm] Initialized drm 1.1.0 20060810
[    3.615166] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[    3.615216] vc4_dsi 3f700000.dsi: DSI not set up by firmware.
[    3.615294] vc4-drm soc:gpu: bound 3f700000.dsi (ops vc4_dsi_ops [vc4])
[    3.615389] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[    3.615615] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    3.616661] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    3.616866] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[    3.616989] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])

Found this with dmesg.

I attempted to look at/modify my Xorg.conf file, but it wasn’t there under /etc/X11/, so I assumed I didn’t have Xorg installed. Installed Xorg successfully and attempted to generate the file, but I haven’t had any success in getting it to appear. Do I need to build any drivers/packages/et cetera? Sorry, I’m just not sure what to do next because everywhere that I am reading says to just enable it via raspi-config. But that didn’t work, unfortunately.

Spoiler: Show

shashank0129

Posts: 34
Joined: Sun Dec 18, 2016 5:03 pm

Emulation station

Hey guys,
I just installed retropie over the latest Jessie(pixel)build using this guide
http://blog.petrockblock.com/2012/07/22 … pberry-pi/
And selected basic install……
When I type emulationstation in the terminal as user pi I get the following error

Code: Select all

 lvl2: 	EmulationStation - v2.1.2rp, built Dec 20 2016 - 19:46:26
lvl2: 	Creating surface...
lvl0: 	Error creating SDL window!
	Could not get EGL display
lvl0: 	Renderer failed to initialize!
lvl0: 	Window failed to initialize!


User avatar

bensimmo

Posts: 5815
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Emulation station

Sat Jan 14, 2017 7:19 am

Binary install?

You could try updating everything to see if that solves the SDL problem (Raspian and Retropie)
You may want to look through the issues on the github where the script comes from.
Check Retropie website and forum for any info.



User avatar

bensimmo

Posts: 5815
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Emulation station

Sat Jan 14, 2017 7:26 am

You will know from the way you set it up, did you follow binary or source ?

You could just scrap it and use a RetroPie image.

I would guess binary…

Try the good old
Sudo apt-get update
Sudo apt-get dist-upgrade
Reboot and then into Retropie setup and get it to update all

I probably will probably not fixed or update much but worth a go while someone comes along that may know and you read around the RetroPie forum.

Last edited by bensimmo on Sat Jan 14, 2017 7:30 am, edited 1 time in total.


shashank0129

Posts: 34
Joined: Sun Dec 18, 2016 5:03 pm

Re: Emulation station

Sat Jan 14, 2017 7:30 am

Well I would lime to keep raspbian….
Anyway I followed the instructions on the above link and got a green with many options is selected basic install……
BTW I’m a noob….






shashank0129

Posts: 34
Joined: Sun Dec 18, 2016 5:03 pm

Re: Emulation station

Sat Jan 14, 2017 12:48 pm

Still getting the same error…..
And btw I couldn’t understand the last line «And drop to the terminal, exit out of pixel»
Thanks


User avatar

bensimmo

Posts: 5815
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Emulation station

Sat Jan 14, 2017 2:22 pm

shashank0129 wrote:

Still getting the same error…..
And btw I couldn’t understand the last line «And drop to the terminal, exit out of pixel»
Thanks

Are you at the desktop/windows ? (this is Pixel)
if so you need to goto shutdown and exit to the terminal/command line (it may well be logout now and then from there exit to the command line, I’ve forgotten).
and run it from there.

You do not start it from a Terminal window.


shashank0129

Posts: 34
Joined: Sun Dec 18, 2016 5:03 pm

Re: Emulation station

Sat Jan 14, 2017 4:26 pm

bensimmo wrote:

shashank0129 wrote:

Still getting the same error…..
And btw I couldn’t understand the last line «And drop to the terminal, exit out of pixel»
Thanks

Are you at the desktop/windows ? (this is Pixel)
if so you need to goto shutdown and exit to the terminal/command line (it may well be logout now and then from there exit to the command line, I’ve forgotten).
and run it from there.

You do not start it from a Terminal window.

Voilà solved!!!!
Had to logout first……..
Anyway I was wondering if I could make a script to launch it from the GUI/terminal…….
Thank you again!



Return to “Gaming”

Skip to content

GitLab

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert

  • /


  • Help

    • Help
    • Support
    • Community forum

    • Submit feedback
    • Contribute to GitLab

    • Switch to GitLab Next
    Projects
    Groups
    Snippets

  • Register

  • Sign in

Closed


Open


Issue created Oct 08, 2021 by digitalLumberjack@digitalLumberjackOwner

RPI2 — 7.3-Beta24 — Es cannot create SDL window

Quitting a game on RPI2 :

[2021/10/08 15:57:54.253] (ERROR) : [Renderer] Error creating SDL window!
	Could not create GLES window surface
[2021/10/08 15:57:54.258] (ERROR) : [Renderer] Error creating SDL window!
	Could not create GLES window surface
[2021/10/08 15:57:54.258] (ERROR) : [WindowManager] Renderer failed to initialize!

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error create offer csgo market
  • Error create new process failed минорити
  • Error create movie damagetext failed package ui5
  • Error create database cannot run inside a transaction block sql state 25001
  • Error create bitmap

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии