Team Fortress 2 on Freebsd / PC-BSD 64bit (AMD64) + NVIDIA

This is how I was able to play Team Fortress 2, Counter Strike Source and other Steam games on a 64bit version of PC-BSD with NVIDIA. It applies to FreeBSD as well on any AMD64 kernel.

Updated 25 October 2011: David Naylor’s wine package 1.3.31 now includes the NVIDIA patch built in
Updated 18 October 2011: fonts are now properly rendered with wine 1.3.30

This is my current uname -a
FreeBSD NEONZ 9.0-RC1 FreeBSD 9.0-RC1 #3: Tue Oct 18 09:59:23 PDT 2011 root@build9x64.pcbsd.org:/usr/obj/pcbsd-build90/fbsd-source/9.0/sys/GENERIC amd64

I did the following steps and recommend them in this order to get Steam games working on FreeBSD 64bit. The only issue is that there are no ingame fonts. Read this for more info. http://bugs.winehq.org/show_bug.cgi?id=19522 Fonts are now properly displayed in Steam source games using Wine 1.3.30.

1.  Download native 64bit NVIDIA drivers from http://www.nvidia.com/ . PC-BSD 9.0-BETA3 came with v280. If you use FreeBSD, you need to download manually and install.

2. Download the unofficial Wine 1.3.31 64bit port by David Naylor from http://www.mediafire.com/wine_fbsd64 (this link contains older versions http://people.freebsd.org/~ivoras/wine/ ). Install it with pkg_add.

3. Download the patch-wine-nvidia.sh script from the same place. This is needed to install 32bit version of the NVIDIA driver which is needed to play the 32bit Steam games. Run the script as root: This is no longer needed as patch is included with David Naylor’s package as of 1.3.31.

# sh patch-wine-nvidia.sh

3a. Run the following prefixes to generate the correct Wine environment

$ WINEPREFIX=~/.wine WINEARCH=win32 winecfg

3b. (optional) While in winecfg,  go to Libraries, add a new Library Replace called gameoverlayrender and set to disabled. Only do this if game fails to launch. I didn’t need it.

3c. Set TF2′s main executable “hl2.exe” to “Windows 98″ version. This is done via winecfg -> “Add application…” -> type hl2.exe in the filename box -> click open -> select hl2.exe in the “Application Settings” list and change “Windows Version” to “Windows 98″. I needed this, or TF2 wouldn’t launch.

3d. I had an issue with the mouse not moving (Razer Lachesis). I followed the steps on the WineHQ page to run in Virtual Desktop mode with windowed TF2 – “winecfg -> Graphics -> “Emulate a Virtual Desktop”. This size should be the same as your screen resolution. ”
You can now close winecfg.

4. Download the Steam installer .msi from Steams website and then run:

$  WINEPREFIX=~/.wine WINEARCH=win32 wine msiexec /i SteamInstaller.msi

5. After you install Steam and it updates, close it. Then run the following:

$ WINEARCH=win32 WINEPREFIX=~/.wine wine ~/.wine/drive_c/Program\ Files/Steam/Steam.exe -applaunch 440

6. As soon as you login, stop the launch and download the game from Steam Library. It will take a while since it’s ~10gb.

7. Once you  TF2 is downloaded, close Steam. Then start TF2 in window mode (I needed it to be able to use mouse) with skip intro and no borders:

$ WINEARCH=win32 WINEPREFIX=~/.wine wine ~/.wine/drive_c/Program\ Files/Steam/Steam.exe -applaunch 440 -novid -w -noborder

For me the game takes 4-5 min to actually start. While an inconvenience, at least it runs. The fonts now render properly and the game is playable.

I will update this post as more information becomes available.

Leave a Comment




six − = two