Squeezing every last drop of performance out of DirectX

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Brandon Mayes

Squeezing every last drop of performance out of DirectX

Post by Brandon Mayes »

Hi Folks,

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:

http://howto.landure.fr/gnu-linux/insta ... using-wine


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.

Thanks!

-Brandon




_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you.
http://windowslive.com/RediscoverHotmai ... ge2_042009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
User avatar
Daemon
Level 4
Level 4
Posts: 101
Joined: Wed Nov 12, 2008 2:24 pm

Re: Squeezing every last drop of performance out of DirectX

Post by Daemon »

I have found that passing the following options to TF2 definitely makes it run MUCH better (Steam-related options):

-heapsize 1048576 -dxlevel 81
With 4 gigs ,actually 2 gigs since you're running a 32-bit program, you could safely leave datacachesize/heapsize values to default which is what 521000 or 256000.(?)
Actually, to be precise, I'm running in windowed mode at like 1100 something by 940 (I think)?
Make sure you have the WM set to Metacity(no effects) not Compiz. So basically it's fullscreen wthout going fullscreen? ??
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.
ORM should be set to fbo to take advantage of the newest drivers(180.44+) drivers and your hardware. The RegistryWiki - http://wiki.winehq.org/UsefulRegistryKeys has all the fun Direct3D settings info.
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).
network congestion(?) or related to running with such a low heapsize probably.
I have installed DirectX 9.0c
I don't believe this is really necessary anymore. It seems to cause more problems than it's worth. In any case, you already have WineD3D(X) installed from a base wine install. At most you'd have to download(dll-files.com) the d3dx9_36.dll to d3dx9_40.dlls / Xaudio stuff to the windows/system32 directory depending on how much the app complains.

Tweakguides
http://www.tweakguides.com/HL2_5.html
applies to most source engine games
----------------------------
i heart quoting
Brandon Mayes

Squeezing every last drop of performance out of DirectX

Post by Brandon Mayes »

Thanks for the reply, though I still have a few more questions:
With 4 gigs ,actually 2 gigs since you're running a 32-bit
program, you could safely leave
datacachesize/heapsize values to
default which is what 521000 or 256000.(?)

Why do that? I'm increasing it to 1GB instead of using the default (be it 512 or 256), thus I am providing it more room to store things.

Make sure you have the WM set to Metacity(no effects) not Compiz. So basically
it's fullscreen wthout going fullscreen? ??
I think I am using Compiz. Under System -> Preferences -> Appearance -> Visual Effects I have it set to Normal. If I set it to none that disables Compiz right? Assuming I do that do I need to reboot the machine or restart X (such as ctrl+alt+bksp) for the performance increases to take effect? Or can I just restart Steam and it will run better without the need to restart anything?

As far as my windowed mode, I basically played with the -h option to steam until I found that the window fit perfectly on my desktop, between the top and bottom menu bars. Here's a screenshot:

http://slackbox.homelinux.org/TF2screenshot.jpg

network congestion(?) or related to running with such a low heapsize probably.
Highly unlikely. This machine is attached to my 1Gbps router (and yes, it's using a CAT6 cable so I can actually achieve such speeds). My Mac Mini is also wired in (it is my music server, my web server, etc.) and there are a few other laptops sometimes connected. However, the game runs fine in Windows which is on a different partition on this same machine. So why would the network be slow when I boot into Linux but not when I boot into Windows? There is no massive downloading going on -- if anyone were to do that it would be me and not the wife, and certainly I wouldn't download a new ISO or anything while playing. I think I can safely rule this out, especially since like I said, setting the UseGLSL=disabled key in the registy seems to keep the game from choking every few minutes. The problem seems to be more related to the DirectX implementation than networking.

Also, why do you say I have a low heapsize? If you assume that the default is 256MB then it's four times that size, and double the size of the default if it's 512MB. I got 1048576 by increasing by a factor of 2. Basically, you can start with 2, then 4, then 8, and so on if you want. To be more efficient I started with 32768 (2^15) and doubled it several times until I got the exact number 1048576. You said 256000 or 512000. Notice those are 6 digits in length, my value is 7. Thus, the value I am using is not low; on the contrary it is significantly larger than the values you suggested.

ORM should be set to fbo to take advantage of the newest
drivers(180.44+)
drivers and your hardware. The RegistryWiki -
http://wiki.winehq.org/UsefulRegistryKeys
has all the fun Direct3D
settings info.

It looks like I'm running 180.11 but those are the newest available to me (I'm not compiling the nvidia drivers from source -- just using the ones that Ubuntu offers to me). I did go and set a few more registy keys, including the ORM=fbo as you mentioned. This is currently all of the keys I have set in there (not sure if the DDRender=opengl is really necessary):

