# Failed to select a GLFWFBConfig

**URL:** <https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288>\
**Category:** support\
**Created:** [January 5, 2011, 12:15pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288 "2011-01-05T12:15:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 5, 2011, 12:15pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/1 "2011-01-05T12:15:39Z")

</div>

**[newbiz](https://sourceforge.net/u/newbiz/)** wrote on [Wednesday, January 05, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#c0e0):

Hello,

I have no problem building and running my program on most platforms. But  
"sometimes", users seems to have troubles with this error occuring at  
application startup:  
"Failed to select a GLFWFBConfig from the alternatives"  
It seems to happen mainly on Windows 7.

Is there any fix/explanations ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 5, 2011, 9:37pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/2 "2011-01-05T21:37:15Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, January 05, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#41a7):

That doesn’t sound good. That’s not really supposed to happen. Do you know  
more about the specifications of their machines?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 6, 2011, 5:12pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/3 "2011-01-06T17:12:34Z")

</div>

**[newbiz](https://sourceforge.net/u/newbiz/)** wrote on [Thursday, January 06, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#7b83):

I have access to one of the machines that has this problem. In fact, a whole  
cluster of them.  
About half of them have gentoo installed, the other half has Windows.

There is no problem running the program on the gentoo ones. But those having  
Windows 7 pro will crash with the aforementioned mentioned error (whatever  
window requested will fail, even 640x480 windowed).

# Here is what a cat /proc/cpuinfo returns:

=====  
processor : 0  
vendor\_id : GenuineIntel  
cpu family : 6  
model : 23  
model name : Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz  
stepping : 10  
cpu MHz : 2792.813  
cache size : 3072 KB  
physical id : 0  
siblings : 2  
core id : 0  
cpu cores : 2  
apicid : 0  
initial apicid : 0  
fdiv\_bug : no  
hlt\_bug : no  
f00f\_bug : no  
coma\_bug : no  
fpu : yes  
fpu\_exception : yes  
cpuid level : 13  
wp : yes  
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat  
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant\_tsc  
arch\_perfmon pebs bts aperfmperf pni dtes64 monitor ds\_cpl est tm2 ssse3  
cx16 xtpr pdcm sse4\_1 xsave lahf\_lm  
bogomips : 5585.62  
clflush size : 64  
cache\_alignment : 64  
address sizes : 36 bits physical, 48 bits virtual  
power management:

# processor : 1 vendor\_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz stepping : 10 cpu MHz : 2792.813 cache size : 3072 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fdiv\_bug : no hlt\_bug : no f00f\_bug : no coma\_bug : no fpu : yes fpu\_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant\_tsc arch\_perfmon pebs bts aperfmperf pni dtes64 monitor ds\_cpl est tm2 ssse3 cx16 xtpr pdcm sse4\_1 xsave lahf\_lm bogomips : 5585.96 clflush size : 64 cache\_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:

=====

Graphics card: Radeon X1300/X1550

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 6, 2011, 6:38pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/4 "2011-01-06T18:38:00Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Thursday, January 06, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#9e71):

The error comes from \_glfwChooseFBConfig (window.c) not finding any  
acceptable GLFWFBConfig. If you trace through that function, you may be able  
to find out why.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 7, 2011, 9:34am UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/5 "2011-01-07T09:34:08Z")

</div>

**[newbiz](https://sourceforge.net/u/newbiz/)** wrote on [Friday, January 07, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#9212):

Okay, I’ll go for a debug session next week and keep you informed

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 12, 2011, 2:24pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/6 "2011-01-12T14:24:29Z")

</div>

**anonymous** wrote on [Wednesday, January 12, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#816d):

I have the same problem when trying to create a window using Mesa3D (I want  
to test something with a simpler OpenGL implementation than the hardware  
accelerated one I have). I decided to step into the code, and the problem is  
caused by the function getFBConfigs in win32\_window.c.

The number of pixel formats returned is 2, but one is discarded because it  
fails the test

```
  !( pfd.dwFlags & PFD_GENERIC_ACCELERATED ) && ( pfd.dwFlags & PFD_GENERIC_FORMAT )

```

and the other fails the test

```
  !( pfd.dwFlags & PFD_DRAW_TO_WINDOW ) || !( pfd.dwFlags & PFD_SUPPORT_OPENGL ) || !( pfd.dwFlags & FD_DOUBLEBUFFER )

```

The intentions are good, but the end result is that the OpenGL window cannot  
be created under some unfortunate setups (software renderers).

What about a selection mechanism that favors hardware acceleration, but that  
can fall back to software if needed?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 12, 2011, 2:40pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/7 "2011-01-12T14:40:14Z")

</div>

**[ceniza](https://sourceforge.net/u/ceniza/)** wrote on [Wednesday, January 12, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#d960):

I am the one who posted the previous reply, but now I was able to recover my  
account.

I can confirm that skipping those conditions works. I was able to launch my  
application using Mesa3D that way.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 12, 2011, 2:58pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/8 "2011-01-12T14:58:43Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, January 12, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#d67f):

@ceniza Thank you.

Would it be acceptable to you having to set a window hint for GLFW to  
recognise software rendering pixel formats?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 12, 2011, 3:06pm UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/9 "2011-01-12T15:06:13Z")

</div>

**[ceniza](https://sourceforge.net/u/ceniza/)** wrote on [Wednesday, January 12, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#41f2):

It would be acceptable. Could you also add another hint to accept non-double-  
buffered as well?

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [March 6, 2011, 1:28am UTC](https://discourse.glfw.org/t/failed-to-select-a-glfwfbconfig/288/10 "2011-03-06T01:28:24Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Sunday, March 06, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/746f49f8/#b421):

I added it to the suggestion box.
