Page 1 of 1

"Failed to create OpenGL context"

Posted: Mon Nov 06, 2023 4:24 pm
by mcgiwer
OS: Debian 13
Factorio version: 1.1.94 (Linux)
OpenGL and latest drivers installed: yes

Hello. I had just downloaded Factorio and after unpacking, I tryed to run it, I had recieven an output:

Code: Select all

 0.019 2023-11-06 16:20:29; Factorio 1.1.94 (build 61774, linux64, full)
   0.037 Operating system: Linux (Debian 13)
   0.037 Program arguments: "./factorio" 
   0.037 Config path: [trunchated_path]/config/config.ini
   0.037 Read data path: [trunchated_path]/data
   0.037 Write data path: [trunchated_path]/factorio [273060/300264MB]
   0.037 Binaries path: [trunchated_path]/factorio
   0.052 System info: [CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+, 2 cores, RAM: 3786 MB]
   0.052 Environment: DISPLAY=:0 WAYLAND_DISPLAY=:0 DESKTOP_SESSION=LXDE XDG_SESSION_DESKTOP=LXDE XDG_CURRENT_DESKTOP=LXDE __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.052 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
   0.284 Video driver: x11
   0.284 Available displays: 1
   0.284  [0]: VGA-0 - {[0,0], 1024x768, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.439 Error Util.cpp:86: Failed to create OpenGL context: Could not create GL context: GLXBadFBConfig
   3.451 Goodbye

Re: "Failed to create OpenGL context"

Posted: Tue Nov 07, 2023 5:04 pm
by vinzenz
Wow that CPU brings back memories, may I ask which GPU your are using in you system?

It‘s most likely that current Factorio doesnt support your system. You might have better luck with older versions though: https://factorio.com/download/archive/

Keep in mind that your CPU was released about 5-6 years before Factorio development started.

Re: "Failed to create OpenGL context"

Posted: Wed Nov 08, 2023 11:42 am
by mcgiwer
may I ask which GPU your are using in you system?
I guess the one listed.

It's strange, but before I had updated my system, factorio worked very well

Re: "Failed to create OpenGL context"

Posted: Wed Nov 08, 2023 12:09 pm
by FuryoftheStars
mcgiwer wrote: Wed Nov 08, 2023 11:42 am
may I ask which GPU your are using in you system?
I guess the one listed.
Is it using the CPU as graphics? Because otherwise the "one listed" in that log is actually blank where the name usually is.

[Linux] Fix:Failed to create OpenGL context: GLXBadFBConfig

Posted: Wed Nov 08, 2023 12:39 pm
by mcgiwer
To fix the issue (with is the base of this post), I had found a working fix:

Enter the "/etc/bash.bashrc" file and add following lines:

Code: Select all

if [ -z "${MESA_GL_OVERRIDE}" ]; then export MESA_GL_VERSION_OVERRIDE=4.5; fi
Check also if you have the latest graphic card drivers and OpenGL installed.

After that, restart the desktop (or PC/Laptop). The message should not appear again.