WineHQ

Battlefield 2

Versions v1.00 (release) and patched versions v1.03, v1.41, v1.50 of the retail game are available.







The latest version is v1.50, which was released on September 1, 2009 and added the content of the Euro Force and Armored Fury booster packs, as well as the Highway Tampa and Operation Blue Pearl maps. This is the recommended version to use, as it:

  • removes the CD/DVD DRM check
  • is the version used by the vast majority of online servers for Multiplayer

Application Details:

Version: 1.x
License: Retail
URL: http://www.eagames.com/officia...
Votes: 45
Latest Rating: Garbage
Latest Wine Version Tested: 6.7

Maintainers: About Maintainership

Test Results

Old test results
The test results you have selected are very old and may not represent the current state of Wine.
Selected Test Results

What works

Version: 1.0 

Installs fine from cd. Boots into the game, loads single player maps.

What does not

You cannot see the mouse in game, so selecting the menu options is tricky. After the map loads, the choose team menu appears, with slightly corrupt graphics in the background, but is horrendesly slow, though this may (almost certainly) be due to an ATI graphic card. For example, Ragnorak Online gives me troubles as well.

Workarounds

What was not tested

multiplayer was not tested, though I assume that would be the same result.

Hardware tested

Graphics:

  • GPU:
  • Driver:

Additional Comments

A no-cd patch was needed to get around the protection. If someone with an NVIDIA card could test this, it may actually run. I strongly recommend an NVIDIA user test it out with wine 0.9.10

selected in Test Results table below
Operating systemTest dateWine versionInstalls?Runs?Used
Workaround?
RatingSubmitter
ShowLinux Mint 20 "Ulyana"May 19 20216.7Yes Yes YesGarbageJeremy 
ShowFedora 33 x86_64Apr 15 20216.6-stagingYes Yes YesBronzeLinards 
ShowGentoo Linux x86_64Nov 26 20183.21-stagingYes Yes YesSilverRob 
ShowArch Linux x86_64Oct 29 20161.9.19Yes Yes YesGoldDaniel Berger 
ShowDebian GNU/Linux 8.x "Jessie" x86_64Apr 08 20161.9.6-stagingYes Yes NoGoldA. Kola 

Known Bugs

Bug # Description Status Resolution Other apps affected
35371 Battlefield 2 voice setup tool crashes when "Save Settings" button is clicked (winmm.mixerGetDevCaps should also accept mixer device handles) NEW View
41925 Battlelog.co Battlefield 2/2142 Revive Launcher silently dies during installation (Squirrel installer fails) NEW View
47996 Battlefield 2 Unhandled exception UNCONFIRMED View

Show all bugs

HowTo / Notes

Test Submissions ... how to avoid a rejection notice!!

These notes were last updated: 04 September 2019

