https://bugs.winehq.org/show_bug.cgi?id=45683
Bug ID: 45683 Summary: Gothic 2: Returning 2.0 Alternative Balance frozen when focused Product: Wine Version: 3.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: supercoolemail@seznam.cz Distribution: ---
Created attachment 62104 --> https://bugs.winehq.org/attachment.cgi?id=62104 WINEDEBUG="+dinput,+ddraw"
Gothic 2 Alternative Balance only runs, when NOT focused. When game gets focus, everything freezes. When focus is taken away by alt+tab, game starts running again in background - this is clearly visible with virtual desktop. Menu works corretly even when focused. Tested with compatibility mode of Windows XP, 7 and 10.
Timeline in log is: 1) Started the game and loaded a save -> game got stuck at loading screen 2) Pressed Alt+Tab (taken focus away from game) -> Game started running 3) Pressed Alt+Tab (game focused) -> Game froze 4) Pressed Alt+Tab (taken focus away from game) -> Game started running 5) Pressed Ctr+C in terminal to kill the game
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #1 from supercoolemail@seznam.cz --- It is somehow related to resolution: When game runs on resolution smaller than maximum (maximum = display native), it works correctly. Running it on display with desktop resolution of 3840x2160 at 3840x2160 triggers the bug (in both virtual desktop and fullscreen), but running it on same display with lower resolution (in virtual desktop) woks fine (tested with 2560x2048, 2560x1600, 2560x1440). I have tried display with native resolution of 2560x1440 and when game ran on this resolution, it still triggered the bug, but running it on lower resolution worked fine. Lower resolutions were tested only in virtual desktop because I did not want it to mess with my desktop settings.
This is on: Mesa 18.1.6 Radeon RX 580 with AMDGPU driver
https://bugs.winehq.org/show_bug.cgi?id=45683
supercoolemail@seznam.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Gothic 2: Returning 2.0 |Gothic 2 frozen when |Alternative Balance frozen |focused |when focused | Version|3.13 |3.15
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #2 from supercoolemail@seznam.cz --- It is not related to Alternative Balance mod. I got new CD drive and clean install of the game + 2.6 no-CD fix - it behaves the same way. When I set native resolution and start the game all I get after intro videos is black screen. Alt tabing redraws all frames that were supposed to be rendered in the meantime: when i press arrow up 2 times and down 3 times and then alt tab out of the game it quickly goes through all navigated menu items.
This is with: Linux coolhost 4.18.6-arch1-1-ARCH #1 SMP PREEMPT Wed Sep 5 11:54:09 UTC 2018 x86_64 GNU/Linux Ryzen 7 1700 RX 580 8G 16 G RAM
https://bugs.winehq.org/show_bug.cgi?id=45683
zzzzzyzz@hacari.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzzzzyzz@hacari.org
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #3 from supercoolemail@seznam.cz --- This bug was introduced by version 3.5. Versions 3.4, 3.3 and probably older work correctly.
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #4 from supercoolemail@seznam.cz --- Created attachment 62360 --> https://bugs.winehq.org/attachment.cgi?id=62360 Workaround by partial revert of problematic commit
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #5 from supercoolemail@seznam.cz --- Cause is commit 034e88e038e8114ec31261d88dece1e2691185fb (https://github.com/wine-mirror/wine/commit/034e88e038e8114ec31261d88dece1e26...): ddraw: Take the flip interval into account in ddraw_surface7_Flip(). Partially reverting the commit with my patch fixes the problem.
https://bugs.winehq.org/show_bug.cgi?id=45683
supercoolemail@seznam.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |directx-d3d
https://bugs.winehq.org/show_bug.cgi?id=45683
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |034e88e038e8114ec31261d88de | |ce1e2691185fb Keywords| |regression CC| |joseph.kucia@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #6 from supercoolemail@seznam.cz --- Some additional information:
ddraw_surface_update_frontbuffer is --- with exception of loading screen --- always called this way:
ddraw_surface_update_frontbuffer(surface , rect , read, swap_interval) ddraw_surface_update_frontbuffer(0x9948cf0, (nil), 0 , 1);
Taking away focus and giving it back does not change anything, yet game actually runs without focus and is fronzen with focus. DDRAW_SWAPPED in surface->ddraw->flags is alway set.
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #7 from Henri Verbeet hverbeet@gmail.com --- Does this have a demo that can be used to reproduce the issue?
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #8 from supercoolemail@seznam.cz --- Demos do not work at all - they just show black screen no matter what.
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #9 from supercoolemail@seznam.cz --- Ok, demos do work after all, just not with native directmusic (full game does). You have to set musicEnabled=0 in <gamedir>/system/gothic.ini With this change, it does not need any overrides.
Bug is prensent with demo and my workaround works too.
Link: https://www.worldofgothic.de/dl/download_64.htm
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #10 from Henri Verbeet hverbeet@gmail.com --- I can reproduce this (my setup is fairly similar: Mesa 18.1.4, VEGA10), but it looks like a driver issue to me.
In particular, it somehow seems related to doing FBO blits to the frontbuffer after having done a SwapBuffers(). We're hanging in the glBlitFramebuffer() call to the frontbuffer in texture2d_blt_fbo(). LIBGL_ALWAYS_SOFTWARE=1 is a workaround. Another workaround is forcing "swap_interval" to either 0 or 1 at the start of ddraw_surface_update_frontbuffer().
I can try to look into it a little further, but the quickest way to get this fixed may be to bring this issue to the attention of the Mesa developers.
https://bugs.winehq.org/show_bug.cgi?id=45683
--- Comment #11 from supercoolemail@seznam.cz --- Thank you.
It is fixed in mesa 18.2.1
https://bugs.winehq.org/show_bug.cgi?id=45683
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NOTOURBUG Status|UNCONFIRMED |RESOLVED
--- Comment #12 from Józef Kucia joseph.kucia@gmail.com --- (In reply to supercoolemail from comment #11)
It is fixed in mesa 18.2.1
https://bugs.winehq.org/show_bug.cgi?id=45683
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.freedesktop.or | |g/show_bug.cgi?id=106404 Status|RESOLVED |CLOSED
--- Comment #13 from Matteo Bruni matteo.mystral@gmail.com --- Probably by https://gitlab.freedesktop.org/mesa/mesa/commit/e4b667224d6ddd5d42a134972933...