http://bugs.winehq.org/show_bug.cgi?id=36399
Bug ID: 36399 Summary: Terrible Performance in TERA Product: Wine Version: 1.7.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: sickam@mail.ru
Created attachment 48447 --> http://bugs.winehq.org/attachment.cgi?id=48447 Output of TERA with a play time of about 10 minutes
Hi! As described above TERA performs really bad under wine. This is confirmed by many players I have talked to about this who played it via Wine before.
My system is a Gentoo x86_64 using an Intel i5-3570k with a Geforce GTX 660 and I'm playing the EU Version: http://en.tera.gameforge.com/
I already tried a lot of possible solutions i found here, on the forums, on other forums and across the internet but nothing really helped so far. (For example: several registry keys, 32 and 64 bit prefix, using native/builtin dx3d libraries, enabling the virtual window mode in wine, disabling the winedebug output, ...) Since none of that helped i want to ask here for help. If anyone could install it on his machine and help me troubleshooting this i would really appreciate it. Also if anyone has a dualboot system feel free to compare the game between wine and native windows.
See attachment for an output log of TERA when i open the Launcher, log in and play a little bit (about 10 minutes). As you can see it spams a load of 'fixme:d3d:resource_check_usage Unhandled usage flags 0x8.' errors which i think are the reason for the bad performance which leads to extremely low FPS.
Thanks in advance!
http://bugs.winehq.org/show_bug.cgi?id=36399
wineuser sickam@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://en.tera.gameforge.co | |m/
http://bugs.winehq.org/show_bug.cgi?id=36399
wineuser sickam@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |performance
https://bugs.winehq.org/show_bug.cgi?id=36399
Jarkko K jarkko_korpi@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarkko_korpi@hotmail.com
--- Comment #1 from Jarkko K jarkko_korpi@hotmail.com --- fixme:d3d:resource_check_usage Unhandled usage flags 0x8
Is very common error while using wine. If you are using ubuntu, kubuntu or similar distro you may want to do this: sudo apt-get install winbind.
Also your UseGLSL setting is disabled? Have you tried it with enabled?
Your log doesn't tell too much about the problem.
How are your sounds working? There was a line that seemed that it couldnt use 22kh and it used 48khz instead. Which may impatc performance somehow.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #2 from wineuser sickam@mail.ru --- Yes, I had the UseGLSL setting enabled before but it feels smoother playing without that feature so I disabled it. Sound is working as well, haven't had any problems with it yet. I'll compile samba with winbind support later and give you report when I'm done.
"Your log doesn't tell too much about the problem." If you need anything else just let me know.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #3 from Jarkko K jarkko_korpi@hotmail.com --- Well I have 2 suggestions for you.
Which can improve performance.
start game with "WINEDEBUG=-all"
and you can try "stefan's csmt patchset"
can be found here
https://github.com/stefand/wine
I think you should provide more advanced debug log, but I am sorry to say that I don't know what settings should be used.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #4 from wineuser sickam@mail.ru --- I'm already starting the game with WINEDEBUG=-all. Unfortunately it doesn't provide any noticable improvements.
I'll check out that patchset later as well.
Thanks so far.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #5 from wineuser sickam@mail.ru --- Created attachment 48490 --> http://bugs.winehq.org/attachment.cgi?id=48490 Output after installing samba (playtime around 10 minutes)
Installing samba didn't fix the problem but the output. New file in the attachment. Going to try the patch set next.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #6 from wineuser sickam@mail.ru --- Created attachment 48491 --> http://bugs.winehq.org/attachment.cgi?id=48491 Output using Stefan Dösingers patchset (playtime around 5 minutes)
Okay installed the patchset. Unfortunately it also didn't fix the problem. Although, different output again. Check the attachment.
A new line is spammed now and a lot more often. It's `err:wgl:wglFlush wglFlush`
http://bugs.winehq.org/show_bug.cgi?id=36399
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #7 from joaopa jeremielapuree@yahoo.fr --- You should begin to fix that err:winediag:wined3d_dll_init The GLSL shader backend has been disabled. You get to keep all the pieces if it breaks.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #8 from Jarkko K jarkko_korpi@hotmail.com --- I don't remember how to setup csmt patches, because I haven't personally used them, but you need to have certain regedit key disabled/enabled.
Might be GLSL or strictdraworder, don't remember.
here is more of the patches
http://www.winehq.org/pipermail/wine-devel/2013-September/101106.html
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #9 from wineuser sickam@mail.ru --- Created attachment 48492 --> http://bugs.winehq.org/attachment.cgi?id=48492 Output after enabling CSMT and UseGLSL (playtime around 10 minutes)
@joaopa As I wrote before I already played it with UseGLSL enabled but since it feels smoother without it I disabled it. However this log is with GLSL enabled.
@Jarkko K Yes I already found out that i had to enable "CSMT" in [HKEY_CURRENT_USERSoftwareWineDirect3D]. It even performs a little bit better now but it's really not that much.
New log in attachment. One line was spammed so often this time, that i had to remove it out of the log to keep the size down (It was about 1.1 MB when i finished playing after ~10 minutes.
It's this line: `fixme:d3d_texture:wined3d_texture_cleanup Waiting for cs.`
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #10 from Jarkko K jarkko_korpi@hotmail.com --- I was given this tip to you:
run/export with WINEDEBUG=+tid,+timestamp .. that way one can see the spam rate per thread and check if it really causes performance bottleneck
Are you sure that was the only thing you need to make sure with csmt patches? I think also some strictdraworder must be set.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #11 from wineuser sickam@mail.ru --- Created attachment 48493 --> http://bugs.winehq.org/attachment.cgi?id=48493 Output with WINEDEBUG=+tid,+timestamp (playtime around 2 min)
Yes you're right but since it is disabled by default i didn't mention it.
My current registry keys in Direct3D are: CSMT="enabled" StrictDrawOrdering="disabled" UseGLSL="enabled"
run/export with WINEDEBUG=+tid,+timestamp
see attachment
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #12 from Jarkko K jarkko_korpi@hotmail.com --- What's your GPU driver and version and also your GPU memory size?
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #13 from Jarkko K jarkko_korpi@hotmail.com --- I don't know if this helps a bit but I found these
wine source code
http://source.winehq.org/git/wine.git/blob/b01fc1aa6e12b426b3f539c44196c9233...
https://github.com/stefand/wine/blob/master/dlls/wined3d/texture.c#L129
stefan's code
same function but a bit different.
Basically you could
put
// FIXME("Waiting for cs.\n");
not to print it at all, but I doubt that helps much if at all. The problem is somewhere deeper.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #14 from wineuser sickam@mail.ru ---
GPU driver and version
NVIDIA 337.19
GPU memory size
2048 MB
Now it gets a kinda tricky for me to follow you. I'm not that advanced. If i understood that right i have to replace the codeblock `static void wined3d_texture_cleanup(struct wined3d_texture *texture)` from the second link with the one from the first link and recompile. Is that right?
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #15 from Jarkko K jarkko_korpi@hotmail.com --- Just forget I doubt it helps anyway if you already start the game with no debugs.
If we are speaking about same game, this guy has quite close to your GPU
http://appdb.winehq.org/objectManager.php?sClass=version&iId=25812&i...
At least in numbers, don't know about performance. You could ask him tips.
I found something interesting.
fixme:d3d:debug_d3dformat Unrecognized 0x34324644 (as fourcc: DF24) WINED3DFORMAT!
That's one texture format that wine doesn't currently support. And I feel like that they are not so keen on adding the support (don't know why).
See this link
http://bugs.winehq.org/show_bug.cgi?id=23807
You could try patch
http://source.winehq.org/patches/data/104029
But you need to get wine source code via git (there is good guide wine homepage). Then you need to patch that file.
And rerun the game.
I don't know if that patch is 100% valid.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #16 from wineuser sickam@mail.ru --- I'm cloning the source code right now. Regarding the patch you posted there, what am I supposed to do with it? Sorry if that's a dumb question but i honestly have no idea.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #17 from Jarkko K jarkko_korpi@hotmail.com --- Check your email I sent email.
You need to change 1 file in your source code which is that file in that attachment. That's easy part, you just need to use one commandline command or manually edit.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #18 from wineuser sickam@mail.ru --- Created attachment 48494 --> http://bugs.winehq.org/attachment.cgi?id=48494 Output after applying patch 104029
I didn't get any mail yet. Anyway, a helpful guy on IRC helped me out and I managed to compile the git version with the patch.
Didn't change the performance problems either though.
The patched version from Stefan Dösinger provided the best performance so far even if it's still not good at all.
Check the attachment.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #19 from wineuser sickam@mail.ru --- Created attachment 48495 --> http://bugs.winehq.org/attachment.cgi?id=48495 Output after applying patch 104029 with Stefan Dösingers Fork of Wine
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #20 from wineuser sickam@mail.ru --- Disabling the ingame UI of TERA leads to a drastic FPS increase up to 400 %. In places where I get about 25-35 FPS with the UI, I get over 80 FPS with the UI disabled. Places I get lower FPS, about 20-25, i get about 60-70 FPS with the UI disabled. And places with even lower FPS (which includes cities, instances, crowded areas, ...) I still get around 30-50 FPS.
Too bad, that the game isn't playable without the UI.
This seems to be a common problem with the game. The UI was made with a software called Autodesk Scaleform (http://gameware.autodesk.com/scaleform).
However, i talked to people who told me that they tested the game on WINE and native Windows and compared the performance. They all agree that the game runs much better on Windows. In this case i don't consider this bug fixed yet.
https://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #21 from Henri Verbeet hverbeet@gmail.com --- Does WINEDEBUG="+d3d_perf" give any interesting output?
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #22 from wineuser sickam@mail.ru --- Created attachment 48520 --> http://bugs.winehq.org/attachment.cgi?id=48520 Output with WINEDEBUG=+d3d_perf
Here you go. Indeed it gives some more information.
`warn:d3d_perf:wined3d_debug_callback 0x175368: "Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches.`
For more see attachment.
https://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #23 from Henri Verbeet hverbeet@gmail.com --- (In reply to wineuser from comment #22)
Here you go. Indeed it gives some more information.
`warn:d3d_perf:wined3d_debug_callback 0x175368: "Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches.`
Those are harmless unless there are a lot of them, I'm afraid. I was mostly wondering if there were any calls to e.g. drawStridedSlow() to draw the UI, but it looks like that's not the case.
I notice the URL in the bug report offers a download. Can that be used to reproduce this? (I.e., should this bug report have the "download" keyword set?)
http://bugs.winehq.org/show_bug.cgi?id=36399
wineuser sickam@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #24 from wineuser sickam@mail.ru --- Yes, the game is free to play and downloadable through the URL which I added to the bugreport. I'd appreciate it if someone could install it on his machine and help searching for the problem. Added download keyword.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #25 from wineuser sickam@mail.ru --- I forgot to mention, that there's also an north american version of TERA for those who don't want/can play it on the EU servers. You can find it on http://tera.enmasse.com/.
Also toggling the UI ingame via CTRL+Z by default.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #26 from wineuser sickam@mail.ru --- The Autodesk Scaleform UI seems to cause an CPU bottleneck which is the reason for the low FPS.
http://www.reddit.com/r/GlobalOffensive/comments/1ynb0b/autodesk_scaleform_h... http://tera-forums.enmasse.com/forums/general-discussion/topics/TERA-UI-issu... unresolved?page=1
I think that this explains everything. I don't know if the CPU usage is higher on WINE than on Windows so if anyone could verify that it would help a lot.
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #27 from wineuser sickam@mail.ru --- Oops, something went wrong with the second link.
http://tera-forums.enmasse.com/forums/general-discussion/topics/TERA-UI-issu...
http://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #28 from wineuser sickam@mail.ru --- Tested and compared the game between my Linux- and a fresh Windows 7 setup. I can tell for sure by now, that the poor framerate is caused by the UI, but only on when playing via Wine! When i played the game on Windows it runs smoothly, didn't even see any differences between UI disabled/enabled. Up to 120 fps. However i can also get this framerate via Wine but only when the UI is disabled.
In this case i can only come to one conclusion. Wine does not have a problem with the game itself but with the the UI (again, the UI was made with Autodesk Scaleform - http://gameware.autodesk.com/scaleform).
Maybe someone could have a closer look at this.
I hope that this will be fixed in the future. Thanks so far to everyone.
https://bugs.winehq.org/show_bug.cgi?id=36399
Denis Misiurca infoman1985@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infoman1985@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #29 from Denis Misiurca infoman1985@gmail.com --- Almost 1 year of inactivity here... doesn't seem that this has a chance to be fixed soon.
https://bugs.winehq.org/show_bug.cgi?id=36399
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #30 from winetest@luukku.com --- (In reply to Denis Misiurca from comment #29)
Almost 1 year of inactivity here... doesn't seem that this has a chance to be fixed soon.
Can you retest now? Some if all CMST patches have been merged into wine. We are currently using wine 2.8. CSMT needs to be enabled from registery key. Unless you use wine-staging that has a checkbox for it. This should use more of your hardware and give some speedup.
https://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #31 from joaopa jeremielapuree@yahoo.fr --- Still a bug in current wine(3.20)?
https://bugs.winehq.org/show_bug.cgi?id=36399
temp82@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |temp82@luukku.com
--- Comment #32 from temp82@luukku.com --- is this game still available?
steam had this, but now it says: Notice: TERA - Action MMORPG is no longer available on the Steam store.
https://bugs.winehq.org/show_bug.cgi?id=36399
--- Comment #33 from temp82@luukku.com --- I think it's time to mark abandon this bug: https://www.mmorpg.com/news/tera-will-shut-down-on-thursday-morning-after-10...