Follow these guidelines to avoid embarrassment when your Test Submission is immediately rejected!!

  • Ensure the version of Wine you have installed is update-to-date and supported (hint: if it isn't - then it won't be in the drop-down list).
  • Put your PC specifications in the Extra Comments section e.g. like your CPU and system memory.1
  • When adding test results please specify video card and driver version you are using.2
  • It's also useful to mention what Desktop Environment you are using (e.g. KDE/Plasma, Gnome, Xfce, Budgie, Mate, Cinnamon, ...)
  • Specify if you installed the Battlefield 2 into a fresh Wineprefix (or not), and what other programs and games you have installed (for existing Wineprefix's).
  • Specify what version of the Windows compatibility you use for your Wineprefix (e.g. Windows XP, Windows 7). Specify if you override this for the Steam client executable.
  • Specify whether you installed into a 32-bit or a 64-bit Wineprefix.
  • Add detailed comments about what is not working for you.
  • Please check known issues - like terrian texture settings - which may vary by graphics card vendor / driver version.
  • Please indicate if you've applied additional patches to the version of Wine you are using.
  • Please, don't submit test results like "Everything is working" or "Everything isn't working".

These guidelines ensure your submitted test results are actually relevant to other users of Wine and WineHQ.


1 The console version of the lshw utility is your friend. This command will dump your System hardware specification in a clean format. Post command and output in the Extra Comments section:

sudo lshw -short | egrep -v '(volume|disk|bus)'

2 glxinfo can be used to display your OpenGL and graphics driver versions. Post the command and output in the Extra Comments section:

glxinfo -B

Launching Game (Steam)

Set the following launch parameters for BF2.exe, using the Steam Client GUI:

+menu 1 +fullscreen 1 +szx "x-resolution" +szy "y-resolution"

... replace "x-resolution" & "y-resolution" with your native screen resolution.

Also ensure that your Battlefield 2 Video.con profile file has the correct resolution set in it (command updates all profiles):

export resolution="'x-resolution'x'y-resolution'@'frequency'Hz"
find "${WINEPREFIX}/drive_c/users/${USER}/My Documents/Battlefield 2/Profiles" -type f -name "Video.con" -printf "'%p'\n" \
    | xargs sed -i -e 's/setResolution [1-9][0-9]*x[1-9][0-9]*@[1-9][0-9]*Hz/setResolution '"${resolution}"'/g'

... replace 'x-resolution' , 'y-resolution' & 'frequency' with your native screen resolution and frequency (respectively).

To access the Battlefield 2 launch options (Steam LIBRARY):

  • Mouse left buttonRHS mouse click on Battlefield 2 entry (in Steam LIBRARY)
  • Select Properties (context menu entry) → General (tab)
  • Select SET LAUNCH OPTIONS... button
Install Guide for BF2 (CD / DVD retail)
  1. Ensure you are using a 32-bit Wineprefix on a 64-bit OS (see Wine FAQ if unsure how to do this).
  2. Ensure your BF2 DVD is mounted within your Linux filesystem (note this includes cifs/sshfs support).
  3. Wine should map this drive to "${WINEPREFIX}/dosdevices/d\:"
    (mapped drive letter may vary depending on how many ODD's your system has).
  4. Check drive is mapped using
    winecfg
  5. Open a Terminal and launch the setup:
    wine "D:\Autorun.exe"
    (Replace D: with whatever drive letter you have your DVD/CD mapped to in winecfg)

  6. Note: if using a CD version you may experience "CD ejecting problems". When the setup comes to a Insert Next CD prompt, switch back to terminal and open a new terminal tab. Ensure the $WINEPREFIX env variable is correctly export'd in this tab!! Enter:
    wine eject
    Insert the next CD, and continue with install.
  7. When the main (disc) installer has finished do not launch the game!
  8. Update using patch BF2_Patch_1.41.exe (update patch 1.41) e.g.
    cd ~/Downloads
    wine BF2_Patch_141.exe
  9. Update using patch BF2_Patch_1.50.exe (update patch 1.50) e.g.
    cd ~/Downloads
    wine BF2_Patch_1.50.exe

BF2 should now be installed successfully (hopefully). BF2 will run without a no-CD/DVD crack (as update 1.50 removed the disc-based DRM).
However online play will not be possible until a Punkbuster update is installed (see below).

Single Player Support

SPX 64-Player Mod

A Single Player mod supporting SP/coop support for Special Forces maps, with SF kits, weapons, Factions and vehicles. This guide also includes a fix for flickering terrian textures (black flickering hexagons covering terrian textures). Combining these 2 Mods allows you to achieve a good offline, single-player experience. As your stock BF2 data files are not affected, you can still play online, without being kicked by Punkbuster! 

  1. Setup an account on Battlefield SinglePlayer Forum and login into this account (this is necessary to unlock download links used in this section).

  2. Download BF2 SPX archive - version 1.2

    cd ~/Downloads
    wget -c "http://www.battlefieldsingleplayer.com/dnamro/files/BF2/BF2_SPX_1_2.zip"
    cd "${WINEPREFIX:-${HOME}/.wine}/drive_c/Program Files/EA GAMES/Battlefield 2/mods"
    mkdir BF2_SPX
    cd BF2_SPX
    unzip ~/Downloads/BF2_SPX_1_2.zip
    
  3. Download shaders client (fixed) archive
    (based on texture map files from the Forgotten Hope BF2 mod).

    cd "${WINEPREFIX:-${HOME}/.wine}/drive_c/Program Files/EA GAMES/Battlefield 2/mods"
    cp "BP_Shaders_client.zip" "BP_Shaders_client.bak.zip"
    cp ~/Downloads/Shaders_Client_Fix.zip "BP_Shaders_client.zip"
    
  4. Uncomment these 2 lines to put the stock menu movies back into the SPX mod... But why??!!

    # cd "${WINEPREFIX:-${HOME}/.wine}/drive_c/Program Files/EA GAMES/Battlefield 2/mods"
    # rsync -achv bf2/Movies/{Intro,menu,menu_loggedin}.bik BF2_SPX/Movies/
    
  5. To start the SPX 64-Player Mod:
    cd "${WINEPREFIX:-${HOME}/.wine}/drive_c/Program Files/EA GAMES/Battlefield 2/"
    wine start 'BF2.exe' +modPath mods/BF2_SPX +ignoreAsserts 1

Single Player Bot Changer

This is a small utility, to set the maximum number of map players and the AI strength of the game bots, for any of the (currently installed) Battlefield mods.

  1. Download BF2 SP Bot Changer - version 1.2

  2. Extract & run the utility


    cd ~/Downloads/
    unzip bf2-sp-bot-changer-21.zip
    wine 'BF2 SP Bot Change v2.1.exe'
    
Gamespy Master Servers

Gamespy, which provided the Master Servers for many games including Battlefield 2, was officially shutdown in May 2014. See Gamespy Wikipedia for more information about this.

Various community supported efforts have sprung up to provide alternative Master Servers for the various games affected by the server shutdown.


Detailed below are installation instructions for various alternatives - to use in place of the original Gamespy Master Servers.


(1) BF2Hub


Pros

  • ☑ Supply reliable alternate Battlefield 2 Master Servers
  • ☑ Facility to import your rank, achievements and weapon unlocks from the original Gamespy databases.
  • ☑ Simple Windows XP compliant GUI launcher - without .Net dependencies!
  • ☑ Works with Punkbuster
  • ☑ Many active Servers still remain online
  • ☑ There is even a Special Forces server online!!


Cons

  • None known

Getting Started

  1. Visit BF2 Hub Website
  2. Download the latest client

Guide to Installing the BF2 Hub Launcher

Download the BF2 Hub Launcher installer.

Then simply set the BF2 Hub Launcher up in a Wineprefix - which has an existing Battlefield 2 installation:

wine bf2hub-client-setup.exe

Then to run the BF2 Hub Launcher (32-bit Wineprefix):

wine start 'C:\Program Files\BF2Hub Client\bf2hub.exe'

The BF2 Hub Client will automatically read your EA Account Details/CD key. So you should be able to play Battlefield 2 online straightaway!

The BF2 Hub Launcher uses a system tray icon. This results in a known system tray bug affecting Battlefield 2, when Wine is used in the Virtual Desktop mode. See bug: 40828.


(2) Battlelog Servers


Update: the Battelog/Revive crew were served a takedown notice by EA. So this only remaining solution, to full online play for Battlefield 2, is no longer available...


Pros

  • ☑ Supply reliable alternate Battlefield 2 Master Servers
  • ☑ Facility to import your rank, achievements and weapon unlocks from the original Gamespy databases.
  • ☑ Transparent/simple command line wrapper executable to your original BF2.exe
  • ☑ Works with Punkbuster
  • ☑ Many active Servers still remain online
  • ☑ There is even a Special Forces server online!!


Cons

  • ☒The Battlelog Launcher client frontend applications is a bit unstable under Wine
    (see Wine Bug 41925)

Getting Started

  1. Visit Battlelog.co Website
  2. Setup an account

Guide to Installing the Windows 7 Revive Launcher

The installer for the Revive Launcher doesn't currently work under Wine. This issue can be worked around however.

Ensure you are using a 32-bit Wineprefix on a 64-bit OS (see Wine FAQ if unsure how to do this).

Download the Revive Launcher installer.

Then manually extract the installer - to use it:

winetricks win7
winetricks 7zip dotnet452
cd "${WINEPREFIX}/drive_c"
mkdir -p Battlelog.co
cd Battlelog.co/
mv ~/Downloads/Setup.exe .
wine 'C:\Program Files\7-Zip/7z.exe' x Setup.exe
wine 'C:\Program Files\7-Zip/7z.exe' x bf2battlelog-*-full.nupkg -i'!lib/*'

Then to run the Revive Launcher:

cd "${WINEPREFIX}/drive_c/Battlelog.co/lib/net45"
wine start 'Revive-Launcher.exe'

If using Steam then you may need to fix the install the Steam Library install path that the Revive Launcher tries to use for BF2:

export STEAM_WPATH="$( wine reg QUERY 'HKEY_LOCAL_MACHINE\Software\Valve\Steam' /v 'InstallPath' 2>/dev/null | awk '{if (sub("InstallPath","",$1) && sub("REG_SZ","",$2)) { sub("^[[:blank:]]+|[[:blank:]]+$",""); printf("%s\0", $0); exit 0 } }' )"
export STEAM_UPATH="$( winepath -u "${STEAM_WPATH}" 2>/dev/null | dos2unix  )"
export BF2_PATH="$( find "${STEAM_UPATH}" -type d -iname "Battlefield 2" -print0 | xargs -0 winepath -w 2>/dev/null )"
export APPLICATION_DATA="$( wine reg.exe query 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' /v 'AppData' | awk '{if (sub("AppData","",$1) && sub("REG_SZ","",$2)) { sub("^[[:blank:]]+|[[:blank:]]+$",""); printf("%s\0", $0); exit 0 } }' | xargs -0 winepath -u 2>/dev/null | dos2unix )"
export DIRS_BF2="$( find "${APPLICATION_DATA}" -type f -ipath '*bf2battlelog/dirs_bf2.json' )"
sed -i -e 's|{"gameDir":"[^"]*|{"gameDir":"'"${BF2_PATH//\\/\\\\\\\\}"'|' "${DIRS_BF2}"

NB: this will only work if your Steam Library directory, for BF2, is stored below the main Steam directory.


The Revive Launcher largely works:

  • ☑ You can set BF2 launch options.
  • ☑ You can download and install the full BF2 game (including all expansion packs).
  • ☑ Revive Network status, etc. works.
  • ☑ Applying Revive CD-keys to Registry works.
    The helper executable BattlelogBootstrap.exe consistently crashes on exit (this can be ignored - just press Cancel).
  • ☒ The Revive Launcher consistently crashes - when you exit it.

Tested with Wine Staging - version 2.15.
The Revive Launcher is much less stable with earlier versions of Wine Staging. The Revive Launcher not work with any Wine Stable or Wine Development release (at present).


Revive Game CD Keys

It may be necessary to edit (specific) Registry keys, to set a special (allocated) Revive CD-key, for your BF2 install. This step will become mandatory when the Revive team enable game key verification on their Servers.

Refer to this Battlelog.co forum post: How to fix CD-Key issues (applies to both BF2 & BF2142).

  1. Enter Wine registry editor:
    wine regedit
  2. Backup existing Wine registry:
    Click on Registry (menu)
    Select Export Registry File...
    Select All checkbox
    Save backup registry file
  3. Exit regedit
  4. Visit your Revive Personal Profile page to obtain your personal Revive CD-key
  5. Insert your Revive CD-key into the (Wine) Registry for Battlefield 2:
    export REVIVE_KEY="❚❚❚❚-❚❚❚❚-❚❚❚❚-❚❚❚❚-❚❚❚❚"
    wine reg.exe ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Games\Battlefield 2\ergc" \
        "/v" "" "/t" "REG_SZ" "/d" "x9392${REVIVE_KEY}" "/f"
  6. Also insert your Revive CD-key into the (Wine) Registry for Battlefield 2 Special forces (if installed):
    wine reg.exe ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Games\Battlefield 2 Special Forces\ergc" \
        "/v" "" "/t" "REG_SZ" "/d" "x9392${REVIVE_KEY}" "/f"
Punkbuster Fixes

If you find yourself getting kicked from online multiplayer Servers... Then try refreshing your Punkbuster installation. Otherwise it's probably best not to touch it!

Ensure you are using a 32-bit WINEPREFIX (Punkbuster will not work in a 64-bit WINEPREFIX).

Note: using a 64-bit WINEPREFIX appeared not to be an issue, during online testing on 26 November 2018. Testing multiplayer, on a BF2Hub-enabled BF2 Server (with Punkbuster enabled). YMMV.

Steps to refresh your current Punkbuster files:

  1. Download and extract the final Punkbuster files supporting BF2: bf2_win32.zip:

    wget -O ~/Downloads/bf2_win32.zip -c "http://fizweb.elte.hu/battlefield/Battlefield-2/BF2-PunkBuster/bf2_win32.zip"
    export PB_DIRECTORY="$(find "${WINEPREFIX}" -type d -iname "pb")"
    mv "${PB_DIRECTORY}" "${PB_DIRECTORY}.bak"
    unzip ~/Downloads/bf2_win32.zip -d "$(dirname "${PB_DIRECTORY}")"

    NB you'll have to do this process manually - if BF2 is not installed within your current WINEPREFIX.

  2. Now update the Punkbuster service with the Punkbuster service utility: pbsvc.exe:

    wget -O ~/Downloads/pbsvc.exe -c "http://www.evenbalance.com/downloads/pbsvc/pbsvc.exe"
    wine start /unix ~/Downloads/pbsvc.exe


Recommended Video Settings

Note: for older AMD (<5xxx)/Nvidia GPU's (<8xxx) and Intel GPU's it is recommended to set:

  • LIGHTING Low
  • DYNAMIC SHADOWS Off
  • DYNAMIC LIGHT Off

  • Setting TERRAIN quality to Medium or High may lead to black hexagonal texture glitching in ground textures - this bug appears to mainly affect Nvidia GPUs.
    It has been reported that issue does not affect newer AMD radeon drivers. So setting the TERRAIN quality to High is worth testing on AMD cards.
  • ANTI-ALIASING set to 2x ... 16x (on). Will simply be ignored in-game.

The currently supported maximum in-game Video Settings (without the Shader mesh fix - detailed on this page) are:

VIDEO OPTIONS



DISPLAY MODE ????x????@???Hz


OVERALL QUALITY Custom




CUSTOM QUALITY



TERRAIN
Low


EFFECTS
High


GEOMETRY
High


TEXTURE
High


LIGHTING
High


DYNAMIC SHADOWS
High


DYNAMIC LIGHT
High


ANTI-ALIASING
Off


TEXTURE FILTERING
High


VIEW DISTANCE SCALE
100%


████

Last updated 26.11.2018 Wine-Staging 3.21, Nvidia Geforce GTX 970M, Nvidia Driver 396.54.09 (Gentoo GNU/Linux)

General Tweaks

BF2 Commandline Options

Refer to Battlefield 2 Tweak Guide: Command Line Options for a comprehensive list of command line switches to use when launching the Battlefield 2 executable.

  • For example you can also set you client to automatically login to Revive account:

    wine start 'BF2.exe' ... +playerName "name" +password "⚫⚫⚫⚫"
  • Specify a custom resolution to launch the BF2 client with, e.g. for running the game on a full HD monitor:
    wine start 'BF2.exe' ... +menu 1 +fullscreen 1 +szx 1920 +szy 1080
  • Specify a BF2 Mod to launch, with the BF2 client, e.g. for running the BF2 SPX Singleplayer Mod:
    wine start 'BF2.exe' ... +modPath mods/BF2_SPX +ignoreAsserts 1

How you append these options will depend on whether you are using the Steam Client or if you have used a retail (DVD) copy of Battlefield 2.

Comments

The following comments are owned by whoever posted them. WineHQ is not responsible for what they say.

Battlefield 2 is finally working on Wine
by IceBreak on Tuesday February 27th 2024, 15:11
This game is the CD version with patch V1.41, manage to install with a VM on Windows 7 because installing with Wine crashes and misses some files from the game.

after having the full game files, i put it on my Linux desktop and tried to make it work, Proton doesn't work, Wine works but crashes with random texture artifact.

later today i found out that the "Renderer" was the problem for the game, so what i did was using "winetricks dxvk" and changed my Wineprefix Renderer to DXVK
after that the game works perfect out of the box, all you need is the Directx9 dlls using Winecfg.

sadly the resolution doesn't increase really well so i had to open this game as "wine explorer" and play as windowed, still it's perfect and didn't have a single crash after that.
Mac users suffering from "creating account / connecting to account server" Freeze
by Mjartin Kilt on Sunday May 31st 2020, 8:26
Dear all,

for months now, I am trying to run BF 2 via BF 2 Hub (since EA servers are down) or Forgotten Hope 2 (a standalone mod for BF2 using independent account servers / servers) on my MAC via Crossover or Wine.

Both, Wine or Crossover, cant make BF2 or FH2 run. I get stuck on the same problem which is:

I boot the game, I watch/skip the intro and then the login page appears.
Problem: whenever I try to log in with an existing BF2 Hub account or FH2 account, the "connecting to account server page" appears and I wait. But it takes forever, the game freezes in this moment, since I hear the background music going on, but no reaction.

Same if I try to create a new account (e.g. in the FH 2 game). The game freezes on the "creating account" page.

I researched and found out that many BF2 or FH2 Fans have this issue. They cant solve it. Some old PC-BF2 users say, that this problem occured to them when they had their Firewall blocking BF2.

Problem: Macs usually have their firewall off by default. Only question is, does Wine/Crossover use a firewall? Some say no.

Only thing I can confirm in this matter is: If you type in a wrong password for an already existing account on the "retrieve account / log in page", the game tells you that you used a wrong password (strange, if it would be a firewall problem, it shouldnt be able to tell you that right?)...

Guys? Any Help? 8 Players I know so far, have the same issue via Crossover / Wine. Bootcamp seems to work fine with FH2 / BF2

Greetings
whadaaafug?
by Richard Bricker on Thursday November 21st 2019, 4:52
Are U kidding me? have ya seen the list of about 75 things to try n u might be able to install it,
But maybe not play it
i see there is a TUX versio9n of Space invaders that runs real smooth.
in 1983 i wrote a FLYING Vversion o space invaders, it took about an hour on an Apple IIe. it didnt even have
a hard drive. Probably a lot less time than to install this
Wine-supported Launcher and High Quality Terrain Textures!!
by Rob on Saturday August 27th 2016, 9:58
I've requested Windows XP support and fixed texture support (by using a "fixed" Terrain texture file from the Forgotten Hope mod) on the Battlelog.co forums...
battlelog.co/post.php?id=16823

I didn't really get a very helpful response. Maybe folks would like to weigh in there!!

My understanding is that native Windows graphics drivers have a dumb executable name hack fix for the texture meshes. I did try to verify that running the _stock_ game, under Windows, and just renaming the main executable would break the High Terrain textures again... Sadly the stock BF2 game is a PITA to install under Windows 10... Simply running a Single Player game would be enough...

If anyone else can verify this fact - that native Windows graphics drivers are simply suppressing the Terrain texture mesh bug... Then that would be super helpful!

I'll submit a bug against the new Battlelog.co Launcher application when I get time. It appears support for the old style launcher has now vaporised... :-(
d3dx9_24.dll & d3dx9_25.dll
by Kelppo on Saturday January 10th 2015, 8:41
I just want to add that if the game won't run then you probably need the native version of d3dx9_24.dll and d3dx9_25.dll.

At first BF2 crashes on startup on my machine, setting Wine to use a native d3dx9_25.dll seems to fix it, the game launch but then crashes every time I try to load a map in Single Player, getting the other dll seems to fix this.
RE: d3dx9_24.dll & d3dx9_25.dll
by Kelppo on Saturday January 10th 2015, 8:46
Forgot to mention that I'm running:

Xubuntu 14.04.1 32-bit
Wine 1.7.33
PunkBuster B Maintain Bash Script
by Luna Crane on Monday November 10th 2014, 21:22
I wrote a Bash script to keep PnkBstrB.exe running in case it goes down and causes the initialization error that kicks you out of online games. I call it punkBloop:

#-----------------------START---------------------------------------

#!/bin/bash

#punkBloop keeps PnkBstrB.exe running while PnkBstrA.exe is running.
# DO NOT USE pnk="$(ps -u $USER | grep PnkBstr*)" BECAUSE IT IS NOT UPDATED!

export WINEPREFIX=/home/$USER/.wine WINEARCH=win32

while ps -u $USER | grep PnkBstrA.exe
do
if ! ps -u $USER | grep PnkBstrB.exe
then
wine "C:\windows\system32\PnkBstrB.exe"
fi
sleep 15s
done

exit 0

#-----------------------END-----------------------------------------

Modify it as needed. I'm hoping 15 seconds is enough of an interval for the checks of PnkBstrB.exe. If not, change "sleep 15s" to a shorter interval.

I just run this in a separate terminal, but you can try some sort of single command.
RE: PunkBuster B Maintain Bash Script
by Luna Crane on Monday November 10th 2014, 21:26
Ugh, I'm a tired idiot. Copy it from "#!/bin/bash" to "exit 0". The START and END lines were my misguided attempt at outlining the code.
RE: PunkBuster B Maintain Bash Script
by Rob on Tuesday November 18th 2014, 7:34
@Luna Crane

I think I've cracked it!!

Here's my example Steam + Punkbuster launch script... It will also work for most other game e.g. BF2 (retail) which need Punkbuster - with little modification.

BTW WINEARCH only needs to be set when you first create a WINEPREFIX.

pastie.org/9727643

I'll update the Wiki with this.
Punkbuster B Malfunction Fix
by Luna Crane on Tuesday November 4th 2014, 14:08
I've been getting Punkbuster B (PnkBstrB.exe) errors while playing saying that PnkBstrB.exe failed to initialize, obviously kicking me out of an online game within about 5 minutes. The thing is, this is a VERY common problem even on the latest Windose games that use Punkbuster.

The issue is caused by PnkBstrB.exe not being started when Punkbuster starts. Sometimes, PnkBstrB.exe is missing from the system altogether.

There are several solutions according to posts about the issue:

=================================================================
*1*
(Mainly use the following to fix PB: www.evenbalance.com/downloads/pbsvc/pbsvc.exe )
=================================================================

"Thank you for contacting Electronic Arts. I’m sorry for the difficulty that you are having with the game Battlefield 2.

Delete and Reinstall the Punkbuster Folder and Software
To delete and reinstall the Punkbuster folder and software:

Click on My Computer.
Click on the C: drive, or wherever you have Battlefield 2 installed.
Click on Program Files.
Click on Electronic Arts.
Click on Battlefield 2.
Right-click on the pb folder, then click Delete.
Download and run the installation software for Punkbuster, which can be found here.
www.evenbalance.com/downloads/pbsvc/pbsvc.exe
Click the Uninstall button.
Close the installer.
Click on the Start button.
Click on Run.
Type regedit in the text field and press OK.
Warning: Changes to the registry can cause your computer to operate improperly, so please follow these instructions exactly as they are written.
Follow these steps to back-up the registry so that should something go wrong, you can restore your system back to a working state:
If you are using Windows 2000/XP/Vista, click on File, and select Export. Note: If you are using Windows 95/98/ME, click on Registry
Then select Export Registry.
Select All under Export Range.
Type backup into the File name field, and click Save. You've now created a backup version of your registry.
Once you've created your backup, continue as follows.
Click the plus sign next to HKEY_LOCAL_MACHINE.
Click the plus sign next to System.
Click the plus sign next to ControlSet001.
Click the plus sign next to Services.
Look for PnkBstrA, PnkBstrB, and PnkBstrK, and if they exist, right-click on each one and select Delete.
Click the minus sign next to ControlSet001.
Repeat steps 5, 6, 7, and 8 immediately above for any other ControlSet folders you have, such as ControlSet002 or CurrentControlSet.
Close regedit.
Double-click on the My Computer icon.
Double-click on drive C:.
Double-click on windows.
Double-click on system32.
Look for PnkBstrA.exe and PnkBstrB.exe and if they exist, right-click on each one and select Delete.
Double-click on drivers.
Look for PnkBstrK.sys, and if it exists, right-click on it and select Delete.
Restart windows.
Follow the instructions here to reinstall Punkbuster.
www.evenbalance.com/index.php?page=pbsetup.php
Install/Re-Install Punkbuster with pbsvc.exe and run "Test Services" to check that everything works.
www.evenbalance.com/downloads/pbsvc/pbsvc.exe
Try to play Battlefield 2"

=================================================================
*2*
(Use *1* and add the following if *1* failed. Assures that Punkbuster B runs. Note that the New Task/Run stores prior entries, so you only have to run these once.)
=================================================================
Do fix *1* above. Then do the following (user1 is your user name; BF2RG.exe is specific for Battlelog at www.battlelog.co/ which seems to work the best; adjust resolutions to your own, 1920x1080):

export WINEPREFIX=/home/user1/.wine WINEARCH=win32; wine explorer /desktop=BF2,1920x1080 taskmgr.exe

File -> New Task (Run ...) -> Browse -> C:\windows\system32\PnkBstrB.exe

File -> New Task (Run ...) -> Browse -> C:\Program Files\EA GAMES\Battlefield 2\BF2RG.exe +menu 1 +fullscreen 1 +szx 1920 +szy 1080

=================================================================
*Other Possible Fixes Mentioned on Sites*
=================================================================
*Try typing this in chat:

/pb_security 0

*Make a link to run Battlelog in the Start Menu instead of running from the task manager. I have no idea how to make a proper .lnk, and I have yet to find a way.
RE: Punkbuster B Malfunction Fix
by Rob on Thursday November 6th 2014, 11:32
@Luna Crane,

Interesting amount of detail about fixing Punkbuster...

But what I'm really interested in is getting the Battlelog client to work. What software did you install to get it working? It is a .Net /C# application - so I presume you've installed .Net 4.0?

Perhaps you could go into more detail on what steps you took? So I can re-produce them. I'm not sure if I need all the .Net blobs up to 4.0? Currently I'm getting a seg fault when I try and run the game (just after a Single Player or Multiplayer map has loaded).
Run as:
wine BF2RG.exe +menu 1 +fullscreen 1 +szx 1600 +szy 1200

It would be a shame if I can't update the Wiki (above) - since I've noticed that not only are the Graphics Engine lighting and shadow effects now supported. Even my microphone is working!

However although everything is working for Single Player (with the stock BF2.exe launcher)... Now I can't play Multiplayer (which I thought was a done deal with the Punkbuster fix I added a few months ago)!! Arggg...
RE: Punkbuster B Malfunction Fix
by Luna Crane on Friday November 7th 2014, 11:06
Ummmm...

BF2 DVD version with Wine 1.7.21 with BF2 patches BF2_Patch_141.exe and then BF2_Patch_1.50.exe, as the instructions say. NO WINETRICKS or other system programs whatsoever.

I've never heard of a seg fault happening on map start. The only crash I've ever gotten was the

err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x32 @85! (XRandR 1.2)

which I fixed with unchecking all the boxes in Window settings except Virtual Desktop in winecfg. Set on Windows XP.

The exact command I run is

export force_s3tc_enable=true WINEPREFIX=/home/lunac/.wine WINEARCH=win32; wine explorer /desktop=BF2,1920x1080 taskmgr.exe

If you have no black graphics, you don't need the force_s3tc_enable=true part (requires dri.freedesktop.org/wiki/S3TC/
, usually for Intel Integrated Graphics cards). Make sure you run BF2RG.exe, NOT BF2R.exe (which crashes but earlier on).

Apart form that, make sure all your downloads have the right checksums (md5sum, sha1, etc.) as they can often be corrupted. Check multiple types of checksums on the same file because it may very well miss the difference. In fact, I've encountered certain download sites, even popular ones, have corrupt files uploaded on their servers. Try redownloading files from other sites. Check to see the checksums are right, if available, and make sure you have a reliable connection (could corrupt downloads too).

Md5sums for my files:
102432051033c831d3243987749b1a1f pbsetup.exe
fcd0dd79b9af18f7644e37515eac5a59 pbsetup.zip
f4f60cad9005f2079bdc0d570d5bac64 pbsvc.exe
25758fcfafa6a61b4939e85823c2f853 BF2Revive_Setup_Launcher.exe
bf7db858b35e1f7c9fa1af74a68c5198 bf2hub-client-setup.exe
2106aef4b38491e6dfa1481f1afdcf9a BF2R.exe
d85ccbcb172355b98b89a09255637155 BF2RG.exe

Sha1sums for my files:
055643812cf22cf077c8341fb2995c346fe17d1b pbsetup.exe
a9b8735cbc22e4a0a78355acc279d97e2d747658 pbsetup.zip
dbc4aa6f3bebd60310bd53c52691df401b9b4ea1 pbsvc.exe
482804cb7a79bd8f5d1553e7b65fcf702cb84d5d BF2Revive_Setup_Launcher.exe
133e4a39e0f9c7826cd30cb969bfd351457af896 bf2hub-client-setup.exe
d61999aa43c216ad90ce49f98c8dc20616757c42 BF2R.exe
591706a33e55a4c6fb79afafc50be0bc90045e48 BF2RG.exe

*I do happen to have BF2Hub installed, but it never worked for me, and it never starts up.

*Make sure your graphics drivers are up to date. If they are, update your system, kernel (if you can), MESA, etc. But considering you can run BF2.exe, it might not be the case so much.

*Last but not least, use Pastebin.com to show us a terminal output of the actual error (just the whole terminal output). It often gives a clue.
RE: Punkbuster B Malfunction Fix
by Luna Crane on Friday November 7th 2014, 16:42
Just to make sure I've covered all possibilities, I'd like to remind you to make sure you use the Direct Download version of Battlelog, because the Launcher version crashes (maybe that's why you might have installed .Net?). Again, it works AS IS, NO extra installs, NO native dlls, etc. Clean wine prefix.

Ah, I'm going mad not having a terminal output to clue me in on what's going on! There are too many unknown variables. It reminds me of Windose. I wanna solve it! (Too many cryptic puzzle games recently.)
RE: Punkbuster B Malfunction Fix
by Rob on Monday November 10th 2014, 7:25
@Luna Crane,

Thanks for all that info!! I'm busy fut'sing about with my PC - so I'll test later this week...

Are you able to run BF2 with full Lighting & Shadows? Seems to work fine here - and was an issue before (even when using a Nvidia GPU/ drivers).

I can't get the client from www.bf2hub.com to work. I tried moving the Windows hosts file, GameSpy server overrides the installer creates - from my Wineprefix into my main Linux /etc/hosts file... Still nope when I try to connect to anything online.

Ah well... I'll keep testing :-)

Thanks for getting back to me so quickly... :-)
Robert
RE: Punkbuster B Malfunction Fix
by Luna Crane on Monday November 10th 2014, 14:10
I maxed everything out now (Lighting, Shadows, Dynamic, etc). Works perfectly.

Strange thing about Anti-Aliasing though, it won't let me enable it at all. After I click apply, it switches it to Off. The rest stays on High.

Could it be your settings file (Video.con) in your profile? You can also try messing with files in LaunchConfigs in the profile Battlefield 2 dir. Maybe reset settings altogether.

Last resort, you can try the alternative master server systems (you might need to translate some German for some), but I haven't really tested any others:

www.bf-games.net/downloads/category/158/tools-fuer-spieler.html
www.realitymod.com/downloads
www.gameranger.com/

Although essentially, battlelog is the way to go mostly, because I'm already part of their BF2142 Beta test with stats/unlocks (GameRanger has no stats/unlocks), although there may be master server issues atm.
RE: Punkbuster B Malfunction Fix
by Rob on Monday November 17th 2014, 17:16
@Luna Crane,

Sorry it took so long to try out your suggestions. Had a few (cough) issues with my Gentoo install - so had to rebuild it from my tar'd copy off my laptop!!

Anyway you're a star. I probably would have just given up if you hadn't said it was working with your Wine install!!

So I've finally got my Steam profile Battlefield 2 game to work with the Battlelog Master Server. I can even add a custom launcher for the Battlelog server client. Steam auto-populates the list of 3rd party applications so I just had to change the Battlelog executable from the GUI launcher to the CLI client. Then add in the custom launch flags... Sweet!!

Interestly the pnkbuster.exe utility puts it's executables in a rather random place (C:\users\robert\Local Settings\Application Data\PunkBuster\BF2\pb\). I copied the executables PnkBstrA.exe + PnkBstrB.exe to "C:\windows\system32\".

I was still getting kicked from Multiplayer servers after 2-3 minutes when I manually launched PnkBstrB.exe (before Steam).

So then I tried...
1) Moving PnkBstrA.exe + PnkBstrB.exe to "C:\Program Files\Steam\SteamApps\common\Battlefield 2"
2) Using a simple infinite BASH while loop to keep starting PnkBstrB.exe:
while true; do wine PnkBstrB.exe; sleep 5; done
(run in the PWD="C:\Program Files\Steam\SteamApps\common\Battlefield 2" directory)

