Difference between revisions of "Setting Up FAF Linux"

From FA Forever Wiki
Jump to: navigation, search
m
(The game crashes at ~45min in game time: changes because the prev one)
 
(44 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
If you have questions please contact the community:
 
If you have questions please contact the community:
  
[http://forums.faforever.com/viewtopic.php?t=4507 FAF forum Linux support thread] <br />
+
[https://forum.faforever.com/topic/12/linux-support FAF forum Linux support thread] <br />
 
[https://discordapp.com/channels/197033481883222026/202928463076786176 The official FAF Discord Channel: #technical-help] - [https://discordapp.com/invite/hgvj6Af Discord invite]
 
[https://discordapp.com/channels/197033481883222026/202928463076786176 The official FAF Discord Channel: #technical-help] - [https://discordapp.com/invite/hgvj6Af Discord invite]
  
Line 72: Line 72:
 
<br />
 
<br />
 
Properties -> Force the use of a specific Steam Play compatibility tool:
 
Properties -> Force the use of a specific Steam Play compatibility tool:
  Proton 3.16-9 Beta (or less)
+
Proton 5.0-9 (recommended)
Proton 4.2-3 causes desync issues during playing the game.
+
Proton 4.11-9
 +
  Proton 3.16-9  
 +
Proton 3.7-8
 +
Proton 4.2-9 causes desync issues during playing the game.
  
 
<br />
 
<br />
  
 
Proceed with the installation of the Java Client after this. [[#Java Downlord's Client]]
 
Proceed with the installation of the Java Client after this. [[#Java Downlord's Client]]
 
  
 
==== File Locations ====
 
==== File Locations ====
Line 151: Line 153:
  
 
=== Script Installation ===
 
=== Script Installation ===
Currently there is a bash script for installing everything you need (including the game itself). It works on Ubuntu and other distributions as well:
+
There is a bash script for installing everything you need (including the game itself). It works on Ubuntu and other distributions as well:
[https://github.com/tatsujb/installFAFscript atsujb/installFAFscript]
+
[https://github.com/tatsujb/installFAFscript installFAFscript]
  
This is the fastest way to start playing but please note that this script upgrades your Ubuntu distribution (ex: 18.10 -> 19.04). This you may not want.
+
Nowadays the script is rarely updated so the manual install method is recommended instead (just a few steps).  
  
 +
''Note: that this script upgrades your Ubuntu distribution (ex: 18.10 -> 19.04).''
  
 
=== Manual Installation ===
 
=== Manual Installation ===
  
The followings are a step by step example installation on Ubuntu 18.xx, it's built upon a native Steam installation of the game.
+
The followings are a step by step example installation on Ubuntu 20.xx, it's built upon a native Steam installation of the game.
  
  
 
==== Download the Java FAF client  ====
 
==== Download the Java FAF client  ====
Download the latest Java FAF client (currently it is v0.10.0-beta)<br />
+
Download the latest Java FAF client<br />
 
'''URL:''' https://github.com/FAForever/downlords-faf-client/releases<br />
 
'''URL:''' https://github.com/FAForever/downlords-faf-client/releases<br />
'''File name:''' _dfc_unix_0_10_0-beta.tar.gz<br />
+
'''File name:''' dfc_unix_1_2_0.tar.gz<br />
  
Extract it to ~/Games/javaFafClient/
+
Extract it to ~/Games
  
 +
==== Install JAVA 14  ====
  
==== Download openJDK 10 ====
+
Install Java 14 Runtime Environment (JRE) or Development Kit (JDK)
'''URL:''' https://jdk.java.net/archive/ <br />
+
  sudo apt install openjdk-14-jre
'''File name:''' openjdk-10.0.2_linux-x64_bin.tar.gz <br />
 
 
 
Extract it to ~/Games/javaFafClient/
 
 
 
''Note: Ubuntu repositories don't have Java 10 so you have to use this. There is no need to install it from unofficial PPAs etc...''<br />
 
''Note: Recommended directory for jdk is /usr/lib/jvm/, but we are not using that for simplicity.''
 
 
 
If the archive site doesn't work, your other options are:<br />
 
http://forums.faforever.com/viewtopic.php?f=2&t=4507&p=174037#p174037
 
  
 +
''Note: Java installs to: /usr/lib/jvm/java-14-openjdk-amd64 (we will use this path later)
 +
<br/>
 +
''Note: The client doesn't work with other Java versions.''
  
 
==== Set execute flags ====
 
==== Set execute flags ====
Open a terminal and set execute flags for the following files
+
Open a terminal and set execute flags for the following files (if they don't have already).
  cd ~/Games/javaFafClient/downlords-faf-client-0.10.0-beta/
+
  cd ~/Games/downlords-faf-client-1.2.0/
 
  sudo chmod +x downlords-faf-client
 
  sudo chmod +x downlords-faf-client
  sudo chmod +x ./lib/faf-uid
+
  sudo chmod +x ./natives/faf-uid
 
 
  
 
==== Set INSTALL4J_JAVA_HOME ====
 
==== Set INSTALL4J_JAVA_HOME ====
 
In the same terminal, set the INSTALL4J_JAVA_HOME environment variable
 
In the same terminal, set the INSTALL4J_JAVA_HOME environment variable
  export INSTALL4J_JAVA_HOME=~/Games/javaFafClient/jdk-10.0.2
+
  export INSTALL4J_JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64
 
At this point you should be able to run the FAF client. Please test this:
 
At this point you should be able to run the FAF client. Please test this:
 
  ./downlords-faf-client
 
  ./downlords-faf-client
  
 
''Note: You will need to set the INSTALL4J_JAVA_HOME environment variable every time you open a new terminal. Alternatively, it is possible to create your own bash script for starting the client or to append the export command to your [https://unix.stackexchange.com/questions/129143/what-is-the-purpose-of-bashrc-and-how-does-it-work .bashrc] file.''
 
''Note: You will need to set the INSTALL4J_JAVA_HOME environment variable every time you open a new terminal. Alternatively, it is possible to create your own bash script for starting the client or to append the export command to your [https://unix.stackexchange.com/questions/129143/what-is-the-purpose-of-bashrc-and-how-does-it-work .bashrc] file.''
 
  
 
==== Copy the Steam RUN script  ====
 
==== Copy the Steam RUN script  ====
 
If you ran the game from Steam you should have a file called "run" in /tmp/proton_your_linux_username.
 
If you ran the game from Steam you should have a file called "run" in /tmp/proton_your_linux_username.
 
The tmp directory is only temporary so copy this file to somewhere nice.
 
The tmp directory is only temporary so copy this file to somewhere nice.
  cp /tmp/proton_test1/run ~/Games/javaFafClient/downlords-faf-client-0.10.0-beta/
+
  cp /tmp/proton_your_linux_username/run ~/Games/downlords-faf-client-1.2.0/
 
If you cannot find the run file, please check your Steam settings again. [[#Install the game, set launch options]]
 
If you cannot find the run file, please check your Steam settings again. [[#Install the game, set launch options]]
  
''Note: This file contains the environment variables for Proton that are necessary to launch the game in a Proton/Wine environment. The FAF client will use this file to launch the game after we set it.''
+
''Note: This file contains the environment variables for Proton that are necessary to launch the game in a Proton/Wine environment. It also contains the version of Proton that you have selected previously in Steam. The FAF client will use this file to launch the game after we set it.''
 
 
 
 
==== Create symbolic links for Maps and Mods ====
 
Create symbolic links for Maps and Mods directories
 
 
 
cd ~/.steam/steam/steamapps/common/Supreme\ Commander\ Forged\ Alliance/
 
ln -s ~/My\ Games/Gas\ Powered\ Games/Supreme\ Commander\ Forged\ Alliance/Maps/ Maps
 
ln -s ~/My\ Games/Gas\ Powered\ Games/Supreme\ Commander\ Forged\ Alliance/Mods/ Mods
 
 
 
''Note: There is already a "maps" directory in ~/.steam/steam/steamapps/common/Supreme Commander Forged Alliance/. This contains the original maps of the game and the game expects to see the community maps here too that are downloaded by the client. So you need only one "maps" directory here.
 
 
 
Solution: Copy the content of the "maps" directory to the "Maps" directory and rename/delete the "maps" directory otherwise downloaded maps won't appear in lobbies.
 
''
 
 
 
  
 
=== Client Setup ===
 
=== Client Setup ===
Line 228: Line 210:
 
==== Settings ====
 
==== Settings ====
  
Settings -> Forged Alliance Forever
+
===== Set File Locations =====
 +
Client: Settings / Forged Alliance Forever /
 +
 
 
Game location:  
 
Game location:  
 
  /home/your_linux_username/.steam/steam/steamapps/common/Supreme Commander Forged Alliance
 
  /home/your_linux_username/.steam/steam/steamapps/common/Supreme Commander Forged Alliance
Line 235: Line 219:
  
 
Advanced, Command line format for executable:
 
Advanced, Command line format for executable:
  /home/your_linux_username/Games/javaFafClient/downlords-faf-client-0.10.0-beta/run "%s"
+
  /home/your_linux_username/Games/downlords-faf-client-1.2.0/run "%s"
  
 
''Note: The run file mentioned here is the run file you copied earlier from the Steam temporary directory.''
 
''Note: The run file mentioned here is the run file you copied earlier from the Steam temporary directory.''
Line 244: Line 228:
 
  Leave this empty
 
  Leave this empty
  
 +
===== Use fallback vault location =====
 +
Set "Use fallback vault location" in the client settings.
  
 +
Without it, your custom downloaded maps and mods won't show up in the client and the game.
 +
 +
General / Use Fallback vault location
 +
 +
 +
===== Create a game =====
 
Try to create a game and wait for the client to patch the FAF executable. At this point everything should work.
 
Try to create a game and wait for the client to patch the FAF executable. At this point everything should work.
 
+
<br /><br /><br />
  
 
=== File Locations ===
 
=== File Locations ===
Line 257: Line 249:
  
 
Location of mods and maps downloaded by the client<br />
 
Location of mods and maps downloaded by the client<br />
It needs to be linked: [[#Create symbolic links for Maps and Mods]]
+
Use [[#Use fallback vault location]]!
  ~/My Games/Gas Powered Games/Supreme Commander Forged Alliance
+
  ~/.faforever/user/My Games/Gas Powered Games/Supreme Commander Forged Alliance
  
  
 
The script that launches the client: ''downlords-faf-client''
 
The script that launches the client: ''downlords-faf-client''
  ~/Games/javaFafClient/downlords-faf-client-0.10.4-beta/downlords-faf-client
+
  ~/Games/downlords-faf-client-1.2.0/downlords-faf-client
 
 
 
 
 
 
  
 
== Legacy Python Client ==
 
== Legacy Python Client ==
Line 280: Line 269:
 
Now you can install the game using wine. You can use your default wine prefix or create a new one. A nice UI tool for handling wine prefixes is [https://www.archlinux.org/packages/community/any/playonlinux/ PlayOnLinux].
 
Now you can install the game using wine. You can use your default wine prefix or create a new one. A nice UI tool for handling wine prefixes is [https://www.archlinux.org/packages/community/any/playonlinux/ PlayOnLinux].
  
==== Debian/Ubuntu ====
+
==== Debian/Ubuntu family====
 
There's no .deb package yet, please create one. Some discussion about that is in http://forums.faforever.com/viewtopic.php?f=2&t=4507&p=141217&hilit=linux#p141217
 
There's no .deb package yet, please create one. Some discussion about that is in http://forums.faforever.com/viewtopic.php?f=2&t=4507&p=141217&hilit=linux#p141217
  
Client 0.18.0 runs on Ubuntu 17.04 using system packages only. Install instructions follow:
+
Client 0.18.0 runs on Ubuntu 17.04(very likely newest) using system packages only. Install instructions follow:
  
 
* Install required packages:
 
* Install required packages:
 
   <code>sudo apt-get install python3-idna python3-semantic-version python3-pyqt5 python3-pyqt5.qtwebengine python3-pyqt5.qtmultimedia python3-jsonschema python3-jinja2</code>
 
   <code>sudo apt-get install python3-idna python3-semantic-version python3-pyqt5 python3-pyqt5.qtwebengine python3-pyqt5.qtmultimedia python3-jsonschema python3-jinja2</code>
* Download the latest client source tar.gz (for example from [https://github.com/FAForever/client/releases/tag/0.18.0 here])
+
* Download the latest client source tar.gz (for example from [https://github.com/FAForever/client/releases here])
 
* Download and install the faf-uid smurf protection executable:
 
* Download and install the faf-uid smurf protection executable:
  <code>sudo wget https://github.com/FAForever/uid/releases/download/v4.0.5/faf-uid -O /usr/local/bin/faf-uid</code>
+
But firts check actual version [https://github.com/FAForever/uid/releases/ here]
 +
 
 +
<code>sudo wget https://github.com/FAForever/uid/releases/download/v4.0.5/faf-uid -O /usr/local/bin/faf-uid</code>
 +
 
 +
''Then:''
 
   <code>sudo chmod +x /usr/local/bin/faf-uid</code>
 
   <code>sudo chmod +x /usr/local/bin/faf-uid</code>
 
   (Note that faf-uid runs xrandr, lspci, lsblk and uname. You need an lspci version that supports the --json switch, which is util-linux-2.27 or greater.)
 
   (Note that faf-uid runs xrandr, lspci, lsblk and uname. You need an lspci version that supports the --json switch, which is util-linux-2.27 or greater.)
 
* Create a version file:
 
* Create a version file:
  <code>echo "0.18.0" > res/RELEASE-VERSION</code>
+
<code> echo "ver.si.on" > res/RELEASE-VERSION </code>
 +
Note: version of client,not fafuid
 +
 
 +
''For example:'' 
 +
<code> echo "0.18.4" > res/RELEASE-VERSION </code>
 
* Run the client (from source root directory):
 
* Run the client (from source root directory):
 
   <code>python3 src/__main__.py</code>
 
   <code>python3 src/__main__.py</code>
Line 332: Line 329:
 
  ~/Documents/My Games/Gas Powered Games/Supreme Commander Forged Alliance/Maps
 
  ~/Documents/My Games/Gas Powered Games/Supreme Commander Forged Alliance/Maps
 
but this path may be altered by the documents directory set up in wine and localization of your system.
 
but this path may be altered by the documents directory set up in wine and localization of your system.
 +
 +
 +
 +
== Issues with the game ==
 +
 +
=== The FAF client doesn't launch the game ===
 +
 +
When you double click on lobbies in the Java FAF client, the game doesn't start.
 +
If you installed the game using Steam then you need to have Steam running in the background. Just open Steam and try again.
 +
 +
When Steam is not running then you get this error in the terminal:
 +
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
 +
[S_API FAIL] SteamAPI_Init() failed
 +
 +
 +
=== No sound when the game is minimized ===
 +
 +
No sound when the game is minimized or running in the background.
 +
 +
;Solution:
 +
: Run winecfg and configure your Proton/wine or vanilla Wine.
 +
export WINEPREFIX="/home/your_linux_user_name/.local/share/Steam/steamapps/compatdata/9420/pfx/"
 +
winecfg
 +
: Graphics -> "Emulate a virtual desktop" -> Desktop Size: your native resolution
 +
 +
 +
=== Mouse cursor flickering ===
 +
 +
The mouse cursor flickers/disappears.
 +
 +
;Solution:
 +
* Enable vertical sync (on/off) in the game's settings
 +
* Run the game, open the game's console and issue command: d3d_WindowsCursor
 +
 +
You don't have to do every of these, just try, see what is working for you.
 +
 +
 +
=== Performance issues ===
 +
 +
Low FPS and 45+ min crashes.
 +
 +
;Solution 1
 +
Use Proton 5.xx. It has Directx9 -> Vulkan translation enabled by default.
 +
If you have no Vulkan support, it will revert back to Directx9 -> opengl translation which is slow.
 +
 +
''Note: Your Linux graphics drivers need to have Vulkan support for this one. This link will help you to install (and test it): https://linuxconfig.org/install-and-test-vulkan-on-linux ''
 +
 +
''You can use DXVK_HUD=1 option to see whether the Vulkan translation is working or not for Proton 5.xx too. See below.
 +
 +
 +
;Solution 2
 +
Proton 4.11 has D9VK built in so you can use that as well if for some reason Proton 5.xx doesn't work for you. To enable D9VK set Launch options in Steam to:
 +
PROTON_USE_D9VK=1 DXVK_HUD=1 PROTON_NO_ESYNC=1 PROTON_DUMP_DEBUG_COMMANDS=1 PROTON_LOG=1 %command%
 +
 +
Start the game from Steam, copy the Run file then start the client with the following terminal commands:
 +
export DXVK_HUD=devinfo,fps
 +
export PROTON_USE_D9VK=1
 +
export INSTALL4J_JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64
 +
./downlords-faf-client
 +
 +
'' Note: DXVK_HUD will display FPS numbers in the upper left corner of the screen in lobbies and in games. You can remove that if you want. It only works when D9VK is active.''
 +
 +
=== The game crashes at ~45min in game time ===
 +
 +
The game crashes at ~45min in game time.
 +
 +
;Solution:
 +
* Turn off the minimap and don't use split view.
 +
* Use Proton 5.xx
 +
* Use the the Vulkan translation layer (Directx9 to Vulkan) for Proton/Wine or vanilla Wine (see the previous one, Solution 1 and Solution 2).
 +
 +
=== Desync issues ===
 +
 +
The desync window appears during gameplay.
 +
 +
;Solution:
 +
: Turn off mods and use appropriate Proton/Wine and vanilla Wine versions. See:
 +
 
 +
[[#Install the game, set launch options]]
 +
 +
''Note: Don't forget to create and copy your Steam RUN file again if you change the version of Proton.
 +
''
 +
 +
 +
=== Game starts but the screen is black ===
 +
 +
The game starts, sound ok, but the screen is black.
 +
 +
;Solution:
 +
: Use appropriate Proton/Wine and vanilla Wine versions. See:
 +
 +
[[#Install the game, set launch options]]
 +
 +
 +
Reported with using AMD Vega cards and Proton 4.2:
 +
https://github.com/ValveSoftware/Proton/issues/688#issuecomment-491610215
 +
 +
 +
=== Java Downlord's client freezes ===
 +
 +
The java Downlord's client consumes insane amount of CPU, memory or freezes.
 +
 +
;Solution:
 +
: Try to restrict java to use the software renderer instead of graphics card acceleration.
 +
: Add this to the downlords-faf-client.vmoptions file: -Dprism.order=sw

Latest revision as of 21:07, 11 September 2020

This wiki article details the installation of the Supreme Commander: Forged Alliance game and the Forged Alliance Forever (FAF) clients on Linux.

Contact

If you have questions please contact the community:

FAF forum Linux support thread
The official FAF Discord Channel: #technical-help - Discord invite

About the game

Supreme Commander: Forged Alliance game runs under Linux using wine.

You only need the Supreme Commander: Forged Alliance game and the #Java Downlord's Client to be able to play in the FAF community. The game is available on Steam


About the clients

There are two FAF clients available but only the Downlords client compatible with the current FAF server. The client can handle the communication between players (IRC), launching team and 1v1 lobbies/games, downloading community mods and maps, patching the game, etc.

The new Java Downlord's client
This client was introduced as the official client in 2018 replacing the Python client. The client is built upon Java.
The legacy Python client
This client doesn't work anymore. Its development has stopped and it has become incompatible with the current FAF server. The client is built upon Python.

Both of the clients run on Linux. Please refer to the clients' own section in this article for more information.

#Java Downlord's Client

#Legacy Python Client

Install Supreme Commander: Forged Alliance

You can install the game with the following methods:

Using Linux Steam (RECOMMENDED For the Java client) #Install using native Steam
Native Linux Steam can install the game and the necessary Windows DLLs, libraries for running it.
Steam's compatibility tool (Proton/Wine) will be able to run the game.
Using Windows Steam via Wine
Windows Steam can install the game and the necessary Windows DLLs, libraries for running it.
The disadvantage of this method is that you have to deal with Windows Steam that has certain known bugs with Wine (logging in, downloading games). You can manage to do it but it's a hassle.
Using Linux SteamCMD
It's basically the same as the first one but you have to install SteamCMD and know SteamCMD commands.
Not recommended since native Linux Steam is much more convenient.
Using Windows SteamCMD via Wine
It's basically the same as the second one but you have to install SteamCMD and know SteamCMD commands.
It can be less a hassle but certain Windows Steam bugs might still appear.
Using Lutris
Lutris has a UI and uses SteamCMD (and your Steam account) to install Steam games in a Wine environment.
Using retail copy of the game ISO, DVD via Wine
Just launch the install of the DVD in a Wine environment. You will have to add the necessary Windows DLLs and libraries manually in Wine.
NOTE: When using the FAF clients, the clients will prompt you to link your Steam account to FAF to prevent duplicated accounts and malicious users joining the FAF community.
You will have to register the serial number of your game in Steam. This means that illegal copies of the ISO will not work, in this case buy the game on Steam, it's cheap.

Install using native Steam

Set your Steam client

Steam -> Settings -> Steam Play -> under Advanced -> "Enable Steam Play for all other titles"

Install the game, set launch options

Set the following launch options, then start the game from Steam

Properties -> Set Launch Options -> set this:

PROTON_NO_ESYNC=1 PROTON_DUMP_DEBUG_COMMANDS=1 %command%

PROTON_NO_ESYNC will solve slow video playback problems in the main menu and other places.
PROTON_DUMP_DEBUG_COMMANDS will generate a RUN script for your game that you will be able to use later.


Properties -> Force the use of a specific Steam Play compatibility tool:

Proton 5.0-9 (recommended)
Proton 4.11-9 
Proton 3.16-9 
Proton 3.7-8

Proton 4.2-9 causes desync issues during playing the game.


Proceed with the installation of the Java Client after this. #Java Downlord's Client

File Locations

Game directory:

~/.steam/steam/steamapps/common/Supreme Commander Forged Alliance/

Game perf file:

~/.steam/steam/steamapps/compatdata/9420/pfx/drive_c/users/steamuser/Local Settings/Application Data/Gas Powered Games/Supreme Commander Forged Alliance/Game.prefs

WINEPREFIX:

~/.steam/steam/steamapps/compatdata/9420/pfx

Install using SteamCMD

You can download FA using a steam installation in wine. The following steps describe how to download FA using steamcmd on Arch Linux:

Install steamcmd:

yaourt -S steamcmd

Now you need to run steamcmd once as root to let it install its updates:

sudo steamcmd

now run steamcmd as your normal user to download your copy of FA and run the following commands in its shell:

login [my_steam_username]
@sSteamCmdForcePlatformType windows
force_install_dir [my/desired/installlocation]
app_update 9420 validate

Install using the retail ISO

Just launch the setup from the CD (ISO).

After installation

Run

winecfg

and enable "emulate virtual screen" option in graphics tab and enter you display resolution.


After installation run the game without the client, setup graphics and make sure everything works like sound etc. The bloom renderer graphics setting may not work. If the game does not start again, delete the #Game.prefs

If the game crashs with the following error:

CD3DDeviceResources::DevResInitResources: Unable to load effect file /effects/cartographic.fx

install d3dx9 using winetricks:

winetricks dlls d3dx9

If you have no sound install xact audio:

winetricks dlls xact


File Locations

Game.prefs

Your game.prefs contains all game settings, like graphics settings, keybindings and active UI mods. It is located at

~/.wine/drive_c/users/USER/Local Settings/Application Data/Gas Powered Games/Supreme Commander Forged Alliance/Game.prefs

but this path depends on your WINEPREFIX and probably on the Windows version you set up in wine.




Java Downlord's Client

Please #Contact the community for more information.

Script Installation

There is a bash script for installing everything you need (including the game itself). It works on Ubuntu and other distributions as well: installFAFscript

Nowadays the script is rarely updated so the manual install method is recommended instead (just a few steps).

Note: that this script upgrades your Ubuntu distribution (ex: 18.10 -> 19.04).

Manual Installation

The followings are a step by step example installation on Ubuntu 20.xx, it's built upon a native Steam installation of the game.


Download the Java FAF client

Download the latest Java FAF client
URL: https://github.com/FAForever/downlords-faf-client/releases
File name: dfc_unix_1_2_0.tar.gz

Extract it to ~/Games

Install JAVA 14

Install Java 14 Runtime Environment (JRE) or Development Kit (JDK)

sudo apt install openjdk-14-jre

Note: Java installs to: /usr/lib/jvm/java-14-openjdk-amd64 (we will use this path later)
Note: The client doesn't work with other Java versions.

Set execute flags

Open a terminal and set execute flags for the following files (if they don't have already).

cd ~/Games/downlords-faf-client-1.2.0/
sudo chmod +x downlords-faf-client
sudo chmod +x ./natives/faf-uid

Set INSTALL4J_JAVA_HOME

In the same terminal, set the INSTALL4J_JAVA_HOME environment variable

export INSTALL4J_JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64

At this point you should be able to run the FAF client. Please test this:

./downlords-faf-client

Note: You will need to set the INSTALL4J_JAVA_HOME environment variable every time you open a new terminal. Alternatively, it is possible to create your own bash script for starting the client or to append the export command to your .bashrc file.

Copy the Steam RUN script

If you ran the game from Steam you should have a file called "run" in /tmp/proton_your_linux_username. The tmp directory is only temporary so copy this file to somewhere nice.

cp /tmp/proton_your_linux_username/run ~/Games/downlords-faf-client-1.2.0/

If you cannot find the run file, please check your Steam settings again. #Install the game, set launch options

Note: This file contains the environment variables for Proton that are necessary to launch the game in a Proton/Wine environment. It also contains the version of Proton that you have selected previously in Steam. The FAF client will use this file to launch the game after we set it.

Client Setup

Launch the FAF client

./downlords-faf-client

Settings

Set File Locations

Client: Settings / Forged Alliance Forever /

Game location:

/home/your_linux_username/.steam/steam/steamapps/common/Supreme Commander Forged Alliance


Advanced, Command line format for executable:

/home/your_linux_username/Games/downlords-faf-client-1.2.0/run "%s"

Note: The run file mentioned here is the run file you copied earlier from the Steam temporary directory.


Execution directory:

Leave this empty
Use fallback vault location

Set "Use fallback vault location" in the client settings.

Without it, your custom downloaded maps and mods won't show up in the client and the game.

General / Use Fallback vault location


Create a game

Try to create a game and wait for the client to patch the FAF executable. At this point everything should work.


File Locations

Configuration directory for the client
It contains logs, client.prefs the configuration file of the client, etc...

~/.faforever

Note: The client.prefs file contains your username and password.


Location of mods and maps downloaded by the client
Use #Use fallback vault location!

~/.faforever/user/My Games/Gas Powered Games/Supreme Commander Forged Alliance


The script that launches the client: downlords-faf-client

~/Games/downlords-faf-client-1.2.0/downlords-faf-client

Legacy Python Client

The community client (the client) is written in Python3/PyQt5, which means that the client runs straight away on Linux.

Installation

Arch Linux

You need AUR access, so install something like yaourt. Then install my package with

yaourt -S python-fafclient

This should install wine as a dependency. Now you can install the game using wine. You can use your default wine prefix or create a new one. A nice UI tool for handling wine prefixes is PlayOnLinux.

Debian/Ubuntu family

There's no .deb package yet, please create one. Some discussion about that is in http://forums.faforever.com/viewtopic.php?f=2&t=4507&p=141217&hilit=linux#p141217

Client 0.18.0 runs on Ubuntu 17.04(very likely newest) using system packages only. Install instructions follow:

  • Install required packages:
 sudo apt-get install python3-idna python3-semantic-version python3-pyqt5 python3-pyqt5.qtwebengine python3-pyqt5.qtmultimedia python3-jsonschema python3-jinja2
  • Download the latest client source tar.gz (for example from here)
  • Download and install the faf-uid smurf protection executable:

But firts check actual version here

sudo wget https://github.com/FAForever/uid/releases/download/v4.0.5/faf-uid -O /usr/local/bin/faf-uid

Then:

 sudo chmod +x /usr/local/bin/faf-uid
 (Note that faf-uid runs xrandr, lspci, lsblk and uname. You need an lspci version that supports the --json switch, which is util-linux-2.27 or greater.)
  • Create a version file:
 echo "ver.si.on" > res/RELEASE-VERSION 

Note: version of client,not fafuid

For example:

 echo "0.18.4" > res/RELEASE-VERSION 
  • Run the client (from source root directory):
 python3 src/__main__.py

Gentoo

There is an experimental overlay available at https://github.com/Wesmania/faforever, along with installation instructions. You will need layman to set it up. Note that wine is not a dependency of these packages, you will have to install it on your own.

Run from source

See basic instructions at https://github.com/faforever/client#running-on-linux

Client Setup

First thing is to point your client to your game directory using Options -> Settings -> Game Path... If you install FA using the Retail ISO, your game path probably is

~/.wine/drive_c/Program Files/THQ/Gas Powered Games/Supreme Commander - Forged Alliance

When using the steam download, your game path probably is

~/.steam/steam/steamapps/common/ForgedAlliance

I created some client settings so you can adjust how the client starts the game using wine. The are only accessible through the #FA Lobby.ini file while the client is not running (because it overwrites the file on close).

[wine]
exe=/usr/bin/wine                                         <- points to your wine binary, defaults to 'wine'
prefix=/home/linuxmasterrace/.PlayOnLinux/wineprefix/faf  <- points to your WINEPREFIX path, defaults to '~/.wine'
cmd_prefix=primusrun                                      <- prefix the program start for something like switchable graphics

File Locations

FA Lobby.ini

The settings file of the client is located at

~/.config/ForgedAllianceForever/FA Lobby.ini

It contains all settings of the client.

Logs

~/FAForever/logs

Look here if something goes wrong.

Maps

Your maps are located at

~/Documents/My Games/Gas Powered Games/Supreme Commander Forged Alliance/Maps

but this path may be altered by the documents directory set up in wine and localization of your system.


Issues with the game

The FAF client doesn't launch the game

When you double click on lobbies in the Java FAF client, the game doesn't start. If you installed the game using Steam then you need to have Steam running in the background. Just open Steam and try again.

When Steam is not running then you get this error in the terminal:

[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API FAIL] SteamAPI_Init() failed


No sound when the game is minimized

No sound when the game is minimized or running in the background.

Solution
Run winecfg and configure your Proton/wine or vanilla Wine.
export WINEPREFIX="/home/your_linux_user_name/.local/share/Steam/steamapps/compatdata/9420/pfx/"
winecfg
Graphics -> "Emulate a virtual desktop" -> Desktop Size: your native resolution


Mouse cursor flickering

The mouse cursor flickers/disappears.

Solution
  • Enable vertical sync (on/off) in the game's settings
  • Run the game, open the game's console and issue command: d3d_WindowsCursor

You don't have to do every of these, just try, see what is working for you.


Performance issues

Low FPS and 45+ min crashes.

Solution 1

Use Proton 5.xx. It has Directx9 -> Vulkan translation enabled by default. If you have no Vulkan support, it will revert back to Directx9 -> opengl translation which is slow.

Note: Your Linux graphics drivers need to have Vulkan support for this one. This link will help you to install (and test it): https://linuxconfig.org/install-and-test-vulkan-on-linux

You can use DXVK_HUD=1 option to see whether the Vulkan translation is working or not for Proton 5.xx too. See below.


Solution 2

Proton 4.11 has D9VK built in so you can use that as well if for some reason Proton 5.xx doesn't work for you. To enable D9VK set Launch options in Steam to:

PROTON_USE_D9VK=1 DXVK_HUD=1 PROTON_NO_ESYNC=1 PROTON_DUMP_DEBUG_COMMANDS=1 PROTON_LOG=1 %command%

Start the game from Steam, copy the Run file then start the client with the following terminal commands:

export DXVK_HUD=devinfo,fps
export PROTON_USE_D9VK=1
export INSTALL4J_JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64
./downlords-faf-client

Note: DXVK_HUD will display FPS numbers in the upper left corner of the screen in lobbies and in games. You can remove that if you want. It only works when D9VK is active.

The game crashes at ~45min in game time

The game crashes at ~45min in game time.

Solution
  • Turn off the minimap and don't use split view.
  • Use Proton 5.xx
  • Use the the Vulkan translation layer (Directx9 to Vulkan) for Proton/Wine or vanilla Wine (see the previous one, Solution 1 and Solution 2).

Desync issues

The desync window appears during gameplay.

Solution
Turn off mods and use appropriate Proton/Wine and vanilla Wine versions. See:

#Install the game, set launch options

Note: Don't forget to create and copy your Steam RUN file again if you change the version of Proton.


Game starts but the screen is black

The game starts, sound ok, but the screen is black.

Solution
Use appropriate Proton/Wine and vanilla Wine versions. See:

#Install the game, set launch options


Reported with using AMD Vega cards and Proton 4.2: https://github.com/ValveSoftware/Proton/issues/688#issuecomment-491610215


Java Downlord's client freezes

The java Downlord's client consumes insane amount of CPU, memory or freezes.

Solution
Try to restrict java to use the software renderer instead of graphics card acceleration.
Add this to the downlords-faf-client.vmoptions file: -Dprism.order=sw