Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu: System error: Could not create SDL window #561

Open
neo-expert opened this issue Oct 13, 2018 · 7 comments
Open

Ubuntu: System error: Could not create SDL window #561

neo-expert opened this issue Oct 13, 2018 · 7 comments

Comments

@neo-expert
Copy link

OpenTomb compiles sucessfully, but after running "./OpenTomb" it says:
System error: Could not create SDL window. On Ubuntu and on Elementary OS.

what can I do?

@Gh0stBlade
Copy link
Member

Perhaps there's a driver issue on your system? Any further details about system specifications, driver versions and OS version should help someone else paint a bigger picture of what's going on here.

@kgorecki
Copy link

Most probably you don't have GLX visual set. Please check this solution: https://stackoverflow.com/questions/41338549/sdl2-cant-create-window-since-it-couldnt-find-matching-glx-visual
I think that some better error message would be good here, "Could not create SDL window" doesn't give you much info. What about using SDL_GetError() instead?

@RICCIARDI-Adrien
Copy link
Contributor

RICCIARDI-Adrien commented Nov 3, 2018

Hi,
Testing on an old Pentium 4 with a GeForce 6200 running Debian Testing I think I got the same error :

System error: Could not create SDL window: Couldn't find matching GLX visual

Error might be related to antialiasing, because when I disable this feature in config file (antialias = 0;), game starts and approximately works.

@kgorecki
Copy link

kgorecki commented Nov 4, 2018

Did you check default configuration with applied instructions from link above?

@neo-expert
Copy link
Author

Yeah with antialias = 0; it works now. Thank you very much.

But I have a bit more modern hardware:
Radeon HD 8970M with Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz

@kgorecki
Copy link

kgorecki commented Nov 4, 2018

It really starts without antialiassing. However I'd recommend to configure your OS properly. Typing 2 commands (3 if you don't have glxinfo by default) doesn't hurt. If you really deny to check the link, here's the instruction:
Ensure that GLX is installed correctly by running glxinfo. At the bottom, you'll find the list of supported visuals. Here's mine:

    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x022 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 16  0  0  0  0  0  0 0 None

Try running the following before running the SDL2 program:

export SDL_VIDEO_X11_VISUALID=

This causes SDL to go down a different code path to find the visual. You can also try hardcoding the visual to the visual id from glxinfo:

export SDL_VIDEO_X11_VISUALID=0x022

@RICCIARDI-Adrien
Copy link
Contributor

Hi,
I tried in an Ubuntu VM (because I have no more Pentium 4 at hand) with antialiasing enabled and got the
System error: Could not create SDL window: Couldn't find matching GLX visual error.

I then set the SDL_VIDEO_X11_VISUALID variable to an empty value (by executing export SDL_VIDEO_X11_VISUALID= command) and the game managed to start.

I have no problem when running the game on my Xubuntu PC with proprietary NVIDIA drivers. Does someone remember about recent changes to antialiasing code or something related ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants