OpenGL does not initialize - GLXBadFBConfig

Questions about Wine on Linux
Post Reply
User avatar
noobstang
Newbie
Newbie
Posts: 1
Joined: Sun Jan 31, 2021 5:40 pm

OpenGL does not initialize - GLXBadFBConfig

Post by noobstang » Mon Feb 01, 2021 12:14 pm

I've tried to run a selection of games that require OpenGL (e.g. Steam, CoD, GI, Spelunky, etc.), but for any application that requires OpenGL wine crashes with the error

Code: Select all

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  1602
  Current serial number in output stream:  1602
(stuff like Notepad++ and IE are ok.)

I'm quite headless in fixing even half-sophisticated issues, but the FAQ doesn't seem to help my case.
After some searching, I don't believe it is a native driver issue, but any guidance is appreciated :?
(obviously the radeon HD 6870 doesn't support Vulkan, so I shouldn't be using DXVK)
(p.s. I also have a spare GTX 460 that can run the above mentioned applications okay with the proprietary drivers, but the card itself has issues and I would rather leave it aside from daily use.)

$ screenfetch:

Code: Select all

                          ./+o+-       noobstang@focal-eliza-vduskM
                  yyyyy- -yyyyyy+      OS: Ubuntu 20.04 focal
               ://+//////-yyyyyyo      Kernel: x86_64 Linux 5.8.0-41-generic
           .++ .:/++++++/-.+sss/`      Uptime: 50m
         .:++o:  /++++++++/:--:/-      Packages: 884
        o:+o+:++.`..```.-/oo+++++/     Shell: bash 5.0.17
       .:+o:+o/.          `+sssoo+/    Resolution: 1920x1080
  .++/+:+oo+o:`             /sssooo.   DE: Xfce
 /+++//+:`oo+o               /::--:.   WM: Xfwm4
 \+/+o+++`o++o               ++////.   WM Theme: Default
  .++.o+++oo+:`             /dddhhh.   GTK Theme: ChromeOS [GTK2]
       .+.o+oo:.          `oddhhhh+    Icon Theme: Numix
        \+.++o+o``-````.:ohdhhhhh+     Font: Sans 10
         `:o+++ `ohhhhhhhhyo++os:      Disk: 12T / 21T (56%)
           .o:`.syhhhhhhh/.oo++o`      CPU: Intel Core i7-2600 @ 8x 3.8GHz [59.0°C]
               /osyyyyyyo++ooo+++/     GPU: AMD BARTS (DRM 2.50.0 / 5.8.0-41-generic, LLVM 11.0.1)
                   ````` +oo+++o\:     RAM: 5289MiB / 11963MiB
                          `oo++.      
$ glxinfo | grep OpenGL

Code: Select all

OpenGL vendor string: X.Org
OpenGL renderer string: AMD BARTS (DRM 2.50.0 / 5.8.0-41-generic, LLVM 11.0.1)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.1.0-devel (git-e014e3b 2021-01-31 focal-oibaf-ppa)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 21.1.0-devel (git-e014e3b 2021-01-31 focal-oibaf-ppa)
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.1.0-devel (git-e014e3b 2021-01-31 focal-oibaf-ppa)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
Last few lines from wine.log with WINEDEBUG

Code: Select all

2880:trace:wgl:set_win_format created GL drawable 7200021 for win 0x3e00ca fbconfig 0x15c visual id 0x4bc drawable type 0x7
2880:trace:wgl:glxdrv_wglCreateContext 0x19004f -> 0x876f678
2880:trace:wgl:glxdrv_wglMakeCurrent (0x19004f,0x876f678)
2880:trace:wgl:glxdrv_wglMakeCurrent hdc 0x19004f drawable 7200021 fmt 0x8774da8 ctx 0x7d95e270 fbconfig 0x15c visual id 0x4bc drawable type 0x7
2880:trace:wgl:glxdrv_wglMakeCurrent 0x19004f,0x876f678 returning 1
2880:trace:wgl:wglGetProcAddress returning wglCreateContextAttribsARB -> 0x7a8bad50
2880:trace:wgl:X11DRV_wglCreateContextAttribsARB (0x19004f (nil) 0x31f384)
2880:trace:wgl:X11DRV_wglCreateContextAttribsARB 0x2091 0x4
2880:trace:wgl:X11DRV_wglCreateContextAttribsARB 0x2092 0x4
X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  228
  Current serial number in output stream:  228
Thanks for your patience :roll:

Achyut-BK
Newbie
Newbie
Posts: 2
Joined: Sun Feb 07, 2021 6:12 am

Re: OpenGL does not initialize - GLXBadFBConfig

Post by Achyut-BK » Sun Feb 07, 2021 6:27 am

I guess this could be a problem with Mesa on old hardware. I get this while working with flashpoint linux (which uses wine). Moreover this error only cropped up when I replaced the default drivers with those from ppa:oibaf/graphics-drivers. I guess reverting my drivers to the old state will help.

Hope this helped

Achyut-BK
Newbie
Newbie
Posts: 2
Joined: Sun Feb 07, 2021 6:12 am

Re: OpenGL does not initialize - GLXBadFBConfig

Post by Achyut-BK » Sun Feb 07, 2021 6:39 am

Downgrading from oibaf ppa to normal PPAs has fixed my error maybe it will help you

jasperro
Newbie
Newbie
Posts: 1
Joined: Mon Mar 29, 2021 5:30 am

Re: OpenGL does not initialize - GLXBadFBConfig

Post by jasperro » Mon Mar 29, 2021 5:37 am

Hey, I fixed this issue on Arch Linux with my ATI HD5770 card by adding

Code: Select all

MESA_GL_VERSION_OVERRIDE=4.5
to the file ~/.pam_environment (create if does not exist), logging out, and logging back in again. You can also just try the fix temporarily by running

Code: Select all

export MESA_GL_VERSION_OVERRIDE=4.5
before running a game from the terminal. I hope it helped :).

spoon0042
Level 6
Level 6
Posts: 502
Joined: Thu Dec 24, 2009 11:00 am

Re: OpenGL does not initialize - GLXBadFBConfig

Post by spoon0042 » Mon Mar 29, 2021 11:27 am

fyi I assume this is the same bug as https://bugs.winehq.org/show_bug.cgi?id=50859

lfom
Newbie
Newbie
Posts: 3
Joined: Wed Mar 31, 2021 3:00 pm

Re: OpenGL does not initialize - GLXBadFBConfig

Post by lfom » Wed Mar 31, 2021 3:07 pm

Using the override version does prevent the error (and the app/game starts up normally), but it breaks Chrome and Electron apps (at least on Pop!_OS 20.10, like Ubuntu 20.10). MESA was updated recently to 21.0 as well as the kernel to 5.11, and it broke WINE apps that use OpenGL. My GPU is also an old AMD 6770, and the default OpenGL version reported by glxinfo is 3.1 so maybe overriding it with 4.5 is not a good idea.
The error happens where with the builtin version 5.0 but also with newer ones from PlayOnLinux.

eusouobn
Newbie
Newbie
Posts: 1
Joined: Tue Apr 06, 2021 7:15 am

Re: OpenGL does not initialize - GLXBadFBConfig

Post by eusouobn » Tue Apr 06, 2021 7:16 am

jasperro wrote:
Mon Mar 29, 2021 5:37 am
Hey, I fixed this issue on Arch Linux with my ATI HD5770 card by adding

Code: Select all

MESA_GL_VERSION_OVERRIDE=4.5
to the file ~/.pam_environment (create if does not exist), logging out, and logging back in again. You can also just try the fix temporarily by running

Code: Select all

export MESA_GL_VERSION_OVERRIDE=4.5
before running a game from the terminal. I hope it helped :).
You are a Savior of Souls my friend, thank you very much

mlytle0
Newbie
Newbie
Posts: 1
Joined: Sat Apr 17, 2021 5:53 pm
Location: Houston

Re: OpenGL does not initialize - GLXBadFBConfig

Post by mlytle0 » Sat Apr 17, 2021 7:48 pm

There is someone working on this, but it looks like it will take co-operation from the Wine side and the Mesa side, which may or may not not be happening.

https://gitlab.freedesktop.org/mesa/mesa/-/issues/3969

Post Reply