FS#70015 - [mesa] Update to Mesa 21.0 breaks wine games

Attached to Project: Arch Linux
Opened by Bastian Beranek (totsilence) - Tuesday, 16 March 2021, 11:33 GMT
Last edited by Laurent Carlier (lordheavy) - Monday, 03 May 2021, 07:09 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Laurent Carlier (lordheavy)
Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

After updating to mesa 21.0.0-1 several games can no longer be launched through Steams proton system (which is based on wine).

Someone reported this on the mesa gitlab for Unreal Tournament:

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

I have the same problem, but with three other games.

I can confirm that reverting the commit mentioned in the issue fixes the problem for me. Probably commenting out the line that raises the error is also enough (as suggested in the thread), but I didn't try that. However, it appears that a fix on the wine and proton side would be better.
This task depends upon

Closed by  Laurent Carlier (lordheavy)
Monday, 03 May 2021, 07:09 GMT
Reason for closing:  Fixed
Additional comments about closing:  lib32-mesa-21.0.3-3 mesa-21.0.3-3
Comment by Christos Kotsaris (TemplarGR) - Wednesday, 17 March 2021, 08:04 GMT
Weird. I have been using Mesa 21.0 since day 1 and i have no issue whatsoever running games through winestaging and dxvk. This must be a proton issue.
Comment by Bastian Beranek (totsilence) - Wednesday, 17 March 2021, 09:33 GMT
This definitely occurs with vanilla wine (I can reproduce it with wine game.exe), but it might be a question of hardware and rendering type. For example I don't use vulkan (my HW is old so it doesn't support it).

Here's my GPU:
04:00.0 VGA compatible controller: NVIDIA Corporation GT200b [GeForce GTX 285] (rev a1)
Comment by Joaquín Ignacio Aramendía (Samsagax) - Wednesday, 17 March 2021, 20:02 GMT
I've been using the mesa 21.0 branch from some time now and proton games work aside from some vulkan issues involving layers that would conflict with each other (that was patched and is working now).
Have you tried bypassing the Steam Runtime? Maybe you should report this to Valve's proton github tracker?
Comment by Volker Schmidt (connaisseur) - Sunday, 28 March 2021, 20:05 GMT
I can confirm that recent lib32-mesa upgrade has broken wine (even wine-staging) for some graphics output; a downgrade to lib32-mesa-20.3.4-3 brought my wine application "TSdoctor" back to action. This affects also today's wine 6.5 staging rollout.
Comment by Christos Kotsaris (TemplarGR) - Monday, 29 March 2021, 11:25 GMT
Strange, seems i can't run any of my games using wine 6.5 staging and dxvk now. I am using an AMD R9 380 gpu.
Comment by Michael (ZeroBeat) - Monday, 29 March 2021, 20:08 GMT
I can confirm this, too.
Going back to
$ pacman -Q | grep mesa
mesa 20.3.4-3
solve the issue

Comment by Michael (ZeroBeat) - Monday, 29 March 2021, 20:20 GMT Comment by Joaquín Ignacio Aramendía (Samsagax) - Monday, 29 March 2021, 20:45 GMT
Seems that Intel and Nvidia Vulkan drivers are affected. I have full AMD setup and works flawlessly, wine and all.
Comment by Bastian Beranek (totsilence) - Monday, 29 March 2021, 20:47 GMT
As I said: I don't use vulkan. I think it might be related to max. supported OpenGL versions of the HW/driver, though.
Comment by Michael (ZeroBeat) - Tuesday, 30 March 2021, 05:49 GMT
@ Joaquín Ignacio Aramendía, I can confirm that, too.
Tested on a dual GPU system (RYZEN VEGA iGPU) and NVIDIA GTX 1650.
Switching from AMD to NVIDIA cause the issue.

Tested on a dual GPU system (INTEL HD) and NVIDIA GTX 940.
Issue on both.

Tested on a single GPU system NVIDIA GTX 1080Ti.
Issue.

Unfortunately it is enough to have mesa installed to let the system run into that issues.



Comment by Joaquín Ignacio Aramendía (Samsagax) - Tuesday, 30 March 2021, 13:14 GMT
Just tested in my laptop (intel i5 520 iGPU + Nvidia 940M dGPU) and games work fine inside Steam (both with and without runtime with different proton/wine versions). mesa 21.0.1 is installed with kernel 5.11.10-zen and official nvidia drivers Maybe is a bug introduced in wine after 5.13?
Comment by Michael (ZeroBeat) - Tuesday, 30 March 2021, 15:04 GMT
@ @ Joaquín Ignacio Aramendía, do you use a xorg.config?

