Bug 101683

Summary: Some games hang while loading when compositing is shut off or absent
Product: Mesa Reporter: Logan Hanning <honestdolus>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: major    
Priority: medium    
Version: 17.1   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: glxinfo output

Description Logan Hanning 2017-07-04 00:14:04 UTC
Created attachment 132420 [details]
glxinfo output

Recently, several games have been lock up during loading at one point or another. You can get the game to continue loading by hitting ALT-TAB or going into something like the Activites screen in Gnome Shell. It seems that this only happens when compositing is absent or shut off. Also, as far as I have been able to tell, this only when the game is using an older version of OpenGL.

Card: RX 480

Driver: Mesa 17.1.3
Comment 1 Logan Hanning 2017-07-04 00:24:28 UTC
I should have mentioned that this also only happens to games running in fullscreen.
Comment 2 Shmerl 2017-07-04 00:34:29 UTC
Please list some examples of games / engines.

I encountered something like this with Jedi Academy. See: https://github.com/JACoders/OpenJK/issues/921
Comment 3 Logan Hanning 2017-07-04 00:52:42 UTC
Games/engines this happens in:

Arx Fatalix running in Arx Libertatis

Warzone2100

OpenJK (as mentioned)

ResidualVM

Ur Quan Masters
Comment 4 Michel Dänzer 2017-07-04 02:20:16 UTC
I'm able to reproduce the problem with Warzone2100, looks like a DRI3 related issue. One of the DRI3 fixes Thomas Hellström has been working on might help. Meanwhile, you can work around that one by disabling DRI3 for the game:

 LIBGL_DRI3_DISABLE=1 warzone2100

AFAICT this already happened with Mesa 13 though, so you might be running into different issues with other games. When a game hangs, attach gdb to its process, run

 thread apply all bt full

and attach the output here.
Comment 5 Logan Hanning 2017-07-04 03:14:32 UTC
(In reply to Michel Dänzer from comment #4)
> I'm able to reproduce the problem with Warzone2100, looks like a DRI3
> related issue. One of the DRI3 fixes Thomas Hellström has been working on
> might help. Meanwhile, you can work around that one by disabling DRI3 for
> the game:
> 
>  LIBGL_DRI3_DISABLE=1 warzone2100


Disabling DRI3 also clears up the problem with Arx Libertatis. I'll be able to test more in depth later.
Comment 6 Michel Dänzer 2017-07-04 07:45:02 UTC
The patch I just attached to bug 97957 fixes the Warzone2100 hangs for me as well.
Comment 7 Michel Dänzer 2017-07-13 08:22:39 UTC
Thanks for the report, should be at least mostly fixed in Git. If there's still an issue with a game, please file a new report for that.

Module: Mesa
Branch: master
Commit: 81fb1547772d42c527318837d4207ecdb6899e5d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=81fb1547772d42c527318837d4207ecdb6899e5d

Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Tue Jul  4 12:55:15 2017 +0900

loader/dri3: Use dri3_find_back in loader_dri3_swap_buffers_msc

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.