"Failed to create OpenGL context"

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
mcgiwer
Inserter
Inserter
Posts: 40
Joined: Sat Aug 14, 2021 8:12 pm
Contact:

"Failed to create OpenGL context"

Post 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
User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 380
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: "Failed to create OpenGL context"

Post 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.
bringing the oops to devops
mcgiwer
Inserter
Inserter
Posts: 40
Joined: Sat Aug 14, 2021 8:12 pm
Contact:

Re: "Failed to create OpenGL context"

Post 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
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2766
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: "Failed to create OpenGL context"

Post 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.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
mcgiwer
Inserter
Inserter
Posts: 40
Joined: Sat Aug 14, 2021 8:12 pm
Contact:

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

Post 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.
traycer
Inserter
Inserter
Posts: 41
Joined: Fri Jul 07, 2017 5:40 am
Contact:

Re: "Failed to create OpenGL context"

Post by traycer »

Just wanted to pop in to say your comment worked perfectly for me! I just revived a nearly 15-year-old Thinkpad X220. First thing to go on was Linux Mint. Second thing was Factorio.

Code: Select all

$ ./factorio 
   0.000 2026-03-05 20:37:58; Factorio 2.0.73 (build 84377, linux64, demo)
   0.013 Operating system: Linux (Linuxmint 22.3)
   0.013 Program arguments: "./factorio" 
   0.013 Config path: /home/taob/Games/Factorio/config/config.ini
   0.013 Read data path: /home/taob/Games/Factorio/data
   0.013 Write data path: /home/taob/Games/Factorio [37104/55526MB]
   0.013 Binaries path: /home/taob/Games/Factorio/bin
   0.024 System info: [CPU:        Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 4 cores, RAM: 7823 MB]
   0.024 Environment: DISPLAY=:0 WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=cinnamon XDG_SESSION_DESKTOP=cinnamon XDG_CURRENT_DESKTOP=X-Cinnamon SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.025 Display options: [FullScreen: true] [VSync: true] [UIScale: manual-pixels (100.0%)] [Native DPI: true] [Screen: 255] [Special: lmw] [Lang: en]
   0.059 Video driver: x11
   0.059 Available displays: 1
   0.059  [0]: 0 - {[0,0], 1366x768, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.438 Error Util.cpp:81: Failed to create OpenGL context: Could not create GL context: GLXBadFBConfig
   3.105 Goodbye

$ export MESA_GL_VERSION_OVERRIDE=4.5
$  ./factorio 
   0.000 2026-03-05 20:40:17; Factorio 2.0.73 (build 84377, linux64, demo)
   0.012 Operating system: Linux (Linuxmint 22.3)
   0.012 Program arguments: "./factorio" 
   0.012 Config path: /home/taob/Games/Factorio/config/config.ini
   0.012 Read data path: /home/taob/Games/Factorio/data
   0.012 Write data path: /home/taob/Games/Factorio [37104/55526MB]
   0.012 Binaries path: /home/taob/Games/Factorio/bin
   0.025 System info: [CPU:        Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 4 cores, RAM: 7823 MB]
   0.025 Environment: DISPLAY=:0 WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=cinnamon XDG_SESSION_DESKTOP=cinnamon XDG_CURRENT_DESKTOP=X-Cinnamon SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.025 Display options: [FullScreen: true] [VSync: true] [UIScale: manual-pixels (100.0%)] [Native DPI: true] [Screen: 255] [Special: lmw] [Lang: en]
   0.063 Video driver: x11
   0.063 Available displays: 1
   0.063  [0]: 0 - {[0,0], 1366x768, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.329 Initialised OpenGL:[0] Mesa Intel(R) HD Graphics 3000 (SNB GT2); driver: 4.5 (Core Profile) Mesa 25.2.8-0ubuntu0.24.04.1
   0.329   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes, ARB_pipeline_statistics_query:yes, ARB_gl_spirv:NO, ARB_ES2_compatibility:yes
   0.329   [Version] 4.5
   0.368 Graphics settings preset: very-high
   0.368   Dedicated video memory size 7823 MB (detected from llvmpipe (LLVM 20.1.2, 256 bits); VendorID: 0x10005)
   0.396 Graphics options: [Graphics quality: medium] [Video memory usage: medium] [DXT: low-quality]
   0.396                   [Max threads (load/render): 32/4] [Max texture size: 4096] [Tex.Stream.: true] [Rotation quality: low] [Other: STDCwtl] [B:0,C:0,S:100]
Post Reply

Return to “Technical Help”