DirectDrawRender = opengl
OffScreenRenderingMode = fbo
VideoMemorySize = 1024
VideoPciVendorID = 0x000010de
VideoPciDeviceID = 0x00000611

I found the vendor and device ID using lspci:

$ lspci -n | grep 0300
01:00.0 0300: 10de:0611 (rev a2)

I have installed DirectX 9.0c
I
don't believe this is really necessary anymore. It seems to cause more
problems than it's worth. In any case, you already have WineD3D(X)
installed from a base wine install. At most you'd have to
download(dll-files.com) the d3dx9_36.dll to d3dx9_40.dlls / Xaudio
stuff to the windows/system32 directory depending on how much the app
complains.

Hmm...well I'm still a little confused about this. By using the -dxlevel 81 option with Steam I'm forcing it to using DirectX 8.1, so I'm not really using the DirectX 9.0c stuff even though it is installed (like I said, setting -dxlevel 90 worked, but the FPS was maxing out around 10-12...just unplayable).

According to my registy and winecfg I already have d3dx9_36.dll (set to native) but I do not have 37, 38, 39, or 40. Do I need those?

Also, I have a d3d8.dll which is set to builtin, a d3d9.dll set to builtin, but then there's a d3dx8.dll set to native. Would it help if I copied over the d3d8.dll and d3d9.dll files from my Windows partition and then set these libraries to native? Sorry, lots of questions I know, but I'm just not that familiar with DirectX.

I will also try a few more of the steam related tweaks. Who know if they will help or not but I'll sure try.

-Brandon



_________________________________________________________________
Rediscover Hotmail®: Get quick friend updates right in your inbox.
http://windowslive.com/RediscoverHotmai ... es2_042009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Cloudef
Level 4
Level 4
Posts: 138
Joined: Wed Mar 18, 2009 3:10 pm

Post by Cloudef »

Im running TF2 with 100-200 fps on DX Level 81, Directx9+ games are still pretty choppy on wine and so TF2 plays much slower on dxlevel 95,
I suggest enabling multi-threading in TF2, if you have dual-core or quad core
User avatar
Daemon
Level 4
Level 4
Posts: 101
Joined: Wed Nov 12, 2008 2:24 pm

Post by Daemon »

I was off by 1 digit when I was looking at your heapsize setting.:) I thought it was set to 104 MB not 1 Gig. An easy way to switch off between Compiz<->Metacity is by using 'Fusion-icon'. It's in the ubu repos. No Effects would be Metacity. There's no need to reboot the gdm session. There's also the Vertex/Pixel shader settings in winecfg->Graphics which I'm assuming are selected already. You could test the newer binary drivers (180.51) and see if there's any improvement.

There's probably some TF2 specific console commands. Google around for a console command list to put in your autoexec.cfg.

As far WineD3D goes if you want to test out by starting off clean. You could rename /home/(user)/.wine to .wine.old then you'd just have to import the registry settings - system.reg,userdef.reg,user.reg and any relevant EXE's / stuff you might have in Program Files. The .wine directory will be recreated once you do winecfg. If it doesn't do anything for you , you can delete .wine and rename .wine.old back.

-------------------
out of ideas.
DL
Level 3
Level 3
Posts: 70
Joined: Fri Jun 27, 2008 7:47 pm

Post by DL »

You could try wine-1.1.15 and this patch http://bugs.winehq.org/attachment.cgi?id=1963711
Brandon Mayes