Now I'm not getting kicked at all and getting extended game play. Video settings are maxed out (except for AA and ground textures obviously). I'll write up a simple guide for setting BF2 up for both the Steam and Retail games this week. I just need to automate starting the PnkBstrB.exe executable with a Wine Registry Run flag and a DOS cmd script (probably).

Ahhh it's nice to be able to play some BF2 again!! Hopefully Battlelog will get their BF2142 Servers online soon!!
RE: Punkbuster B Malfunction Fix
by Luna Crane on Tuesday November 18th 2014, 11:23
Oh, I didn't realize Steam had BF2. I've been using retail disk to install. It may even be possible to copy out just BF2 from the steam directory structure and run as is (assuming Steam didn't modify any BF2 files too much).

Yeah, sorry, I didn't mention it here (other places only), but I tried making a batch (.bat) script, and it was a nightmare, as it didn't even have any real "sleep" function or even a "while" loop, and the coding structure was so difficult to read and understand. I should have tried a cmd script first, but honestly, bash is really the best, and you have much better control over the process than through Wine.

Glad you have it working! Remember that there are some mods more popular than the standard game, and most mods seem to work fine.

Now, if you want, you can try out the BF2142 Beta Alt Master Server with stats, from the makers of Battlelog. It installs with the same setup instructions as BF2 here. Use setup.exe on the DVD (Autorun.exe fails).:

dethklokclan.enjin.com/forum/page/20/m/1411244/viewthread/14903035-beta-2142-rankings/post/83158110#p83158110
RE: Punkbuster B Malfunction Fix
by Rob on Tuesday November 18th 2014, 11:57
@Luna Crane,

It appears PnkBstrA.exe polls PnkBstrB.exe every few seconds. When it is polled PnkBstrB.exe dies or killed.

I got a .bat script working - but it wasn't pretty (lots of spawning shell windows)! I tried setting up PnkBstrB.exe as a service - copying the registry key for PnkBstrA.exe. This doesn't work as the service starts once and then is not restarted when killed.

I had to modify my little BASH script as the timing is very tight (I changed it to poll PnkBstrB.exe every 1 second).

The Steam & Retail versions of BF2 are interchangeable - so I do most testing on the Steam version. The Steam version does appear to have a fix for the xrandr issue. My version of BF2 Retail is one with the Special Forces addon. Not that is much use now!

Thanks for heads up about the BF2142 Beta Server launching. I want to check that Dynamic Lighting is working in BF2142 as well (should do as it is the same graphics engine after all).

I am just trying to post some debug channel output for the bug about not being able to remap the (keyboard) Controls in the BF2 Main Menu.

Thanks
Bob
RE: Punkbuster B Malfunction Fix
by Rob on Wednesday November 19th 2014, 15:55
I installed and tested out BF2142 today (Single Player).
Game play is nearly flawless... All settings maxed out and AA turned off. So Wine finally catches up with a game and there is no where to play it now!!

Damn annoying...!!

I've try to get signed up for the Battlelog Beta BF2142 server. Their BF2 setup is definitely the best I've found - some nice guys still playing out there...

Ah well I'll update/ tidy up both the wiki's (BF2/BF2142) and hope that online play remains viable... :-)