If not, does it work with this xorg configuration file
The BusID is from my system (ASUS notebook), maybe you have to modify it.

/etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
VendorName "NVIDIA Corporation"
Option "NoLogo" "1"
Option "Interactive" "0"
Option "Coolbits" "12"
Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
Identifier "intel"
Driver "modesetting"
EndSection

Section "Screen"
Identifier "intel"
Device "intel"
EndSection

Running mesa 20.3.4-3, everything is fine (that include the above config).
Upgrade to mesa 21, broke xfce4 desktop and wine.


Comment by Joaquín Ignacio Aramendía (Samsagax) - Tuesday, 30 March 2021, 15:15 GMT
@Michael I have the minimum required configuration. Maybe you should step it down too. Here is mine and seems exactly like your´s except for the nvidia "Device" and "ServerLayout" sections:

Section "ServerLayout"
Identifier "layout"
Screen 0 "iGPU"
Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
Identifier "iGPU"
Driver "modesetting"
EndSection

Section "Screen"
Identifier "iGPU"
Device "iGPU"
EndSection

Section "Device"
Identifier "dGPU"
Driver "nvidia"
BusID "PCI:6:0:0"
EndSection

You added "AllowEmptyInitialConfiguration", "Interactive 0", "Coolbits 12" and "Nologo 1" while I have a ServerLayout section describing "Screen" set to the intel gpu and "AllowNVIDIAGPUScreens"

Maybe looking into Xorg.log can give a clue on what fails?
Comment by Michael (ZeroBeat) - Tuesday, 30 March 2021, 16:58 GMT
@ Joaquín, great, thanks for sharing your config. I'll give it a try. My INTEL/NVIDIA system is configured as optimus system.
Interactive 0 disable the GPU watchdog (need this to prevent a kernel exec timeout, when running hashcat)
Coolbits 12 allow overclocking (when running hashcat)
Nologo is self-explained

BTW:
If someone is interested, this is the xorg config for a RYZEN-VEGA/NVIDIA system (not configured as optimus)
RYZEN VEGA is used as display driver and NVIDA for hashcat/john

Section "Device"
Identifier "amd"
Driver "amdgpu"
Screen 0
EndSection

Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
VendorName "NVIDIA Corporation"
Option "NoLogo" "1"
Option "Interactive" "0"
Option "Coolbits" "12"
Option "AllowEmptyInitialConfiguration"
EndSection
Comment by Michael (ZeroBeat) - Tuesday, 30 March 2021, 17:09 GMT
@ Joaquín, I checked the logs already:
Neither lightdm.log nor seat0-greeter.log nor Xorg.0.log showing an ERROR.
Comment by Michael (ZeroBeat) - Tuesday, 30 March 2021, 17:30 GMT
Ok, removed optimus configuration and tried your config. Result is the same.
Black screen and mouse arrow if 20-nvidia.config is present.
If 20-nvidia.config is removed, xfce4 desktop is working, but
winecfg show this:
00c8:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00d0:err:winediag:nodrv_CreateWindow Unknown error (998).
I'm running out of ideas (but assume a driver issue) and set IgnorePkg mesa and lib32-mesa.
Comment by Joaquín Ignacio Aramendía (Samsagax) - Tuesday, 30 March 2021, 17:39 GMT
My configuration is also optimus enabled. Weird that yours doesn't work. If you are using Steam, maybe you can look into Steam Runtime Soldier logs (by running STEAM_LINUX_RUNTIME_LOG=1 steam) or disabling the runtime entirely. Are you using vulkan by any chance?
Comment by Michael (ZeroBeat) - Tuesday, 30 March 2021, 17:50 GMT
No, I don't use steam or vulkan.
All my systems are configured to run hashcat and john as primary task.
BTW:
The game is a very old Windows free game (spider clone), my wife is running (using wine) on her notebook. Nice to have, but not mandatory to have.
I'll wait for the next mesa update. Thanks for your efforts.