Squeezing every last drop of performance out of DirectX

Post by Brandon Mayes »

Im running TF2 with 100-200 fps on DX Level 81, Directx9+ games are still pretty choppy on wine and so TF2 plays much slower on dxlevel 95,
I suggest enabling multi-threading in TF2, if you have dual-core or quad core
You *MUST* tell me what sort of configuration you are using! I have found the following have seemed to have greatly helped me:

1) Setting the heapsize and dxlevel options

2) Disabling compiz for metacity (many thanks for the fusion-icon tip -- it makes it super easy to switch between the two!)

3) Setting up some of the Direct3D registry keys. Right now it looks like this:

DirectDrawRender = opengl
OffScreenRenderingMode = fbo
PixelShaderMode = enabled
VertexShaderMode = hardware
VideoMemorySize = 1024
VideoPciDeviceID = 0x0611
VideoPciVendorID = 0x10de


I'm not sure how much prefixing my commands with "WINEDEBUG=-all" really helps but I'm using it anyway. Also, I have previously run this with the 173 and 176 nVidia drivers. I don't notice any significant improvements with the 180 drivers so I'm not convinced that compiling the latest minor release is going to improve things much either. I'll just stick with the binary drivers.

I do indeed have a dual core CPU, so I tried setting the multi-threaded option in TF2 (I don't know why I have never noticed this before!). It defaulted to disabled, but I went ahead and enabled it anyway. Unfortunately it seemed to make it choppy. Every second or two the FPS went from 100+ to 50 or so, and while 50+ is a good rate, there was a bit of stuttering when it switched from one rate to the other. So it seems better with this option disabled.

I also tried using the following options but they didn't seem to improve things much:

r_threaded_particles=1

Determines whether the particle system is multi-threaded. This should be set to 1 on systems with multi-core CPUs.

r_threaded_renderables=1

Determines whether part of the rendering system is multi-threaded. This
can be set to 1 on systems with multi-core CPUs to potentially improve
performance.


Also, even when using the multi-threaded option I still seemed to get the period drop to single digit frame rates. I am still getting that and my only other option at this point is to try backing up the existing d3d8.dll and d3d9.dll, replacing them with ones from my XP partition, and setting the libraries to native. I haven't heard anyone say this will or will not help yet, but I'm willing to try it and see since it's really not much effort.


With all of the above tweaks so far I am hitting 100+ framerates now on certain areas (like Warpath2_U4 I was getting these rates coming out of spawn walking toward the middle of the map) but it seems like I still get 20-30 FPS in high-intensity areas (which might also have more textures) such as the middle bridge on Warpath. The periodic drops seems to only drop to about 10-12 FPS but it still becomes laggy and I generally die when it happens (of course it's right as I come around the wall and run into an enemy -- it never seems to happen when I have just entered respawn again)...

If anyone has any further suggestions I'm open to them, but I'm starting to think this is as good as it gets. :(


_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive? ... ive_042009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
IneedAname

Squeezing every last drop of performance out of DirectX

Post by IneedAname »

On Sun, 26 Apr 2009 11:34:08 -0500
Brandon Mayes <[email protected]> wrote:
I think I am using Compiz. Under System -> Preferences -> Appearance -> Visual Effects I have it set to Normal. If I set it to none that disables Compiz right? Assuming I do that do I need to reboot the machine or restart X (such as ctrl+alt+bksp) for the performance increases to take effect? Or can I just restart Steam and it will run better without the need to restart anything?
You do not need to restart anything when switching the window manager.
Danila Sentiabov

Squeezing every last drop of performance out of DirectX

Post by Danila Sentiabov »

I think you really should get a clean wine 1.1.20 prefix and reinstall TF
there without installing DirectX (or anything else). Then try playing the
game without applying all your registry tweaks (with -dxlevel 81).
Then try applying those tweaks and see if it helps.

Installing DirectX on Wine may create a little mess in your prefix, I'm
afraid.

--
Best regards,
Danila Sentiabov aka dsent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Brandon Mayes

Squeezing every last drop of performance out of DirectX

Post by Brandon Mayes »

I think you really should get a clean wine 1.1.20 prefix and reinstall
TF there without installing DirectX
(or anything else). Then try playing the game without applying all your registry tweaks (with
-dxlevel 81).
Then try applying those tweaks and see if it helps.
Installing DirectX on Wine may create a little mess in your prefix, I'm afraid.
So if I were to do this -- what all is necessary? Can I just run these 2 commands (I'm running Ubuntu 8.10)?

# sudo apt-get autoremove wine
# rm -rf ~/.wine

I know there are going to be some menu entries left around in the gnome applications menu as well. I can remove those (usually just deleting stuff from ~/.local/share).

I guess I just don't know what you mean by prefix (I'm assuming you mean ~/.wine), nor do I really know why installing DirectX 9.0c would muck things up...Do you really think that installing DX9 is going to actually make performance worse?

FYI, for anyone following this I did copy over the d3d8.dll and d3d9.dll files from my Windows partition and set the libraries to native. First, the native d3d9.dll caused TF2 to crash as soon as I clicked to launch it (though Steam seemed to work fine), and while the native d3d8.dll file doesn't seem to cause any problems, it doesn't seem to perform any better than the builtin file.

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive? ... ive_042009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Re: Squeezing every last drop of performance out of DirectX

Post by jorl17 »

Brandon Mayes wrote:
I think you really should get a clean wine 1.1.20 prefix and reinstall
TF there without installing DirectX
(or anything else). Then try playing the game without applying all your registry tweaks (with
-dxlevel 81).
Then try applying those tweaks and see if it helps.
Installing DirectX on Wine may create a little mess in your prefix, I'm afraid.
So if I were to do this -- what all is necessary? Can I just run these 2 commands (I'm running Ubuntu 8.10)?

# sudo apt-get autoremove wine
# rm -rf ~/.wine

I know there are going to be some menu entries left around in the gnome applications menu as well. I can remove those (usually just deleting stuff from ~/.local/share).

I guess I just don't know what you mean by prefix (I'm assuming you mean ~/.wine), nor do I really know why installing DirectX 9.0c would muck things up...Do you really think that installing DX9 is going to actually make performance worse?

FYI, for anyone following this I did copy over the d3d8.dll and d3d9.dll files from my Windows partition and set the libraries to native. First, the native d3d9.dll caused TF2 to crash as soon as I clicked to launch it (though Steam seemed to work fine), and while the native d3d8.dll file doesn't seem to cause any problems, it doesn't seem to perform any better than the builtin file.

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive? ... ive_042009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Yes, that's all you need, to remove wine (if you want to install another version) and remove its folder, be sure to backup anything though. Also, remember that all your wine configuration will be lost. The prefix means exactly what you figured -- the user folder. You can have multiple prefixes in wine, by running wine with the WINEPREFIXCREATE env var (someone correct me if wrong, please), and then using that prefix with WINEPREFIX.

Installing DX9 might get some DLLs which use unimplemented functions, or expect certain functions to behave in a way, while wine does not exhibit that behavior. It's always good to try and keep things to the wine implementation, which knows exactly what to expect from its code. Additionally, some Wine functions that the native DX use could possibly be implemented in a low-performance way, while Wine's implementation uses others -- just to throw in some random coins at the issue.

I think you should never even do what you did with those DLLs, since it definetely will not work. I'm even surprised that you managed to run the game at all in dx8, I suppose that either wine used its builtin DLL or something very strange happened there.
gamblor01
Level 2
Level 2
Posts: 25
Joined: Tue Apr 28, 2009 8:25 am

Post by gamblor01 »

So I finally figured out how to register for this forum -- this is MUCH easier than using the mailing list!

I really appreciate everyone's help. I didn't read this most recent post until now (thank you though. The explanations were good), but I went ahead and blasted my wine environment this morning per dsent's suggestion. As stated previously, I just did the apt-get autoremove wine, rm -rf ~/.wine, and then cleaned out the wine entries in ~/.local/share and ~/.config

I then reinstalled Wine 1.1.20 (apt-get install wine), and then reinstalled the Orange Box and applied ONLY the following changes:

1) passing -dxlevel and -heapsize to Steam
2) using WINEDEBUG=-all
3) switching from Compiz to Metacity

