[0.17.42] "Failed creating OpenGL pixel format" on start on mac with external display

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
lanerebel
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri May 24, 2019 7:37 pm
Contact:

[0.17.42] "Failed creating OpenGL pixel format" on start on mac with external display

Post by lanerebel »

I'm running what is probably a nightmare configuration: a 2018 MacBook Pro with macOS 10.14.5 with an external dock and a 4k display. The game runs fine if I have my MacBook open, but I typically run in "closed clamshell" mode (the Mac is closed and I use the external 4k display). When I try to start Factorio in that configuration I can see the window starting to appear then it goes away and I'm left with an Opengl error. Here's my log file:

0.000 2019-05-24 15:53:09; Factorio 0.17.42 (build 45100, mac, alpha)
0.000 Operating system: macOS 10.14.5
0.000 Program arguments: "/Applications/factorio.app/Contents/MacOS/factorio"
0.000 Read data path: /Applications/factorio.app/Contents/data
0.000 Write data path: /Users/jfiorini/Library/Application Support/factorio [34403/239072MB]
0.000 Binaries path: /Applications/factorio.app/Contents
0.035 System info: [CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 12 cores, RAM: 16384 MB]
0.035 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 00] [Lang: en]
0.185 Available displays: 1
0.185 [0]: LG Ultra HD - {[0,0], 3840x2160, SDL_PIXELFORMAT_ARGB8888, 60Hz}
0.923 Error Util.cpp:83: Failed to create OpenGL context: Failed creating OpenGL pixel format
2.080 Goodbye

What's most interesting is I can open my MacBook, start Factorio on the laptop's display, then close it and the game runs just fine. It just can't start up.

I've tried switching resolution from "scaled" to "default for display" and it did not help. Any thoughts?

Thanks!
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by posila »

Thanks for the report.
We should relese 0.17.54 later today (EDIT: already released). After it's out, can you try if the issue still exists and if it does, can you send log from both a sucessfull start (with laptop opened and external display connected) and a failed start, please?
timfennis
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jul 13, 2019 9:38 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by timfennis »

Pretty sure I'm having the same issue with 0.17.56

Code: Select all

   0.000 2019-07-13 11:33:16; Factorio 0.17.56 (build 46133, mac, steam)
   0.000 Operating system: macOS 10.14.5
   0.000 Program arguments: "/Users/tim/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio" 
   0.000 Read data path: /Users/tim/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data
   0.000 Write data path: /Users/tim/Library/Application Support/factorio [40098/239072MB]
   0.000 Binaries path: /Users/tim/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
   0.043 System info: [CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 8 cores, RAM: 16384 MB]
   0.043 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 0010] [Lang: en]
   0.097 Available displays: 1
   0.097  [0]: OMEN by HP 35 - {[0,0], 3440x1440, SDL_PIXELFORMAT_ARGB8888, 100Hz, 0x38c2003(0x80)}
   0.854 Error Util.cpp:83: Failed to create OpenGL context: Failed creating OpenGL pixel format
timfennis
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jul 13, 2019 9:38 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by timfennis »

The game does work with the lid open, and these are the logs:

Code: Select all

   0.000 2019-07-13 11:40:25; Factorio 0.17.56 (build 46133, mac, steam)
   0.000 Operating system: macOS 10.14.5
   0.000 Program arguments: "/Users/tim/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio" 
   0.000 Read data path: /Users/tim/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data
   0.000 Write data path: /Users/tim/Library/Application Support/factorio [40042/239072MB]
   0.000 Binaries path: /Users/tim/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
   0.033 System info: [CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 8 cores, RAM: 16384 MB]
   0.033 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 0010] [Lang: en]
   0.083 Available displays: 2
   0.083  [0]: OMEN by HP 35 - {[0,0], 3440x1440, SDL_PIXELFORMAT_ARGB8888, 60Hz, 0x38c2003(0x80)}
   0.084  [1]: Color LCD - {[3440,0], 1680x1050, SDL_PIXELFORMAT_ARGB8888, 60Hz, 0x7bd7f3ff(0x40)}
   0.981 Initialised OpenGL:[0] AMD Radeon Pro 555 OpenGL Engine; driver: 4.1 ATI-2.9.26
   0.981   [Extensions] s3tc:yes; KHR_debug:NO; ARB_clear_texture:NO, ARB_copy_image:NO
   0.981   [Version] 4.1
   1.086 Graphics settings preset: high
   1.086   Dedicated video memory size 2048 MB (detected from AMD Radeon Pro 555 Compute Engine; VendorID: 0x1021c00)
   1.086 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: high-quality]
   1.086                   [Max load threads: 32] [Max texture size: 4096] [Tex.Stream.: 1] [Rotation quality: low] [Color: 32bit]
   1.352 Loading mod core 0.0.0 (data.lua)
   1.461 Loading mod base 0.17.56 (data.lua)
   1.695 Loading mod base 0.17.56 (data-updates.lua)
   1.827 Checksum for core: 2678823001
   1.827 Checksum of base: 3299896472
   2.069 Loading sounds...
   2.101 Info PlayerData.cpp:69: Local player-data.json unavailable
   2.101 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1551543115
   2.273 Crop bitmaps.
   2.533 Parallel Sprite Loader initialized (threads: 7)
   4.956 Initial atlas bitmap size is 4096
   4.960 Created atlas bitmap 4096x4096 [none]
   4.966 Created atlas bitmap 4096x4096 [none]
   4.968 Created atlas bitmap 4096x4092 [none]
   4.970 Created atlas bitmap 4096x4092 [none]
   4.971 Created atlas bitmap 4096x4084 [none]
   4.973 Created atlas bitmap 4096x4096 [none]
   4.973 Created atlas bitmap 4096x256 [none]
   4.973 Created atlas bitmap 4096x1952 [decal]
   4.976 Created atlas bitmap 4096x4096 [low-object]
   4.976 Created atlas bitmap 4096x192 [low-object]
   4.976 Created atlas bitmap 4096x2208 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   4.978 Created atlas bitmap 4096x4064 [terrain, mipmap, linear-minification, linear-mip-level]
   4.979 Created atlas bitmap 4096x4064 [terrain, mipmap, linear-minification, linear-mip-level]
   4.979 Created atlas bitmap 4096x368 [terrain, mipmap, linear-minification, linear-mip-level]
   4.979 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
   4.979 Created atlas bitmap 4096x1712 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   4.979 Created atlas bitmap 2048x192 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   4.979 Created atlas bitmap 4096x836 [alpha-mask]
   4.983 Created atlas bitmap 4096x4092 [shadow, linear-magnification, alpha-mask]
   4.984 Created atlas bitmap 4096x4096 [shadow, linear-magnification, alpha-mask]
   4.989 Created atlas bitmap 4096x4096 [shadow, linear-magnification, alpha-mask]
   4.989 Created atlas bitmap 4096x516 [shadow, linear-magnification, alpha-mask]
   4.989 Created atlas bitmap 4096x1328 [shadow, mipmap, linear-magnification, alpha-mask]
   5.005 Created virtual atlas pages 4096x4096x2
   5.094 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   5.356 Parallel Sprite Loader initialized (threads: 7)
   8.940 Sprites loaded
   8.989 Generated mipmaps (3) for atlas [8] of size 4096x4096   
   8.994 Generated mipmaps (3) for atlas [9] of size 4096x192   
   9.006 Generated mipmaps (3) for atlas [10] of size 4096x2208   
   9.022 Generated mipmaps (3) for atlas [11] of size 4096x4064   
   9.038 Generated mipmaps (3) for atlas [12] of size 4096x4064   
   9.042 Generated mipmaps (3) for atlas [13] of size 4096x368   
   9.051 Generated mipmaps (3) for atlas [14] of size 4096x1600   
   9.107 Generated mipmaps (4) for atlas [15] of size 4096x1712   
   9.117 Generated mipmaps (3) for atlas [22] of size 4096x1328   
   9.117 Custom mipmaps uploaded.
   9.239 Generated mipmaps for virtual atlas of size 4096x8192
   9.248 Custom inputs active: 0
   9.307 Factorio initialised