Ta
Bob
Running the game on 64-bit OS with Wine 32-bit prefix
by voan on Sunday November 2nd 2014, 5:38
If you have error like:

err:winediag:wined3d_texture_init The application tried to create a DXTn texture, but the driver does not support them.

Try installing packages "libtxc-dxtn*:i386" instead 64-bit.
It helped me.

---
Sorry for my bad english.
Popularity
by Luna Crane on Friday October 31st 2014, 14:33
According to battletracker.com/index.php?page=BF2Serverlist

Project Reality Mod Servers are actually the MOST popular servers, so it's definitely worth the Torrent, and there are plenty of torrent seeders: www.realitymod.com/downloads

Forgotten Hope 2 Mod Server is just under the Project Reality Mod Servers. Note that their special Update Launcher seems to always crash while verifying local data, so you have to use the Direct Download Full Installer links: forgottenhope.warumdarum.de/fh2_downloads.php

The normal servers are less populated than these mods.
GameSpy Master Servers Shut Down
by Luna Crane on Saturday October 25th 2014, 22:59
GameSpy has shut down, and they were the ones hosting all master servers for many many EA games:

www.gamefront.com/50-ea-titles-to-lose-online-service-due-to-gamespy-shutdown/

The strange thing is, people are still playing somehow!

www.gametracker.com/search/bf2/?sort=c_numplayers&order=DESC