The difference is astounding. I'm operating normally on maps in the 50-60 FPS range, though it does occasionally drop to about 20 something. I even saw it hit 200+ at one point.

It still does occasionally have the problem where it drops to single digit frame rates, but it doesn't seem to happen nearly as often. I added the Direct3D registy key back and performance noticeably worsened. The game became choppy and hovered more around the 20-30 FPS range with spikes up into 100+. However, even though the frame rates still seemed reasonable, it was definitely choppy.

I had all of the 7 or 8 different values in there so I'm not sure which one (or combination) specifically is making it worse, but it's running so well at this point I don't think I need to do any further investigation -- I just deleted the entire Direct3D key and all of the values underneath it. The only key I might consider adding back is the VideoMemorySize key. I'll see if that helps I guess, but I don't feel like I want/need to try all combinations of them at this point.

Thank you all for your suggestions -- this really helped! I thought I had noticed a considerable performance hit since I first installed Steam but then I thought I was just being paranoid. It turns out I was not; the more I tried to tweak the game the more I was actually slowing it down.

I don't plan on installing DX 9.0c this time either. ;)

One last little tip, I stuck the following line in my ~/.gnomerc file:
fusion-icon &
This way, whenever I login to gnome the icon is launched automatically for me. :)

Thanks again!
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

