[Wine] Squeezing every last drop of performance out of DirectX
eff4eye at hotmail.com
Sat Apr 25 21:16:47 CDT 2009
I have been using Wine for some time now to run Team Fortress 2 (and other HL2 based games) on my Ubuntu system. I was previously running Ubuntu 7.10 with an Athlon64 3800+, a 7600GT (256MB of RAM), and 2GB of DDR2 333MHz. Recently I upgraded to Ubuntu 8.10 (i386) with an AthlonX2 64 6000+, an 8800GT (1GB of RAM) and 4GB of DDR 800MHz. I was really hoping for a nice performance bump (especially when I installed Wine 1.1.20 today) but unfortunately I really don't notice it. Windows of course runs TF2 without issue (it's like glass) but it's still choppy on Linux. I'm using the latest proprietary nvidia drivers as well.
I have found that passing the following options to TF2 definitely makes it run MUCH better (Steam-related options):
-heapsize 1048576 -dxlevel 81
Actually, to be precise, I'm running in windowed mode at like 1100 something by 940 (I think)? My monitor support 1280x1024 but I'm basically running at the largest I can such that it stays within the desktop without being overlapped by the top or bottom menu bars in gnome. So the options are something like:
-novid -windowed -w 1175 -h 940 -heapsize 1048576 -dxlevel 81
I am also using WINEDEBUG=-all when I launch Steam to suppress all debug messages.
I'm trying to find ways to make this run even smoother in Linux. I know there are some changes I can make to the HKEY_CURRENT_USER\Software\Wine\Direct3D key. I tried setting UseGLSL=disabled but it screwed up some of the textures that made it slightly more difficult to play. I have also properly set my videoMemorySize to 1024. I think I have tried the offscreenRendering option as well (set to fbo or not) but it didn't seem to help.
Overall the game runs fairly well. I get around 30 FPS for the most part in open areas (100+ FPS in small, confined areas), but every couple minutes it drops to less than 5 FPS (sometimes even 1 FPS). It will stay that way for about 4 or 5 seconds and then corrects itself. I thought that perhaps my CPU or was being pegged or the RAM was running out (doubtful with 4GB of RAM now) but that doesn't seem to be the case. I installed conky and I was monitoring my resources while running the game. The first CPU core was steady at 53% and the second core was steady at 12%. I was only using about 1.3 GB of RAM total (Steam and all other system resources). Using the UseGLSL=disabled option I didn't seem to notice this periodic drop to low FPS but like I said, some of the textures aren't quite acceptable for me.
Is there anything else that I can do to get better performance out of this? I have installed DirectX 9.0c (Nov2008 release) and it works with TF2 but the performance just isn't there (around 10FPS steady). Using the dxlevel 81 option performance is pretty good, but would I benefit by setting some of the DLLs to native? Several of the DLLs are already set to native, some are set to builtin but I think they mostly relate to DirectX 9.0c. Here are the instructions I used to install DX 9.0c:
Are there any other suggestions on how to get this faster via wine? Some of the things I'm wondering:
1) Are there any further tweaks I can make to the Direct3D registry key?
2) Are there any DLLs I should be tweaking and setting to native, for example? I do have a Windows partition that I can copy DLLs from.
3) Is running HL2 in windowed mode going to make things worse? It doesn't seem like it but I wouldn't be opposed to running in full screen mode (1280x1024). I haven't noticed any significant difference yet between full screen and windowed.
4) Any other suggestions?
If anyone knows any way to make this better please help. I have been a Linux user for years and the only reason I even keep a WinXP partition around is to run games. Otherwise I'm booting into one of my other partitions (Ubuntu, Fedora, or Slackware -- mostly Ubuntu).
In case there is nothing else I can do to improve things oh well -- Wine is still amazing these days. I'm really impressed and happy with it.
Rediscover Hotmail®: Get e-mail storage that grows with you.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-users