How? Is there a patch to switch master servers or connect to a server without logging in?
RE: GameSpy Master Servers Shut Down
by Chris on Sunday October 26th 2014, 15:44
There is a fix for the gamespy shutdown. A few groups have made replacement master servers. The patch is to modify the 'hosts' file on your computer so requests to master.gamespy.com are sent instead to master.example.com, where example.com is the address to the community hosted server browser.

Here are two sites that can help you with this. The Project Reality client (full conversion mod for BF2) automates switching to a new master server for you in their installer. The battlelog website provides both a replacement master server list, ranking system, and game launcher.

www.realitymod.com/downloads

www.battlelog.co/
RE: GameSpy Master Servers Shut Down
by Luna Crane on Sunday October 26th 2014, 18:29
Wow, thanks! The battlelog one really works nice! I'm not so sure about waiting to download the total conversion realitymod via torrent, as I'm not sure about how popular it is, and it'll take a while.

I've been struggling with BF2Hub, another alt Master Server system, but it's not really working unless you already have a registered and working online profile file on your system. I'm working on trying to get it to work just as an option in case the others go down.
RE: GameSpy Master Servers Shut Down
by Luna Crane on Friday November 7th 2014, 23:07
Even more Alternative Master Server Programs (need to search and maybe translate some German):

