https://bugs.winehq.org/show_bug.cgi?id=38166
Bug ID: 38166 Summary: Heroes of Might and Magic 5 slowly on some maps. Product: Wine Version: 1.7.37 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: galdralag@bk.ru Distribution: ---
On some maps especially when many green trees game works very slowly.
This happens on all versions of nvidia driver AFTER 331.89. 331.89 it is last version when game works on maximum video settings. May be this is bug of nvidia driver (not wine) but I can't test this.
I tested 2 videocards nvidia 760M and 650 ti. This can be reproduced on ArchLinux, Fedora, OpenSuse and Kubuntu.
If you have problems with reproducing I can attach some maps where it can be reprocuced
https://bugs.winehq.org/show_bug.cgi?id=38166
Vjacheslav galdralag@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux
https://bugs.winehq.org/show_bug.cgi?id=38166
Vjacheslav galdralag@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |performance, regression
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #1 from Vjacheslav galdralag@bk.ru --- This also very often happens when entering to Sylvan castle and it has all buildings built
https://bugs.winehq.org/show_bug.cgi?id=38166
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #2 from Béla Gyebrószki gyebro69@gmail.com --- Does this occur in the demo version too? http://www.gamershell.com/download_13278.shtml
If you think it's a regression in Wine then please run a regression test: http://wiki.winehq.org/RegressionTesting
https://bugs.winehq.org/show_bug.cgi?id=38166
Vjacheslav galdralag@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.7.37 |1.7.38
--- Comment #3 from Vjacheslav galdralag@bk.ru --- (In reply to Béla Gyebrószki from comment #2)
Does this occur in the demo version too? http://www.gamershell.com/download_13278.shtml
If you think it's a regression in Wine then please run a regression test: http://wiki.winehq.org/RegressionTesting
In demo version it is also reproducable.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #4 from Vjacheslav galdralag@bk.ru --- When game becomes slowly temporary decision without restarting game it is switching graphic option from low,normal,high... to any other. After this game becomes much faster until you switch back to problem place on the map or caste.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #5 from Vjacheslav galdralag@bk.ru --- I tested wine 1.6.2 from kubuntu 14.10 repository it has same behavior: nvidia 331 works fine, nvidia 346 (currenly latest) very slowly on some places on game map
https://bugs.winehq.org/show_bug.cgi?id=38166
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression |download Status|UNCONFIRMED |NEW URL| |http://www.gamershell.com/d | |ownload_13278.shtml Ever confirmed|0 |1
--- Comment #6 from Béla Gyebrószki gyebro69@gmail.com --- Based on comment #5 this is more likely a regression in the Nvidia proprietary drivers not in Wine thus removing the 'regression' keyword. I often experience the performance issue with the GOG version, Nvidia binary drivers 340.76. For me the issue is not always reproducible, sometimes the slowdown occurs after a period of time. Vjacheslav, could you attach a saved game in which the slowdown occurs?
https://bugs.winehq.org/show_bug.cgi?id=38166
Vjacheslav galdralag@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.7.38 |1.7.39
--- Comment #7 from Vjacheslav galdralag@bk.ru --- (In reply to Béla Gyebrószki from comment #6)
Based on comment #5 this is more likely a regression in the Nvidia proprietary drivers not in Wine thus removing the 'regression' keyword. I often experience the performance issue with the GOG version, Nvidia binary drivers 340.76. For me the issue is not always reproducible, sometimes the slowdown occurs after a period of time. Vjacheslav, could you attach a saved game in which the slowdown occurs?
On full version of game "Tribes of the East" (or "Tribes of the East" in Gold Edition) slowdown always occurs on first screen of first campaign.
1. After starting game go to "Single Player" -> Campaign -> "Rage of the Tribes" -> "A Murder of Crows". 2. After hero ends his speech press PageDown until camera will be at most top point
https://bugs.winehq.org/show_bug.cgi?id=38166
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.7.39 |1.7.37
--- Comment #8 from Béla Gyebrószki gyebro69@gmail.com --- Please don't change the originally reported Wine version, it's supposed to be the oldest version where the bug was tested.
https://bugs.winehq.org/show_bug.cgi?id=38166
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stanislav.blinov@gmail.com
--- Comment #9 from Béla Gyebrószki gyebro69@gmail.com --- *** Bug 39054 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=38166
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Heroes of Might and Magic 5 |Heroes of Might and Magic V |slowly on some maps. |performance issue: severe | |fps drop on certain maps
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #10 from Stanislav Blinov stanislav.blinov@gmail.com --- Sorry for the duplicate, the "on some maps" part threw me off. I don't think the type of map matters at all, for me it happens on any map, after a certain camera motion, also (rarely) in campaign cinematics. Forgot to mention driver version in that duplicate report - it's 352.21.
Is there anything I could do to provide more specific info? I tried making a trace (+d3d,+opengl), but the tracing itself lowers the FPS significantly, so it's hard to determine if the actual problem occurs or not.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #11 from Béla Gyebrószki gyebro69@gmail.com --- *** Bug 39055 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #12 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Stanislav Blinov from comment #10)
Sorry for the duplicate, the "on some maps" part threw me off. I don't think the type of map matters at all, for me it happens on any map, after a certain camera motion, also (rarely) in campaign cinematics. Forgot to mention driver version in that duplicate report - it's 352.21.
Is there anything I could do to provide more specific info? I tried making a trace (+d3d,+opengl), but the tracing itself lowers the FPS significantly, so it's hard to determine if the actual problem occurs or not.
I'm not a developer hence I can't give the answer to your question. However, I suggest you trying out the game with the open source nouveau driver to see if the problem is present with that. I also have the reported issue when using Nvidia binary driver 340.76, but the problem doesn't occur with nouveau.
https://bugs.winehq.org/show_bug.cgi?id=38166
Kol kol@MV8660.spb.edu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kol@MV8660.spb.edu
--- Comment #13 from Kol kol@MV8660.spb.edu --- The bug is present with Wine 3.5 and Wine-staging 3.5. The hardware is PhenomII X4 3.8GHz/GeForce GTX660 using the proprietary Nvidia driver version 375.39 and I get 2-5 frames per second. But with new PBA patches (see "https://www.github.com/acomminos/wine-pba") the bug is unexpectedly resolved and now I can see more than 80 FPS again. These patches should also improve performance in other games.
https://bugs.winehq.org/show_bug.cgi?id=38166
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=38166
mo78@abv.bg changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mo78@abv.bg
--- Comment #14 from mo78@abv.bg --- Same problem here. The frame drop is so severe that it/s nearly impossible to quit the game. In the mean time the game works perfect with Wine 1.2.2.
https://bugs.winehq.org/show_bug.cgi?id=38166
Jay jaynobyl@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jaynobyl@gmx.de
https://bugs.winehq.org/show_bug.cgi?id=38166
michal.dybczak@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michal.dybczak@gmail.com
--- Comment #15 from michal.dybczak@gmail.com --- The bug still exists on wine 4.6 or Proton 4.2 on Nvidia proprietary drivers.
When I run the game on Intel proprietary drivers, all is fine, no chopping, 60-120 FPS all the time.
On Nvidia I can get 220-350 FPS but it quickly drops to 1-2 FPS when new map, screen, fight loads and then it's hard to change settings to unlock it to the full FPS... So all in all, this game is completely unplayable on Nvidia. It runs but it's really a torment. On Intel, all is fine. Well... not completely, because there are many artifacts and graphical glitches but they went away when I set graphics to Low (and thus got rid of flickering shadows and other bugs on Intel) and then the game is fully playable and enjoyable.
It confirms suspicions that the bug may be in Nvidia drivers or in the way how Wine interacts with Nvidia drivers.
Since the game is really old and not hardware demanding if someone has an option to switch to Intel (on hybrid GPUs) this is the best way to play it currently.
Or alternatively, use wine 1.2.2 if the game runs fine on it.
For those trying to debug it, it would be interesting to look through changes between 1.2.2 and the next release that introduced this bug.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #16 from mo78@abv.bg --- The game runs fine with ESYNC, try it :)
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #17 from michal.dybczak@gmail.com --- I wanted to try it with esync and I adjusted my system to enable esync but it turned out that transforming the game from Steam to Wine isn't that easy. I changed my runner in Lutris but the game is not starting on wine no matter what I do so at the moment I can't test that.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #18 from mo78@abv.bg --- Don't use Lutris. With Wine-Staging and Esync the game runs perfectly fine :)
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #19 from michal.dybczak@gmail.com --- How can I not use Lutris? Game is on Steam and thus installed in Proton. In Lutris I can change runner from Steam (Proton) to Wine. I managed to run some other game that way but it doesn't work for HOMMV from some reason.
Anyway, the game works fine on Intel so I don't have that much initiative to tinker with it further.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #20 from mo78@abv.bg --- And how we played games before Lureis? Just use system Wine or isolated prefix with Windows Steam installed :)
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #21 from michal.dybczak@gmail.com --- Sorry, no. I got rid of Windows Steam when Proton came out and I'm not going back to it. Current tools are much more advanced and give more possibilities and I don't want to go backward to the situation when there is just a whole Steam installation on one prefix (and all settings and issues apply to every game).
So on one side gaming become simpler, on other, we got more fine-grained control and thus things got more complicated but in a good way.
I'm not a heavy gamer and usually have no time for it so I just don't want to waste too much time on tinkering. Sure, sometimes this can be fun and needed to run some game but if too much hassle is needed I go to another game.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #22 from mo78@abv.bg --- You can create per application prefix or rules. There isn't any thikering and the work is done in minutes :)
https://bugs.winehq.org/show_bug.cgi?id=38166
mjo admin@mjollna.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |admin@mjollna.org
--- Comment #23 from mjo admin@mjollna.org --- Even with esync enabled (via Lutris, using esync-staging-pba-3.18-x86_64, and nvidia driver 430) I couldn't get rid of the bug, until a friend of mine suggested to add d9vk to the configuration in Lutris. Today's build (https://git.froggi.es/joshua/d9vk/-/jobs job #691) magically solved the problem, so I'm adding that here in case it helps someone to run the game properly.
https://bugs.winehq.org/show_bug.cgi?id=38166
Paul Gofman gofmanp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gofmanp@gmail.com
--- Comment #24 from Paul Gofman gofmanp@gmail.com --- Created attachment 64914 --> https://bugs.winehq.org/attachment.cgi?id=64914 Do not pull buffers to system memory for write
Does the attached hack fix it on Nvidia?
https://bugs.winehq.org/show_bug.cgi?id=38166
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #25 from Kol kol@MV8660.spb.edu --- I can confirm that the patch from Comment#24 resolves this bug for Wine-staging 4.12.1. During 30 minutes of playing sometimes FPS falls to 15 (when many objects are visible), but never to 1-2. The videocard is GTX660 using Nvidia driver version 375.39. Esync is turned off because my old system does not support semaphores.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #26 from Paul Gofman gofmanp@gmail.com --- For the record, what is going on here. The application creates a big vertex buffer, ~25MB in size, and constantly updates it by locking the whole buffer. Most of the time the buffer is locked with _NOOVERWRITE and it goes ok. But sometimes application starts locking the buffer without any flags (still requesting the whole buffer lock). Such a lock is interleaved with multiple _NOOVERWRITE locks of the same buffer. The application is probably shy of that and does not ever do such a lock often, maybe once per frame approximately. While this is probably not supposed to work very efficient in any d3d implementation, for some reason such infrequent locks (which result in getting the buffer to system memory, locking there and offloading again to GPU upon subsequent use) result in disastrous slowdown with Nvidia proprietary driver. Loading the buffer to sysmem and back takes a good fraction of a second, and once that mode starts, is often accompanied by the following messages:
0031:err:d3d:wined3d_debug_callback 0x1ba470: "GL_OUT_OF_MEMORY error generated. Failed to allocate CPU address space mapping for texture (consider building 64-bit app).".
This is reported to happen with Nvidia proprietary driver only. I tested with Nouveau driver also on the same GPU and the problem does not appear with it.
So it looks like some memory managing specifics / issue with Nvidia driver. I am not sure my patch attached to this bug is really an improvement for a general case, this logic probably needs some neater heuristics to introduce a speed up somewhere else besides this game.
https://bugs.winehq.org/show_bug.cgi?id=38166
i.Dark_Templar idarktemplar@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |idarktemplar@mail.ru
--- Comment #27 from i.Dark_Templar idarktemplar@mail.ru --- Thanks for the patch from Comment #24! I had to update it a bit for wine-4.21, but it looks like it fixed this issue for me. BTW, I also use nvidia proprietary driver, currently version 440.44.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #28 from Vjacheslav galdralag@bk.ru --- It seems that attached diff already applied to wine5.0
But this bug is still occurs on wine5.0 and winestaging5.0 on nvidia 760M
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #29 from mo78@abv.bg --- Just use D9VK. Performance is way better :)
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #30 from michal.dybczak@gmail.com --- (In reply to mo78 from comment #29)
Just use D9VK. Performance is way better :)
The issue is also present on Proton 4.11-12, so D9VK doesn't help at all. The only way to play this game is to switch to Intel GPU, which is a possibility on hybrid machines.
I can't use the attached patch from comment #24 because I simply have no idea how to apply it on Proton. I don't want to tinker so deeply to run the game not knowing what it can do to other games.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #31 from i.Dark_Templar idarktemplar@mail.ru --- (In reply to Vjacheslav from comment #28)
It seems that attached diff already applied to wine5.0
But this bug is still occurs on wine5.0 and winestaging5.0 on nvidia 760M
As far as I can see, this patch is not applied to wine-5.0. And when I apply it locally, it still fixes this bug for me.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #32 from michal.dybczak@gmail.com --- Can you at least tell me how to apply it on wine? I may find a proper file in Proton but at the moment I have no idea where to look. Wine and proton file and paths are a deep maze :(.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #33 from Austin English austinenglish@gmail.com --- (In reply to michal.dybczak from comment #32)
Can you at least tell me how to apply it on wine? I may find a proper file in Proton but at the moment I have no idea where to look. Wine and proton file and paths are a deep maze :(.
For wine itself: https://wiki.winehq.org/Regression_Testing#Patching_your_git_tree
For proton, you'd have to ask them.
Please use the forums if you need further help compiling wine.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #34 from mo78@abv.bg --- (In reply to michal.dybczak from comment #30)
(In reply to mo78 from comment #29)
Just use D9VK. Performance is way better :)
The issue is also present on Proton 4.11-12, so D9VK doesn't help at all
You are very wrong. The game performs perfect with D9VK and this bug doesn't occure because of Vulkan ;)
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #35 from Vjacheslav galdralag@bk.ru --- (In reply to i.Dark_Templar from comment #31)
(In reply to Vjacheslav from comment #28)
It seems that attached diff already applied to wine5.0
But this bug is still occurs on wine5.0 and winestaging5.0 on nvidia 760M
As far as I can see, this patch is not applied to wine-5.0. And when I apply it locally, it still fixes this bug for me.
Currently (wine5.0) attached patch can not be applied directly. Patched function wined3d_buffer_gl_map does not exists in dlls/wined3d/buffer.c. But it can be applied manually to function buffer_resource_sub_resource_map that looks like renamed and modified wined3d_buffer_gl_map. After doing this, as I can test slowdown of game occurs a little later than without patch. So it is not fix.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #36 from Béla Gyebrószki gyebro69@gmail.com --- This bug seems to be fixed by https://source.winehq.org/git/wine.git/commit/77f0149a6c99fc0289d12a788f6305...
Please retest and confirm.
OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GT 730/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 455.46.02
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #37 from mo78@abv.bg --- It seems it's fixed, thanks for the heads up!
https://bugs.winehq.org/show_bug.cgi?id=38166
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |77f0149a6c99fc0289d12a788f6 | |30519d7dc49d3 Status|NEW |RESOLVED Component|-unknown |directx-d3d Resolution|--- |FIXED CC| |z.figura12@gmail.com
--- Comment #38 from Zebediah Figura z.figura12@gmail.com --- (In reply to Béla Gyebrószki from comment #36)
This bug seems to be fixed by https://source.winehq.org/git/wine.git/commit/ 77f0149a6c99fc0289d12a788f630519d7dc49d3
Marking fixed; thanks for testing.
https://bugs.winehq.org/show_bug.cgi?id=38166
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #39 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.0-rc5.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #40 from mo78@abv.bg --- Excuse me but is this commit present in RC4?
https://source.winehq.org/git/wine.git/commit/77f0149a6c99fc0289d12a788f6305...
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #41 from Zebediah Figura z.figura12@gmail.com --- (In reply to mo78 from comment #40)
Excuse me but is this commit present in RC4?
https://source.winehq.org/git/wine.git/commit/ 77f0149a6c99fc0289d12a788f630519d7dc49d3
Yes, the commit is present since 6.0-rc1.
https://bugs.winehq.org/show_bug.cgi?id=38166
--- Comment #42 from mo78@abv.bg --- Thank you very much and a Happy New Year :)