timfennis
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jul 13, 2019 9:38 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by timfennis »

Subsequent startups seem fine, it happened only on the first startup after installing the game.
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by posila »

timfennis wrote: Sat Jul 13, 2019 10:34 pm Subsequent startups seem fine, it happened only on the first startup after installing the game.
It works even with the lid closed on subsequent startup? Even after rebooting the MacBook?
timfennis
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jul 13, 2019 9:38 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by timfennis »

Just tried to reboot and it still works. So it seems it only ever happened the first time I started the game after installing it. I'm guessing that's why OP is not responding anymore.
michaeln
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Apr 10, 2020 1:07 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by michaeln »

I'm seeing what looks like this issue on 1.0 with MacOS 10.15.7 and a Dell Dock that is managing a separate screen through DisplayLink drivers. I can get things to work by shutting the external display off (quitting the DisplayLink application), and starting the game. Once it gets to the opening menu, I can turn the DisplayLink back on and the game is quite happy to display on the external monitor and plays fine. So it's an annoying dance to go through to get the game to start and showing on my bigger monitor, but it doesn't prevent playing it.

I'm not sure how to get the startup logs, but I do see the failure dialog with message “Failed to create OpenGL context: Failed creating OpenGL pixel format”.
User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1261
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by valneq »

michaeln wrote: Sat Nov 07, 2020 6:04 am I'm not sure how to get the startup logs, but I do see the failure dialog with message “Failed to create OpenGL context: Failed creating OpenGL pixel format”.
This post explains how to extract useful information: viewtopic.php?f=7&t=3638
michaeln
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Apr 10, 2020 1:07 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by michaeln »

The link doesn't explain where my "user-data" is. Though I have a Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents directory, there's nothing under there with a .log extension. Nor are there any save files that I can see; my guess is that directory doesn't contain anything that is personal to me.
michaeln
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Apr 10, 2020 1:07 am
Contact:

Re: [0.17.42] OpenGL on Macos 10.14 with external display

Post by michaeln »

Those are the pages I consulted, but failed to understand! Thanks for prodding me once more.

My crash log is:

Code: Select all

   0.000 2020-11-09 09:33:38; Factorio 1.0.0 (build 54889, mac, steam)
   0.000 Operating system: macOS 10.15.7
   0.001 Program arguments: "/Users/nor190/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio" 
   0.001 Read data path: /Users/nor190/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data
   0.001 Write data path: /Users/nor190/Library/Application Support/factorio [687109/953904MB]
   0.001 Binaries path: /Users/nor190/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
   0.088 System info: [CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz, 16 cores, RAM: 32768 MB]
   0.088 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 0] [Screen: 255] [Special: lmW] [Lang: en]
   0.259 Available displays: 2
   0.278  [0]: 0 - {[0,0], 1920x1080, SDL_PIXELFORMAT_ARGB8888, 60Hz, 0x3f0041(0x20)}
   0.278  [1]: Color LCD - {[-1792,0], 1792x1120, SDL_PIXELFORMAT_ARGB8888, 60Hz, 0x7bd7eef9(0x01)}
   3.220 Error Util.cpp:83: Failed to create OpenGL context: Failed creating OpenGL pixel format
   9.097 Steam API shutdown.
   9.098 Goodbye
Post Reply

Return to “Pending”