www.bf-games.net/downloads/category/158/tools-fuer-spieler.html
Mic error?
by Ed Houseman jr on Monday December 30th 2013, 22:46
Does anyone else get an error when setting up a mic at the end of the setup?
RE: Mic error?
by Rob on Tuesday May 27th 2014, 4:49
Oops, sorry missed your question (many months ago!!)
It's an open bug at present...
bugs.winehq.org/show_bug.cgi?id=35371
Works with Wine 1.7.7
by Carlos Rodriguez on Wednesday December 18th 2013, 8:14
Tested on:

Wine 1.7.7 (compilado)
Nvidia Drivers 331.20 (.run package)
Linux Mint 15 KDE 32Bit - Kernel 3.8.0.26 PAE
CPU: INTEL Pentium G3220 (Nucleo Haswell a 22nm) 3.0Ghz (Dual-Core) Stock Clock
MEM: 8GB DDR3 1333 (2x4) Patriot value (128 bit dual channel: 21.3 gb/s)
GPU: Zotac Nvidia Geforce GT630 (GK208 28nm: 384 Shaders / 8 ROPS) Zone Edition Passive Cooling 2GB DDR3 1800Mhz a 64Bit (14.4Gb/s)
MAINBOARD: MSI H81M E33

www.youtube.com/watch?v=wVIxHKmaepw
Works fine in 1.7.0
by David Hubbard on Friday October 18th 2013, 15:44
Multiplayer and singleplayer work fine in Wine 1.7.0. I tested on an NVidia card and an AMD integrated APU.

1. install the app
2. install the 1.41 update
3. install the 1.50 update
4. apply the RendDX9.dll patch ZIP file.
5. run BF2.exe +szx xxxx +szy yyyy (your monitor's resolution)

forums.steampowered.com/forums/showthread.php?t=2015962 says "BF2 is know[n] to crash if you have 2 sound cards (A USB headset counts as a card) and 1 is realtek."

They aren't talking about wine, but I had this problem because my /proc/asound/cards has a Realtek and some HDMI audio outputs. The quick fix for me was to use regedit to set HKEY_CURRENT_USER\Software\Wine\Drivers\Audio to "" (nothing) which completely disables DirectSound, but the game works.

If you have this problem like I did, then your game will consistently crash the moment you click on the Audio settings button.

You can rename/delete mods/bf2/Movies/{Dice.bik,EA.bik,Intro.bik,Legal.bik} to make the game start quicker, or just add "+restart" to the command line.
RE: Works fine in 1.7.0
by Mark I. on Monday May 26th 2014, 19:44
Thanks! That set me in the right direction. I changed the Audio value to "pulse" and that got audio working perfectly without crashes.
RE: Works fine in 1.7.0 (Audio)
by A. Kola on Thursday April 7th 2016, 8:04
On my system, pure ALSA, I had to disable all but one audio device to circumvent the game crashing. To achieve this I had to blacklist/unload the module(s) of the not used sound hardware. If two or more devices are using the same module, load it telling it to enable only one device. In my case I had to disable devices 0 and 2 (HDMI) which led to this line in some .conf file in /etc/modprobe.d:
options snd-hda-intel enable=N,Y,N
BF2 with 5.1 Surround Sound
by McMaster on Thursday April 25th 2013, 15:53
I have an Audigy 2 ZS that I'd like to use for surround sound. All channels are routed properly as confirmed by "speaker-test -c 6 -t wav". However, when I play BF2, all channels are ON but it's only "triple stereo" playing (i.e., the front pair, the rear pair, and the center are all playing the same stereo signal).

I think this game uses dsound. I'm using the builtin dll for dsound.

Anyone know how to get the proper discrete channels in BF2 surround sound?
Problem when I close the game
by NickPower on Thursday April 4th 2013, 8:35
Hi,
I've got a problem: When I played on a server and then close the game I'm getting always an error:

Debug assertion failed!

Version: 1.5.3153-802.0 Build date:2009-8-10 17:8
Modul: RendDX9
File: C:\Dice\Projects\BF2Branches\Patch_1_50\Code\BF2\RENDDX9\RendDx9Init.cpp
Line: 738

Text: Direct3DDecive release unsuccesfull this must be fixed...

Current confile:


Can somebody please help me? :)
RE: Problem when I close the game
by NickPower on Thursday April 4th 2013, 8:45
I'm using wine 1.5.27 :)
Punkbuster
by Jim on Sunday March 24th 2013, 15:13
I posted a comment on the Battlefield 2142 thread about fixing punkbuster, and it applies here as well.

