http://bugs.winehq.org/show_bug.cgi?id=27959
Summary: [bisected] wine3d performance regression using NVidia proprietary drivers Product: Wine Version: 1.3.25 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: redalert.commander@gmail.com
This issue occurs for the first time in 1.3.23 and also 1.3.24 and 1.3.25.
When testing the latest git development code (it was a while ago) I noticed a strong performance regression when running direct3d applications. I proceeded with git bisecting the issue and came up with a single bad commit, reverting the offending commit fixed the issue.
Note: All tests were run with "Command & Conquer Generals: Zero Hour" and "Starcraft 2".
========================= 68b15bc5ffe6ddf5d08cbc13479eaf718ad5e39f is the first bad commit commit 68b15bc5ffe6ddf5d08cbc13479eaf718ad5e39f Author: Stefan Dösinger stefan@codeweavers.com Date: Tue Apr 19 21:24:26 2011 +0200
wined3d: Give GL_ARB_map_buffer_range another try.
Nvidia's 270.xx.yy driver series fix the glMapBuffer alignment issues that caused major performance problems. If the user is using an older driver we now drop the VBO instead of using doublebuffered loading, which means that we fall back to the current behavior(no dynamic VBO) as needed. Dynamic VBOs are needed on Nvidia drivers for GL_ARB_instanced_arrays. =========================
More info about my system: OS: Debian wheezy GPU: NVidia 9800 gt Driver: binary blob nvidia-glx 275.09.07-5 (debian testing repositories)
http://bugs.winehq.org/show_bug.cgi?id=27959
Steven redalert.commander@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=27959
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefandoesinger@gmx.at, | |wylda@volny.cz Component|-unknown |directx-d3d Version|1.3.25 |1.3.23 Summary|[bisected] wine3d |Starcraft 2 & CnC Generals |performance regression |Zero Hour: performance |using NVidia proprietary |regression using NVidia |drivers |proprietary drivers
http://bugs.winehq.org/show_bug.cgi?id=27959
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |performance
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #1 from Stefan Dösinger stefandoesinger@gmx.at 2011-08-01 18:09:18 CDT --- This patch shouldn't cause performance regressions any more, and I don't see any difference in StarCraft 2. What kernel are you using? I noticed that 2.6.39 had a performance regression vs 2.6.38 that is fixed in 3.0 already. Maybe this performance regression is triggered by the driver when dynamic VBOs are used.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #2 from Steven redalert.commander@gmail.com 2011-08-02 17:35:30 CDT --- (In reply to comment #1) I'm using 2.6.39-2-686-pae according to uname -a, the debian package is 2.6.39-3. I don't know the exact details of the problem, as I'm no specialist at the matter. It'll be a few days (or weeks) before 3.0 is uploaded to the testing repo's, but I'll make sure to test again. As a side note, I received updates to the nvidia driver as well today (update to 275.21-1), I'll run some tests tomorrow and report back if it fixes them, same for when the new kernel lands.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #3 from Steven redalert.commander@gmail.com 2011-08-09 15:25:40 CDT --- As promised, some more test results. I did another test with the new NVidia drivers that came in on the 2nd (see previous post): no changes, still slow, revert fixed it. Today I pulled the wine 1.3.26 release and tested again, still the same. After testing 1.3.26, I ran an system update, which installed Linux kernel 3.0, ran another test using this new kernel, unfortunately no change either.
OS: Debian Wheezy (testing) - up to date Kernel: 3.0.0-1-686-pae #1 SMP other specs didn't change since the last tests.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at 2011-08-09 18:14:54 CDT --- Can you quantify the regression(framerate before and after)?
http://bugs.winehq.org/show_bug.cgi?id=27959
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |68b15bc5ffe6ddf5d08cbc13479 | |eaf718ad5e39f
http://bugs.winehq.org/show_bug.cgi?id=27959
Joel "iLag" Hammond ilagdoesntcheckthisemail@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #5 from Joel "iLag" Hammond ilagdoesntcheckthisemail@gmail.com 2011-08-12 15:38:41 CDT --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=27959
Joel "iLag" Hammond ilagdoesntcheckthisemail@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ilagdoesntcheckthisemail@gm | |ail.com
--- Comment #6 from Joel "iLag" Hammond ilagdoesntcheckthisemail@gmail.com 2011-08-12 16:01:23 CDT --- I can confirm this in Mount&Blade: Warband. Prior to the bad commit, I got a solid 60fps (using Vsync, so it's capped there). Starting at the bad commit, my framerate in the tutorial scene dropped to around 30 when looking around the scene, along with jerky turning. Going into battles, my framerate never dropped below 45 before the bad commit, even on nearly-highest settings and in very large battles. Now even on lowest settings I can't play for more than 5 minutes before ragequitting at the very low performance I'm getting.
AMD Athlon 64 X2 4800+ 2GB DDR2 RAM 800Mhz Nvidia 9600GT OC (Drivers 275.21 and 280.13) Linux Mint 11 (Kernel 2.6.38)
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #7 from Steven redalert.commander@gmail.com 2011-08-12 17:26:13 CDT --- I did more tests today using "export WINEDEBUG=+fps". (tested on C&C generals: Zero hour) picked framerate is a good average. Only checked the game menu, as it is illustrative enough.
Normal framerate: trace:fps:X11DRV_SwapBuffers @ approx 30.62fps, total 22.05fps trace:fps:swapchain_gl_present 0x621bcf8 @ approx 30.62fps
With offending patch: trace:fps:X11DRV_SwapBuffers @ approx 1.94fps, total 13.56fps trace:fps:swapchain_gl_present 0x6162510 @ approx 1.94fps
which is frankly speaking a huge difference.
I did notice something else that might help debugging this, I have a dual monitor setup, but use 3 monitors, yet only 2 at the same time. So I change xorg configs when I switch between them.
When using separate x screens, the framerate is normal, both with and without the offending commit. When using xinerama, framerate without offending patch is normal, yet slow with the patch applied.
@Joel "iLag" Hammond: can you confirm this behavior?
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #8 from Stefan Dösinger stefandoesinger@gmx.at 2011-08-12 19:35:27 CDT --- Hi, Yeah, this is a total collapse of the framerate. Good catch on that Xinerama thing. Do you have direct rendering with Xinerama, or does the driver fall back to accelerated indirect rendering? This could explain some performance difference with buffer transfers. Does the problem also happen when you use Nvidia's twinview instead of Xinerama?
Either way I suspect there's a bug we hit in the driver. The best step would be to isolate this bug in a stand-alone opengl testcase that doesn't involve Wine and report it to Nvidia.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #9 from Steven redalert.commander@gmail.com 2011-08-13 10:13:47 CDT --- Thanks for looking into this Stefan.
I did another test with wine 1.3.26 (with the offending commit) using twinview as you suggested. C&C Generals Zero Hour doesn't even start, it gives me the message that directX 8.1 isn't installed (same message as I used to have when an x-org update overwrites some link from the NVidia driver, not a problem anymore since I switched to Debian provided drivers). Starcraft 2 does start in twinview mode, with a good framerate, yet only shows on the first monitor with large black areas to the left and right giving a 'vertically compressed' image (still on the first monitor, second monitor doesn't show anything different than with xinerama). I'm able to move the mouse, but unable to click any button, or the area where they should be, the game still reacts to the keyboard as it should.
When in xinerama mode I ran the following command: $ glxinfo | grep "direct rendering" direct rendering: Yes
This drastic drop in framerate only appears to be affecting wine, native games like chromium BSU and open arena run fine. However not every game in wine is affected, GTA Vice City runs fine.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #10 from Stefan Dösinger stefandoesinger@gmx.at 2011-08-13 15:45:55 CDT --- I think very few native games use GL_ARB_map_buffer_range and use dynamic buffers heavily. The extension is fairly new, and most (open source) Linux games are based on the Quake 3 engine. A native app that uses this extension is the Unigine Heaven benchmark. I don't know how much it uses dynamic buffers, but from the amount of animated geometry it displays it might be a fair amount(or they have very good vertex and geometry shaders for animation)
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #11 from Joel "iLag" Hammond ilagdoesntcheckthisemail@gmail.com 2011-08-13 18:03:22 CDT --- (In reply to comment #7)
@Joel "iLag" Hammond: can you confirm this behavior?
Sorry, I'm a single-monitor user, so none of that really applies. All I can confirm is a massive FPS drop when playing certain games normally. I can also confirm that Vice City doesn't appear to be having any problems, and Deus Ex is also fine. Of course, both of these games are older, so they either aren't doing anything that requires GL_ARB_map_buffer_range or are so light compared to today's games that the FPS drop is unnoticeable.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #12 from Steven redalert.commander@gmail.com 2011-08-14 07:31:50 CDT --- Stefan, it appears your assertion is correct about this being an NVidia bug. I downloaded the Unigine heaven benchmark (2.5 basic edition) and ran that in its default settings (windowed 1024x768). With xinerama I hardly hit 20 FPS, using separate X screens, I had about 45 FPS on the same areas (peaking to a bit over 70 is some parts). (Of course I used the Linux version)
Could you (or anyone else) write a simple test case I can run and submit to NVidia, as I have no experience whatsoever writing things like that?
As I still think this is partly a regression in Wine (the game worked perfectly before), would it be feasible to isolate this case and restore the old wine behavior just for this case? Or should I just keep a revert of that commit in my git tree until the issue is properly fixed? I imagine others may be hitting it as well.
However I don't see how that same issue is affecting Joel (comment #11) as he doesn't use a dual monitor setup, so I doubt he will be using xinerama, or perhaps xinerama only worsens the case (a lot)?
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #13 from Stefan Dösinger stefandoesinger@gmx.at 2011-08-14 13:08:29 CDT --- Hi,
Reporting a bug to Nvidia that the native Linux Unigine Heaven demo slows down would be a start. You can add to this bug that this affects other games too. With a game that doesn't use Wine we can at least avoid a "Hey, this may be a Wine bug" reply.
No, we won't put a hack in to disable dynamic buffers for this case. This may be an inconvenience for users that use Xinerama, but it would only take away pressure to get the actual bug fixed and cause pain for further development at some point. We usually don't have any hacks like that. We have a few hacks for cases that are easy to isolate, e.g. a driver lying about it's capabilities and falling back to software rendering.
It's pretty hard to catch a bug like this in a stand-alone test case, so I'd prefer to give a bug report based on Unigine Heaven a try first.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #14 from Steven redalert.commander@gmail.com 2011-08-14 19:06:58 CDT --- (In reply to comment #13)
No, we won't put a hack in to disable dynamic buffers for this case. This may be an inconvenience for users that use Xinerama, but it would only take away pressure to get the actual bug fixed and cause pain for further development at some point.
Fair enough.
It's pretty hard to catch a bug like this in a stand-alone test case, so I'd prefer to give a bug report based on Unigine Heaven a try first.
I submitted a bug report, right after testing with updated drivers (280.13 just landed in testing this afternoon), no change however.
I'll let you know should I get a response from that bug report.
http://bugs.winehq.org/show_bug.cgi?id=27959
Zhenya Zenitur@yandex.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Zenitur@yandex.ru
--- Comment #15 from Zhenya Zenitur@yandex.ru 2011-08-17 14:27:22 CDT --- What driver verision I need to install?
http://bugs.winehq.org/show_bug.cgi?id=27959
runetmember@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |runetmember@gmail.com
--- Comment #16 from runetmember@gmail.com 2011-08-20 02:23:51 CDT --- Steven, did you get any answer from nVidia?
Also, if someone want to report this issue too (more reports may increase priority in internal nVidia bugtracker) it's can be done here: http://nvidia.custhelp.com/app/chat/chat_launch http://nvidia.custhelp.com/app/ask
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #17 from Steven redalert.commander@gmail.com 2011-08-20 19:02:45 CDT --- No, up till now I haven't received a single response. I will keep testing in the meantime and will report it if this is fixed in a future update. Or if I get any answer.
http://bugs.winehq.org/show_bug.cgi?id=27959
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com Summary|Starcraft 2 & CnC Generals |GL_ARB_map_buffer_range is |Zero Hour: performance |slow on Nvidia GPUs with |regression using NVidia |multiple monitors |proprietary drivers |
http://bugs.winehq.org/show_bug.cgi?id=27959
Alexey Loukianov mooroon2@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mooroon2@mail.ru
--- Comment #18 from Alexey Loukianov mooroon2@mail.ru 2011-10-19 17:28:56 CDT --- Steven, could you please be more precise on how should I configure my Xorg installation and what is the exact commandline to use when running Unigine Heaven benchmark to spot the performance issues you had reported? I also use dual-screen setup at home and used to use nVIDIA TwinView (a.k.a. MetaModes) tech to get desktop spanned over both monitors. Should I reconfigure my installation to use Xinerama to reproduce the bug?
P.S. And as this bug seems also not to be a Wine fault shouldn't it be CLOSED INVALID?
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #19 from Stefan Dösinger stefan@codeweavers.com 2011-10-19 22:40:06 CDT --- (In reply to comment #18)
P.S. And as this bug seems also not to be a Wine fault shouldn't it be CLOSED INVALID?
In general yes, although I'd like to try to gather more information and making sure that we have reported the issue to Nvidia.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #20 from Steven redalert.commander@gmail.com 2011-10-20 17:55:34 CDT --- (In reply to comment #18)
Steven, could you please be more precise on how should I configure my Xorg installation and what is the exact commandline to use when running Unigine Heaven benchmark to spot the performance issues you had reported? I also use dual-screen setup at home and used to use nVIDIA TwinView (a.k.a. MetaModes) tech to get desktop spanned over both monitors. Should I reconfigure my installation to use Xinerama to reproduce the bug?
Yes, Xinerama seems to be the needed to trigger this bug. As for the Unigine commandline arguments, I'm not sure about the exact command line, but I'm sure it was something simple if just running the binary doesn't give the desired results. Certainly nothing fancy.
I cant reproduce right now as I'm running nouveau drivers, due to an incompatibility between xserver 1.11 and the nvidia 275 drivers (current Debian testing). I'm not to keen on installing the drivers from nvidia directly as I always needed to reinstall them after a kernel or X upgrade and I'm to lazy to downgrade the xserver. Although I'm eager to try out the 285 driver (currently in Debian experimental), I'll do so as soon as they go into testing.
That said, the clue is definately xinerama, twinview does not appear to be affected, neither are separate x screens or single monitor setup. Should you be unable to reproduce, I do have to note that both monitors have a different resolution (1248x1024 and 1024x786), but I don't really think this matters.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #21 from Alexey Loukianov mooroon2@mail.ru 2011-10-20 20:37:12 CDT --- (In reply to comment #20)
Yes, Xinerama seems to be the needed to trigger this bug. ... Should you be unable to reproduce, I do have to note that both monitors have a different resolution (1248x1024 and 1024x786), but I don't really think this matters.
Ok, thanks for providing this information. AFAIRC, there were some warnings about OpenGL vs. Xinerama in nVIDIA Driver readme but I can't tell for sure. Going to re-read readme and report here in case anything relevant found. My setup also includes monitors running at different resolutions, notably 1280x960 and 1680x1050. Would try to configure my xorg to use Xinerama instead of TwinView today and check for performance issues in Unigine Heaven benchmark. OTOH I've got around ~30-50 FPS with my 550 Ti in this benchmark when testing @1680x1050 with MODERATE amount of tesselation enabled (using NORMAL and EXTREME tesselation profiles bring the FPS down to 5-10-15 level) so it isn't running "fast" in any case. Hope it wouldn't prevent me to spot the Xinerama-related FPS drop if there would be any.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #22 from Alexey Loukianov mooroon2@mail.ru 2011-10-21 01:36:44 CDT --- Successfully reproduces on my rig. Unigine Heaven, windowed, 1024x768, no AA, 8x ANISO, no tesselation, low quality shaders, high quality textures. Getting ~70-80 FPS with single monitor setup or with TwinView and ~15-20 when using dual-screen Xinerama setup. Would report this issue to nV News forums shortly.
http://bugs.winehq.org/show_bug.cgi?id=27959
--- Comment #23 from Wylda wylda@volny.cz 2011-12-03 06:52:46 CST ---
(In reply to comment #22)
As there wasn't any note about wine, i think regression keyword could be removed and closed as invalid??
http://bugs.winehq.org/show_bug.cgi?id=27959
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #24 from Stefan Dösinger stefan@codeweavers.com 2011-12-04 14:08:45 CST --- Yes, I think closing this as invalid is the proper thing to do. The bug is reproducible without Wine and Nvidia has been informed about this bug. What's needed to get this fixed is someone to chase after Nvidia(or, even better, invest a lot of effort into Nouveau)
http://bugs.winehq.org/show_bug.cgi?id=27959
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression | Regression SHA1|68b15bc5ffe6ddf5d08cbc13479 | |eaf718ad5e39f |
http://bugs.winehq.org/show_bug.cgi?id=27959
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #25 from Wylda wylda@volny.cz 2011-12-04 16:55:13 CST ---
Closing.
http://bugs.winehq.org/show_bug.cgi?id=27959
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com Resolution|INVALID |UPSTREAM