I'm glad you managed to do it!

Since you're on Ubuntu, I thought you might want to take a look at this script, since it is meant to play games.

My experience with it is very positive and I've been using it on all my machines, except for one where the hit of an extra X server really kills the performance. Also, to check your performance in either of the X servers, you can try glxgears :D

Good luck,

Jorl17
gamblor01
Level 2
Level 2
Posts: 25
Joined: Tue Apr 28, 2009 8:25 am

Post by gamblor01 »

Cool thanks for the tip. Do you know if this works on Intrepid? I see plenty of information saying that it was tested with Hardy but nothing about Intrepid...

Also, how does this work? Just copy the script into a file called x.game, make it executable and then run x.game --install? After that it looks like I press ctrl+alt+F12 to switch the "gaming" X server and ctrl+alt+F7 (or maybe it's F8 ) to switch back to my "normal" one?

Sounds like an interesting idea. If it works with 8.10 I might have to give it a shot. I just hate mucking around with this too much as this partition is my main one (I also have Fedora 11 alpha, and Slackware 12.1 running, but Ubuntu is where I spend most of my time). I'm just a little concerned that it will screw something up and I'll have to invest the time to fix it. :?
gamblor01
Level 2
Level 2
Posts: 25
Joined: Tue Apr 28, 2009 8:25 am

Post by gamblor01 »

Just FYI this x.game script (v0.8 ) works just fine on Intrepid. I tried it out and I'm not sure it really helped my FPS though. Seemed to perform about the same as my normal X desktop with Metacity instead of Compiz.

I also had to use a bit of a workaround because of the spaces in the path to Steam (Program Files). Plus I can switch between Compiz and Metacity probably just as fast as switching between desktops. This all seemed like a little too much hassle for not very much gain, so I uninstalled it.

I'm pretty sure that I'm all set here. I'm just going to run with all of the default Wine stuff (-dxlevel 81) and Metacity over Compiz. It runs great.
Last edited by gamblor01 on Wed Apr 29, 2009 10:46 pm, edited 1 time in total.
Cloudef
Level 4
Level 4
Posts: 138
Joined: Wed Mar 18, 2009 3:10 pm

Post by Cloudef »

Hello, sorry for late response.
You wanted my config, well here:

Image
Readtex is must for nVidia cards :wink:
Also you may disable GLSL if you dont want shaders (Reduces image quality tho in games that heavily depends on shaders).

I may have also fiddled other things on Wine to boost performance, even compiled with different CFlags (Optimizations to my CPU) also some other minor things i don't remember tho :P I also have DX 9.0c installed trough winetricks.

Here is my TF2 Config (Actually i use it on every Source game, but mainly it improves Garry's Mod perfomance and latency):

TF2 tho works perfectly without FPS config, it's just GMod that i want to run best as possible :P I have tested TF2 just with multi threading and dx_level 81 works fine.

Code: Select all

mat_dxlevel "81"
cl_showfps "1"
//Chucker's FPS config
 
//Netcode Settings (change to your preference)
rate "35000"
cl_cmdrate "33"
cl_interp_ratio "1.0"
cl_updaterate "33"
cl_interpolate "1"
cl_interp_threadmode "1"
cl_interp_all "1"

alias 100rate "cl_cmdrate 100; cl_updaterate 100; bind F11 33rate; echo > cmdrate 100 / updaterate 100"
alias 80rate "cl_cmdrate 80; cl_updaterate 80; bind F11 100rate; echo > cmdrate 80 / updaterate 80"
alias 66rate "cl_cmdrate 66; cl_updaterate 66; bind F11 80rate; echo > cmdrate 66 / updaterate 66"
alias 50rate "cl_cmdrate 50; cl_updaterate 50; bind F11 66rate; echo > cmdrate 50 / updaterate 50"
alias 33rate "cl_cmdrate 33; cl_updaterate 33; bind F11 50rate; echo > cmdrate 33 / updaterate 33"
bind F11 100rate;
bind "x" "say !rtd I hate rape."

//Actual Video Settings
mat_antialias "4"
mat_forceaniso "16"
mat_hdr_enabled 0
mat_hdr_level 0
mat_picmip 2
mat_vsync 0
r_rootlod 2
mat_monitorgamma "1.6"  //Ingame Gamma Settings

//FPS Settings
fps_max 0  //Setting to 0 sets no max limit
cl_detaildist "0"
cl_detailfade "0"
cl_drawmonitors "0"
cl_ejectbrass "0"
cl_forcepreload "1"
cl_lagcomp_errorcheck "0"
cl_lagcompensation "1"
//cl_downloadfilter "nosounds"
cl_ejectbrass "0"
cl_forcepreload 1
cl_phys_props_enable "0"
cl_phys_props_max "0"
cl_show_splashes "0"
cl_smoothtime "0.01"
cl_smooth 0
commentary 0
mat_aaquality "0"
mat_autoexposure_max "0"
mat_autoexposure_min "0"
mat_bloomscale "0"
mat_bufferprimitives "0"
mat_bumpmap "1"
mat_clipz "1" 
mat_compressedtextures "1"
mat_diffuse "1" 
mat_disable_bloom "1"
mat_disable_fancy_blending "1"
mat_disable_lightwarp "1"
mat_disable_ps_patch "1"
mat_envmapsize "0"
mat_excludetextures "1"
mat_envmaptgasize "0"
mat_fastspecular "1"
mat_filterlightmaps "1"
mat_filtertextures "1"
mat_forcehardwaresync "0"
mat_forcemanagedtextureintohardware "0"
mat_framebuffercopyoverlaysize "0"
mat_hdr_enabled "0"
mat_hdr_level "0"
mat_hdr_manual_tonemap_rate "0"
mat_mipmaptextures "0"
mat_lightmap_pfms "0"
mat_maxframelatency "0"
mat_max_worldmesh_vertices "0"
mat_parallaxmap "1"
mat_picmip "1"
mat_queue_mode "-1"
mat_reducefillrate "1"
mat_shadowstate "0"
mat_show_ab_hdr "0"
mat_showlightmappage "-1"
mat_specular "0"
mat_texture_limit "-1"
mat_use_compressed_hdr_textures "1"
mat_showenvmapmask "0"
mat_showlowresimage "0"
mat_showmaterials "0"
mat_showmaterialsverbose "0"
mat_supportflashlight "1"
mat_wateroverlaysize "0"
mat_motion_blur_enabled "1"
mat_motion_blur_percent_of_screen_max "12"
mat_softwarelighting "0"
mp_decals "200"
muzzleflash_light "0"
net_maxfragments "1280"
net_maxfragments "1280"
net_showevents "0"
npc_height_adjust "1"
props_break_max_pieces "0"
props_break_max_pieces_perframe "0"
r_3dnow "1"
r_3dsky "0"
r_PhysPropStaticLighting "0"
r_WaterDrawReflection "1"
r_WaterDrawRefraction "1"
r_ambientboost "0"
r_cheapwaterend "1"
r_cheapwaterstart "1"
r_decal_cullsize "100"
r_decals "200"
r_dopixelvisibility "0"
r_drawbatchdecals "1"
r_drawflecks "1"
r_drawmodeldecals "1"
r_drawmodelstatsoverlaymax "1.5"
r_drawmodelstatsoverlaymin "0.01"
r_drawspecificstaticprop "0"
r_dynamic "0"
r_eyeglintlodpixels "0"
r_eyemove "1"
r_eyes "1"
r_fastzreject "0"
r_flashlightrendermodels "1"
r_unloadlightmaps "1"
r_flashlightrenderworld "1"
r_flex "0"
r_forcewaterleaf "0"
r_lod "2"
r_staticprop_lod "4"
r_maxdlights "0"
r_maxmodeldecal "10"
r_maxnewsamples "5"
r_maxsampledist "10"
r_minnewsamples "0"
r_mmx "1"
r_norefresh "0"
r_occlusion "0"
r_renderoverlayfragment "0"
r_queued_decals "1"
r_rootlod "2"
r_ropetranslucent "0"
r_shadowmaxrendered "32"
r_shadowrendertotexture "1"
r_shadows "1"
r_spray_lifetime "0.1"
r_sse "1"
r_sse2 "1"
r_teeth "1"
r_staticpropinfo "0"
r_updaterefracttexture "0"
r_updaterefracttexture "0"
r_visualizeproplightcaching "1"
r_waterdrawreflection "1"
r_waterforceexpensive "1"
r_waterforcereflectentities"1"
rope_averagelight "0"
rope_collide "0"
rope_shake "0"
rope_smooth "0"
rope_smooth_enlarge "0"
rope_smooth_maxalpha "0"
rope_smooth_maxalphawidth "0"
rope_smooth_minalpha "0"
rope_smooth_minwidth "0"
rope_subdiv "0"
rope_wind_dist "0"
 
//Blood settings
violence_ablood 1
violence_agibs 1
violence_hblood 1
violence_hgibs 1

net_graph "0"
 
echo FPS Config Loaded!
Also you may want to do something like this when you've launched the game

Code: Select all

gksudo "renice -16 $(pgrep hl2)"
It makes your hl2 process priority higher, tho you may want to change the -16 value if you dont see any performance boost. Thats all i remember for now :/
gamblor01
Level 2
Level 2
Posts: 25
Joined: Tue Apr 28, 2009 8:25 am

Post by gamblor01 »

@ Cloudef:

Thanks for all of the info. I guess I will try tweaking some of the values (namely, setting the values you have). I had an 8800GT with 1GB of RAM -- it should be able to handle the games just as well if not better than your 8600GT with 512MB of RAM.

What is the nv4_disp.dll file though? Is that something that you copied into your wine prefix? It looks like it exists on my Windows partition. Should I copy that over to Wine and mark it as native in winecfg?
Cloudef
Level 4
Level 4
Posts: 138
Joined: Wed Mar 18, 2009 3:10 pm

Post by Cloudef »

Its windows nVidia driver, i have copied it just in case to system32 :)
There was hack to make old HL1 engine games work faster by replacing the HL engine driver dll with this nv4_disp.dll or some ati Dll.
Danila Sentiabov

Squeezing every last drop of performance out of DirectX

Post by Danila Sentiabov »

On Thu, Apr 30, 2009 at 07:53, gamblor01 <[email protected]> wrote:
What is the nv4_disp.dll file though? Is that something that you copied
into your wine prefix? It looks like it exists on my Windows partition.
Should I copy that over to Wine and mark it as native in winecfg?

I think that isn't relevant anymore (if ever was).

--
Best regards,
Danila Sentiabov aka dsent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Locked