-------

To fix punkbuster, download pbsetup.exe from the punkbuster site:

www.evenbalance.com/index.php?page=pbsetup.php

Run pbsetup.exe from your BF2 wineprefix, click "Add a Game" and select "Battlefield 2" from the list of games, then click "Check for Updates" and BF2's version of punkbuster will be updated.
RE: Punkbuster
by NickPower on Thursday April 4th 2013, 8:26
Thanks.
Everything works now! :D

by Andrej on Saturday April 21st 2012, 9:14
Did anyone find the way how to fix invisible tanks problem on bf2 1.5?
RE:
by Mac Porter Joe on Monday July 2nd 2012, 12:59
use wine engine 1.4 (NoXInput2 for mac)

by Jean A. Hough on Thursday June 30th 2011, 16:17
Hi to all,


[url]www.d3dx9.net/download-missing-d3dx9_25-dll/[/url]
You can get the d3dx9_25.dll file from the above link.
this is the source which is best for solving this sort of dll related issues.
Click the Link on this page and it will fix your problem.
Weird behavior on 1.3.21
by Linux_gamer on Thursday June 16th 2011, 9:30
So, I was having the same trouble as others with the resolution not configuring right and getting error messages on load. I used the terminal command with 1024X768 resolution, which seemed to work. But, what I additionally found is that if you say "emulate virtual desktop" and put the native res. of your monitor under "Default Settings", it works fine in fullscreen (at least for me). Change to the same settings for app. specific BF2.exe, and it fails again with the error message "has encountered a serious error and needs to close". For me, the config files to change to 1024X768@60Hz did nothing either. Seems like "Default Settings" graphics options and terminal commands are the only things that influence it.
RE: Weird behavior on 1.3.21
by Linux_gamer on Thursday June 16th 2011, 9:31
Oh, and I forgot to mention that the resolution that worked for me for "Default Settings" was 1280X1024, but I think it just depends on what monitor you run.
Glitches
by Nerexis on Saturday May 28th 2011, 7:55
How to fix black glitches on ground etc.?
RE: Glitches
by Jason Fletcher on Saturday July 21st 2012, 5:07
I have a Nivida card. I fixed this by going into the nvidia control panel and setting the Antialiasing Settings to "Override Applications Settings" and 4x (4xMS)
RE: Glitches
by Jason Fletcher on Saturday July 21st 2012, 5:07
I have a Nivida card. I fixed this by going into the nvidia control panel and setting the Antialiasing Settings to "Override Applications Settings" and 4x (4xMS)
RE: Black Texture Glitches
by Luna Crane on Tuesday November 4th 2014, 16:55
I have an integrated Intel Graphics card, which lacks a proprietary texture compression system, but there is a fix (applies to many Windose, Linux, Steam games as black textures are the usual indication that texture compression is missing).

*In case of Black Textures/Terrain (+ possible Mouse Cursor not appearing):

Fix all black everything and mouse function + render (read the Patent warning though) by installing this:

dri.freedesktop.org/wiki/S3TC/

There is an open-source, patent-free alternative of sorts, but I am unsure how to get it to work with Wine:

github.com/divVerent/s2tc/wiki/libtxc_dxtn

So, starting the game each time, you would run:

export force_s3tc_enable=true; wine ./BF2.exe
Can't start
by Nerexis on Saturday May 28th 2011, 6:41
I can't start BF2. Im using Linux Mint 11 64bit, GeForce 8600M GT, Intel Core 2 Duo 2x 2.5GHz.
I copied d3d9_.. dlls to wine's system32 folder.


Terminal:

wine BF2.exe +fullscreen 0

fixme:system:SystemParametersInfoW Unimplemented action: 94 (SPI_GETMOUSETRAILS)
fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)
fixme:dsalsa:IDsDriverBufferImpl_SetVolumePan (0x13bf20,0x13be90): stub
err:module:import_dll Loading library d3dx9_25.dll (which is needed by L"Z:\\media\\DATA\\Battlefield2\\TextureAtlasBuilder.dll") failed (error c000007b).
err:module:import_dll Library TextureAtlasBuilder.dll (which is needed by L"Z:\\media\\DATA\\Battlefield2\\RendDX9.dll") not found
err:module:import_dll Loading library d3dx9_25.dll (which is needed by L"Z:\\media\\DATA\\Battlefield2\\RendDX9.dll") failed (error c000007b).
fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_CACHE_INFORMATION
fixme:ntdll:NtSetSystemInformation (0x00000015,0x32ec98,0x00000024) stub
wine: Unhandled page fault on read access to 0x00000000 at address 0x40718e (thread 0009), starting debugger...
RE: Can't start
by Nerexis on Saturday May 28th 2011, 7:22
OK I fixed this by setting libs to 'native' but now I have error message:


Module: RendDX9
"Failed to set technique DrawShadowMapNV in effect Shaders/StaticMesh technique not found."
RE: Can't start
by Nerexis on Saturday May 28th 2011, 7:44
NEVERMIND


I downloaded new d3dx9 dlls from dll-files.com and it's working now ^^.
RE: Can't start
by Jean A. Hough on Thursday June 30th 2011, 16:16
Hi nerexis,

Tro to follow these steps:

d3dxx9_25.dll
This is because you are missing a file.
Step 1. You can download [url]www.d3dx9.net/download-missing-d3dx9_25-dll/[/url] here.
Step 2. Paste this file into your system32 and system folder. Also put it in your syswow
Step 3. Navigate to your System32(32Bit OS) or SyWOW64(64Bit OS) Folder.
Note: The location of System32 or SyWOW64 is
C:Windows\System32 (If you are using 32Bit Windows)
C:\Windows\SysWOW64 (if you are using 64Bit Windows)
Step 4.Paste the d3dxx9_25.dll into this folder.
Step 5.Run the game. It might work now.
Text: Unknown DynamicOption value 800x600@60Hz
by Olli on Friday May 20th 2011, 19:04
I'm getting this error when I'm trying to launch BF2:
Text: Unknown DynamicOption value 800x600@60Hz

I started fresh and installed it like in the guide:
1. Install BF2
2. Install 1.41 patch
3. Install 1.50 patch

Then I started it like this:
env WINEPREFIX="/home/bf2-wine" wine bf2.exe +fullscreen 0 +szx 1024 +szy 768

I tried to install d3dx9 with winetricks afterwards without any effect. I also tried to change the VideoSettings.setResolution value from Video.con.