Comment by Christos Kotsaris (TemplarGR) - Tuesday, 30 March 2021, 18:49 GMT
This doesn't seem to be a Mesa issue to me. I had the issue with some wine games but not in others. For example Endless legend didn't start for me with winestaging and latest mesa, but battle brothers curiously did work. What i found out though is that when i used Lutris 6.0 runner as my wine version, every game worked fine. So i think this should be filed as a wine bug, not a mesa bug.
Comment by Michael (ZeroBeat) - Tuesday, 30 March 2021, 21:14 GMT
@ Christos, thanks. That could be possible. Maybe it's a combination of wine and mesa.
When I have time, I'll test some different mesa/wine version combinations.
Right now, I'm running mesa 20.3.4-3 and everything is fine (login into xfce4 and wine working as expected an all systems).

Comment by Michael (ZeroBeat) - Wednesday, 31 March 2021, 13:53 GMT
@ Christos, you pointed me into the right direction.
I was running into 2 different issues and could solve both of them.
wine and mesa udpdate came together, while running last pacman -Syu and unfortunately I didn't realized that.

Modifying my xorg config allow lightdm to login again:
https://bbs.archlinux.org/viewtopic.php?pid=1964881#p1964881

And for the not working wine game this:
https://bbs.archlinux.org/viewtopic.php?pid=1952120#p1952120


Comment by Popolon (Popolon) - Thursday, 22 April 2021, 18:05 GMT
I have the same issue with an Intel integrated GPU of 2nd generation HD3000, on a core-i7 2700K.


It looks like, the bug is on Mesa side, and this patch could resolve it :

https://gitlab.freedesktop.org/mesa/mesa/-/issues/3969#note_888183
Comment by Popolon (Popolon) - Friday, 23 April 2021, 09:53 GMT
I confirm the patch resolved the issue for me. The change take effect after this morning boot only, X.org/Wayland restart should be enough.

I put it in a file called bugwine.patch and added in the PKGBUILD of current mesa (21.0.3-1):

prepare() {
cd $pkgbase-${pkgver}
git apply ../bugwine.patch
}

21.0.3-itself, that is available since yesterday evening didn't resolve the issue, still need to patch.
Comment by Bastian Beranek (totsilence) - Friday, 23 April 2021, 10:19 GMT
Thanks for testing (I am the patch author). Depending on the application you may have to patch lib32-mesa as well. Hope they'll consider it (or do something better along those lines) on the Mesa side now...
Comment by Popolon (Popolon) - Saturday, 24 April 2021, 11:24 GMT
Lxdm works again too (I believe it didn't work either, so I used more heavy gdm during few weeks). lighdm still doesn't work, but it's due to lightdm-gtk-greeter missing (tried to uninstall/install again it, still have the problem. Need a separate bug report if it's not already opened. In /var/log/lightdm.log:

[+0.00s] DEBUG: Seat seat0: Creating greeter session
[+0.00s] DEBUG: Seat seat0: Failed to find session configuration lightdm-gtk-greeter
[+0.00s] DEBUG: Seat seat0: Failed to create greeter session

It is not a required lightdm-gtk-greater is not a required/optional dependency (ligthdm is a dependence of the greeter) but lightdm not work by default without it.
Comment by Popolon (Popolon) - Sunday, 25 April 2021, 08:14 GMT
I confirm than after installing lightdm-gtk-greater, lightdm works again too :).
Comment by Popolon (Popolon) - Friday, 30 April 2021, 10:26 GMT
After verification lightdm works with last mesa package (21.0.3-2), but still not wine, as this patch is not applied, after reading the bug this is for al cards that only support OpenGL <4.5 :(. Don't know how to escalate the bug to have the patch applied ? The bug report is just one among a crowd of tickets, I don't see something like a tag, "solution found", and "need to apply patch".
Comment by Bastian Beranek (totsilence) - Sunday, 02 May 2021, 14:45 GMT
The patch is now merged in mesa master. It would be great if https://gitlab.freedesktop.org/mesa/mesa/-/commit/960c86d6787437b643825baa230bc0cd7f9f7540 could be backported for both mesa and lib32-mesa!
Comment by Volker Schmidt (connaisseur) - Sunday, 02 May 2021, 20:04 GMT
while pushing lib32-mesa-21.0.3-3 (and having it installed), I can confirm that my particular wine application is no longer crashing.

Thanks to all for their efforts to bring that upstream into main source tree.

Loading...