Bug 28709

Summary: Wine: update to Mesa 21 breaks OpenGL games (workaround included)
Product: Mageia Reporter: John L. ten Wolde <johnltw>
Component: RPM PackagesAssignee: All Packagers <pkg-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: ouaurelien, rverschelde, thierry.vignaud, tmb
Version: 8   
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: https://bugs.winehq.org/show_bug.cgi?id=50859
Whiteboard:
Source RPM: mesa-21.0.1-1.mga8.src.rpm CVE:
Status comment:

Description John L. ten Wolde 2021-04-03 02:34:36 CEST
Hey everyone. Just throwing an informational bug report on the heap.  So earlier today (2021-04-02) I installed the following updates to Mesa 21.0.1:

    mesa-21.0.1-1.mga8.x86_64
    lib64osmesa8-21.0.1-1.mga8.x86_64
    lib64mesaegl1-21.0.1-1.mga8.x86_64
    lib64mesagl1-21.0.1-1.mga8.x86_64
    lib64mesavulkan-drivers-21.0.1-1.mga8.x86_64

    libosmesa8-21.0.1-1.mga8.i586
    libmesagl1-21.0.1-1.mga8.i586


Since then, attempts to run an old Windows game via OpenGL in Wine32 always result in a failure to initialize with the following errors:

  ┌────
  │ 0070:err:ole:start_rpcss Failed to start RpcSs service
  │ X Error of failed request:  GLXBadFBConfig
  │   Major opcode of failed request:  152 (GLX)
  │   Minor opcode of failed request:  0 ()
  │   Serial number of failed request:  261
  │   Current serial number in output stream:  261
  │ 0098:err:rpc:I_RpcReceive we got fault packet with status 0x1c010003
  └────

As it happened, I was playing this same game only yesterday (before the updates) without issue so the new Mesa was the obvious culprit candidate.  A quick search revealed that this issue -- and a workaround for it -- has already been documented on WineHQ.

Quoting the workaround as provided by user jasperro:

================================================================================
  SUBJECT: 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

    ┌────
    │ 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

    ┌────
    │ export MESA_GL_VERSION_OVERRIDE=4.5
    └────

  before running a game from the terminal. I hope it helped. :)

================================================================================

I tested his suggestion, and yep, it works for me.  The box in my case has an nVidia card using the Nouveau drivers.

Here are a couple of reference links.  The first is to the thread on WineHQ's forum containing jasperro's workaround.  The second is a report of the issue on their Bugzilla:

https://forum.winehq.org/viewtopic.php?f=8&t=34889
https://bugs.winehq.org/show_bug.cgi?id=50859
Comment 1 John L. ten Wolde 2021-04-03 02:52:25 CEST
Oh, I should have added that I launch the old games I play in Wine into their own environments using shell scripts, so I've gone with jasperro's *export* suggestion for the workaround.

I'm not altogether confident that "hard-wiring" the GL override to ~/.pam_environment is necessarily a good idea in case there are other unfortunate or unforeseen side effects.  For example, at the time I type this, the user in the last reply to the forum thread I linked above in my report claims it breaks his ability to use Chrome.
Comment 2 Aurelien Oudelet 2021-04-03 22:04:34 CEST
Hi, thanks reporting this.
Ouch. Mesa + Nvidia card + Nouveau driver + Wine... this is your choice ;)

But, meanwhile, this is difficult to assign. I'd rather be in favour a Wine bug.

Assigning globally, CC'd Mesa and Wine packagers ;)

CC: (none) => ouaurelien, rverschelde, thierry.vignaud, tmb

Aurelien Oudelet 2021-04-03 22:04:49 CEST

Assignee: bugsquad => pkg-bugs

Comment 3 Thomas Backlund 2021-04-03 22:14:42 CEST
so upstream mesa thinks it's a wine issue, and upstream wine thinks its a mesa issue...
Comment 4 Aurelien Oudelet 2021-04-03 22:23:57 CEST
(In reply to Thomas Backlund from comment #3)
> so upstream mesa thinks it's a wine issue, and upstream wine thinks its a
> mesa issue...

Doh! a chicken / egg issue... ;)
Comment 5 John L. ten Wolde 2021-04-03 22:48:23 CEST
(In reply to Aurelien Oudelet from comment #2)

Yeah, sorry, I kind of dressed this report up so it appears I'm complaining about the new Mesa, but the problem clearly does fall into the hands of the Wine devs.  Since it was the Mesa update that brought the bug to the surface, I wanted to put the workaround up ASAP to help anyone else hit with it.  Along the way, I seem to have put the cart in front of the horse.

I'll reword the title to better reflect the actual nature of the issue.


> Ouch. Mesa + Nvidia card + Nouveau driver + Wine... this is your choice ;)
Ha, ha, ha.  I've got no worries.  If it's Nouveau you're knocking with your remark above, my experience with it has, on the whole, almost always been positive. :)
John L. ten Wolde 2021-04-03 22:50:01 CEST

Summary: Update to Mesa 21 breaks OpenGL games in Wine (report includes workaround) => Wine: update to Mesa 21 breaks OpenGL games (workaround included)

Comment 6 John L. ten Wolde 2021-04-03 23:02:30 CEST
(In reply to Aurelien Oudelet from comment #4)
> (In reply to Thomas Backlund from comment #3)
> > so upstream mesa thinks it's a wine issue, and upstream wine thinks its a
> > mesa issue...
> 
> Doh! a chicken / egg issue... ;)
Gentlemen, we've been confronted with a paradox...

Or not really.  I'm leaning toward the side of the argument calling this a Wine bug.  Title changed accordingly.

Also, we need the link to any bug-stomping action taking place on Mesa's GitLab:

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

There. Now we can pop some popcorn, sit out in our lawn chairs, and watch the tennis match. :D
Comment 7 John L. ten Wolde 2021-05-24 09:43:54 CEST
Hi again, all.  The latest Mesa updates (v.21.1.1) just landed on my updates mirror:

    mesa-21.1.1-1.mga8.x86_64
    lib64osmesa8-21.1.1-1.mga8.x86_64
    lib64mesaegl1-21.1.1-1.mga8.x86_64
    lib64mesagl1-21.1.1-1.mga8.x86_64
    lib64mesavulkan-drivers-21.1.1-1.mga8.x86_64

    libosmesa8-21.1.1-1.mga8.i586
    libmesagl1-21.1.1-1.mga8.i586


After their installation, I commented out the OpenGL override from the startup script of the same game that originally brought this bug to my attention and gave it a go.

I didn't spend any time playing it, but I'm happy to report that said game did start without issue and appeared to run normally without further need of the workaround.

I'm not sure we should mark this bug as FIXED just yet (in case others still need access to the workaround), but it seems that after the update, combining Wine with OpenGL WORKSFORME again.
Comment 8 Rémi Verschelde 2021-05-24 12:00:12 CEST
Thanks, I think we can closed as fixed then.

Resolution: (none) => FIXED
Status: NEW => RESOLVED