My software:
Dirsto: Arch Linux 64 bit
Wine: 1.3.20
Graphic card drivers: nvidia 270.41.06
My hardware:
CPU: AMD 965BE
GPU: Nvidia GTX280
RE: Text: Unknown DynamicOption value 800x600@60Hz
by Olli on Monday May 23rd 2011, 8:51
Missed the "Refresh Rates". Now it starts.
Annoying (well-known?) mouse warping bug
by Matt North on Thursday November 25th 2010, 4:40
Hi all,

I've successfully installed BF2 v1.5 under Wine 1.2.1 and can run it with that and Wine 1.3.7 with almost no problems.

The one problem I've got is that the mouse cursor seems constrained to the initial window size, e.g. I can only move the mouse to turn so far before it hits the window edge and I can no longer turn in that direction. From what I gather this is a well known bug and would require a lot of work to patch it - but has anyone been able to run BF2 with no mouse issues, or has anyone got a workaround handy?

Thanks in advance.
RE: Annoying (well-known?) mouse warping bug
by monkeyslayer56 on Thursday November 25th 2010, 7:26
the mousewrapping is working just fine for me in wine 1.3.7 , for another game (don't play BF2 enough to know if it fixed it for it too) i had to winetricks d3dx9 d3dx9_26 d3dx9_28 d3dx9_31 d3dx9_35 d3dx9_36 d3dx9_42 dinput8
if i remmeber correctly(likly not all are needed) for the mouse wrapping to work. my main problem with the game is can't connect to an online acount, only a offline one :(. hope you get your wrapping to work
RE: Annoying (well-known?) mouse warping bug
by Matt North on Thursday November 25th 2010, 8:52
Turns out I had to set the MouseWarpOverride reg key to "force" for this to work in a virtual desktop. But work it does! Thanks to the WINE team for putting so much hard work in - it is appreciated!
Battlefield 2 - Wine 1.3.7 - Fedora 14 x64
by Ryan on Monday November 22nd 2010, 17:58
I managed to get Battlefield 2 running on Fedora 14 x64 last night on Wine 1.3.7 in 800x600 with all settings on high (set manually). I was unable to get punkbuster to install/run properly but I could play punkbuster free servers. I was unable to change screen res without the game crashing. To get this running I just installed from disc, and updated with patch 1.41 and 1.5. I had wine config set to run in windows 7 compatibility. Prior to doing this, I had already set the VideoMemorySize key under HKCU\wine\Direct3D, and gecko had automatically downloaded and installed. I had attempted to use winetricks to install a few other dlls etc, however winetricks doesn't work in x64. Also I had previously installed the tahoma font from a backup copy I had of some $NTSPUninstall$ folders.
RE: Battlefield 2 - Wine 1.3.7 - Fedora 14 x64
by Ryan on Monday November 22nd 2010, 18:03
also fullscreen worked fine :)
No mouse or keyboard
by Ruben on Monday October 4th 2010, 1:38
Hi. I could install the game with the DVD and upgrade it without any particular issue. It starts correctly within a virtual desktop window, but I can't interact with this window. It is unpossible to click ou type anything in the virtual desktop. Does anyone know a solution to this problem?
RE: No mouse or keyboard
by Kenneth Priisholm on Saturday February 19th 2011, 16:54
- Bump. Did you find any solution to the problem?

I have somewhat the same issue; game starts nicely in virtual desktop window and I'm able to get as far as choosing scenario, weapons and squad but as soon as I've clicked 'done' there's no keyboard- or mouse-response.

My setup is Ubuntu 10.10 64bit, Wine 1.2.2, BF2 installed from DVD + patched up to 1.5.

Any help will be highly appreciated; both by me and the kids :)
RE: No mouse or keyboard
by monkeyslayer56 on Saturday February 19th 2011, 21:43
try updating wine to 1.3.13, i just tried it on my 64 bit arch-linux (32bit prefix) and offline worked, joined and played some single player with just minor graphic glitches.
RE: No mouse or keyboard
by AJSB on Wednesday September 28th 2011, 2:40
Check out this bug:

bugs.winehq.org/show_bug.cgi?id=28512

Is it the same problem ?!?
Fix for black graphics glitches
by Nick on Monday July 5th 2010, 16:17
On 10.04 with latest Nvidia drivers as of 7/5; enable 2xAA in nvidia-settings and the game to make the glitches disappear
Can't star BF2
by Christoffer on Tuesday June 29th 2010, 4:59
Well I did everything in this toturial. But for some reason it just do not works for me. Everytime I try to start BF2 there is a window that says that "BF2.exe have encountered a problem and is forced to shut down." Any ideas?
RE: Can't star BF2
by Jordan on Tuesday June 29th 2010, 5:57
Can you run glxgears in the terminal please?
RE: Can't star BF2
by Christoffer on Tuesday June 29th 2010, 11:33
It said "segmentation fault" when I tried that command
RE: Can't star BF2
by Jordan on Tuesday June 29th 2010, 13:18
Well it seems you haven't installed any 3D drivers (nVidia or ATI) or that they've become corrupted. What distro are you running?
RE: Can't star BF2
by Christoffer on Tuesday June 29th 2010, 14:55
Yeah I think you are right. I don't really know how I can fix it. I have a ATI graphic card and I use the latest Ubuntu distribution. But do you think this might be causing the problem with BF2?
RE: Can't star BF2
by Jordan on Tuesday June 29th 2010, 15:08
Here's a guide on installing the ati drivers under Ubuntu: help.ubuntu.com/community/BinaryDriverHowto/ATI
RE: Can't star BF2
by Christoffer on Wednesday June 30th 2010, 1:21
I think I have found one of the problems. It seems that my graphic card is to old for the latest ATI driver. And I can't install an older one. Because Ubuntu 10.04 doesn't support the older verisons.

Thanks for the help!
Modelines
by Dean Hamstead on Sunday April 4th 2010, 7:19
fyi modelines can be generated for you using the 'gtf' command
ie...

gtf 1024 768 60

# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync


also the +restart option when starting bf2 spares you enduring the movies
RE: Modelines
by monkeyslayer56 on Sunday April 4th 2010, 13:59
o thanks for the +restart i havn't got tot ry it but i usally just rename the movies so i don't have to endure them lol
Multiplayer
by Alexander on Wednesday February 17th 2010, 12:56
Anybody fixed this yet?
RE: Multiplayer
by Ryan on Saturday February 20th 2010, 9:06
Ok to fix multiplayer run regedit in terminal. Then go to hkey_localmachine. Expand it. THen expand software. FInd electronic arts and expnad it. Then expand battlefield 2. Clickon ergc. modify it so it says x9392 then it says your product key. Multiplayer should then work fine.
RE: Multiplayer
by Alexander on Saturday March 13th 2010, 17:44
So modify a line to read my cd key?
errrmm..
by tomi on Monday January 11th 2010, 8:51
Well yeah, well i've got just one problem. Cant find "HKEY_CURRENT_USER\Software\Wine\AppDefaults\bf2.exe\Direct3D"

Missing from the part where AppDefaults should be.
only thing that i have even reminding of Direct3D is at
"HKEY_CURRENT_USER\Software\Wine\Direct3D\"
Should i be worried ? :p
RE: errrmm..
by monkeyslayer56 on Monday January 11th 2010, 9:28
if u want it add it but i don't think u should be worried because its only made if something in direct3D gets configured for bf2...
Fixing some bugs
by Alexander on Tuesday December 22nd 2009, 22:02
As i indicated in my tests...

Set the following to your direct3d key

DirectDrawBuffer = gdi
OffScreenRenderingMode = fbo
RE: Fixing some bugs
by dj--alex on Wednesday August 18th 2010, 15:06
Battlefield 2

amd Х4 920\8g\gtx 280 amp!\1.5tb
amd x4 9850be \4gb\gf 9800\250gb
wine 1.3.0 ubuntu 10.04
directx ms framework 1,2,3 physx

pastebin.ubuntu.com/480094/

logs
Back