[NTAC]ChickenOnaStik
Member
+0|7233|Alabama
I am a recent recipient of an Athlon X2 processor and I ran across a major problem that took me forever to find a solution for.

After connecting to a server, anywhere from 30 seconds to 10 minutes you'll be kicked off with the message "Connection to Server Lost."  This has nothing to do with your connection if you have an multi-core processor.  This is due to the fact that BF2.exe does not handle mulitple processors very well.   You have to set your processor affinity to one CPU.  There is an application that will do this automaticaly using imageCFG.exe, but do not use it.  It will modify your exe and PunkBuster will have a fit.  You could get banned.

To set your CPU manually, run bf2.exe and at the logon screen, alt-tab back to windows and open your task manager (ctrl-alt-del).  On the Processes tab, right-click bf2.exe and click Set Affinity.  Uncheck one of the CPUs and click OK.  You are now running BF2 on one processor.  You shouldn't get that message again unless you have a REAL connection problem.

The downside is that you'll have to do this everytime you run bf2.exe.  I'll update this post once I find another way to set this automatically.

EDIT: I found out the name of the application you need: PrioAff.  See Drakes post below.  THANKS Drake!

Last edited by [NTAC]ChickenOnaStik (2006-03-22 08:08:51)

PheloniusRM
Member
+8|7154|Mission Viejo, CA
I was having a serious case of disconnects a few weeks ago and like you I tried everything. I noticed in the bf2 options I had 256k dsl checked. I have dsl, and its probably 256k. I decided to set it to T1 / lan which I am on a lan but its not T1. I have almost completely eliminated my disconnects. You solution is interesting as well. I think I will give it a try.
Jakethe8lf
Member
+13|7097|Victoria, Australia
I am not familar with the jargon, but is this displayed in dxdiag next to your processor components as "(2 CPUs)"?
[NTAC]ChickenOnaStik
Member
+0|7233|Alabama

Jakethe8lf wrote:

I am not familar with the jargon, but is this displayed in dxdiag next to your processor components as "(2 CPUs)"?
Negative. 

When you run BF2.exe, Alt-Tab and return to Windows without closing BF2.  Right-click on your taskbar and click Task Manager.  From there, click the processes tab and find BF2.exe.  Right-click BF2.exe and click Set Affinity.
Jakethe8lf
Member
+13|7097|Victoria, Australia

[NTAC]ChickenOnaStik wrote:

Jakethe8lf wrote:

I am not familar with the jargon, but is this displayed in dxdiag next to your processor components as "(2 CPUs)"?
Negative. 

When you run BF2.exe, Alt-Tab and return to Windows without closing BF2.  Right-click on your taskbar and click Task Manager.  From there, click the processes tab and find BF2.exe.  Right-click BF2.exe and click Set Affinity.
Mine says CPU 1 & CPU 0. Mess with it or no?
[)r@ke
Member
+16|7108|Indiana
I'm running the Athlon 64 X2 4400+... I had this same problem.  ... ChickenOnaStick has got you all pointed in the right direction.

You need to set program Priority and Affinity (as they are not specifically handled by the programming for the game).

GET THIS PROGRAM --> PrioAff.  It will auto-set the Priority and Affinity for you each time.

Next:  Unzip the file wherever you like (but keep it somewhere safe).  Inside the unzipped folder (unless things have changed) will be two files: PrioAff.cpp and PrioAff.exe.  First one is the pure C++ code for the program, second is the executable (dur).

Now!!  Go to your desktop link (or wherever you launch BF2/BF2:SF from).  Right-Click -> Properties.
The "Target:" line should look something like this:  "X:\...\Battlefield 2\BF2.exe" +menu1 +fullscreen1
Modify the line to the following:  X:\PrioAff\PrioAff.exe 2 01 "X:\...\Battlefield 2\BF2.exe" +menu1 +fullscreen1
(Obviously, X:\...\ is wherever you intalled BF2 to, and also wherever you chose to unzip PrioAff.)

The key elements here are following "PrioAff.exe" --> X:\PrioAff\PrioAff.exe x xx.
The first single-digit represents the processing priority you want BF2 to run under.  1 = normal, 2 = High, 3 = REALTIME (100% of the core's computing ability will be spent on BF2).  The 2, High, setting should do it well enough though.
The second set (the double-digit) represents Affinity, and tells windows which core you wish BF2 to run on.  "10" will run the game on the first core (CPU 0), whereas "01" runs the game on the second core (CPU 1).

In the example above (X:\PrioAff\PrioAff.exe 2 01 "X:\...\Battlefield 2\BF2.exe" +menu1 +fullscreen1), you would be running BF2 at "High" priority on the second chip core (so basically, that's all the core is doing, with room for extra power if needed or for other background activity).

This should solve ALL your connection problems... as they are not truly connection problems.  They are merely the programming hiccuping and going "oh sh*t, what do I do now?" when it tries to cross-core compute for BF2.  When it hiccups, you drop connection.



Hope this is was helpful, if not longwinded...
Any problems implementing, or any other questions, drop me a PM line.

Last edited by [)r@ke (2006-03-21 23:20:44)

CrazeD
Member
+368|7129|Maine
I believe you can make a batch file to set your affinity, but I'm not sure.
[NTAC]ChickenOnaStik
Member
+0|7233|Alabama
Great jarb there, [)r@ke.

I have that setup at home, but I posted from my work PC and I couldn't remember the name of that application.  This is THE fix for this problem and should be made sticky.  It took me forever to find it and yes, I do know where the search link is. 
[)r@ke
Member
+16|7108|Indiana
Hey, I didn't even think to search for it... I just made the post, and made it in-depth.

I can only hope that it helps people out.  ... Or that I provided something special enough to be made 'sticky'!  :-D

Board footer

Privacy Policy - © 2025 Jeff Minard