Difference between revisions of "DCS on linux"

From DCS World Wiki - Hoggitworld.com
Line 25: Line 25:
 
2. Install the game via steam, now that this has become possible.
 
2. Install the game via steam, now that this has become possible.
  
Optionally you might need to do one or both of these steps, but there is a very tiny proportion of people whom have reported not to need all of this:
+
3. If you get an error with compiling the shaders during startup, you'll need to install the proper d3d compiler into the Proton prefix for the game. (applies for 99% of users) The version required changes from time to time. At the time of writing, the version to use is "d3dcompiler_47".  You can use following protontricks command to fix the compiler problem: <pre style="color: red">protontricks 223750 d3dcompiler_47</pre>
  
3. If you get an error with compiling the shaders during startup, you'll need to install the proper d3d compiler into the Proton prefix for the game. The version required changes from time to time. At the time of writing, the version to use is "d3dcompiler_47".  You can use following protontricks command to fix the compiler problem: <pre style="color: red">protontricks 223750 d3dcompiler_47</pre>
+
4. Sometimes proton doesn't load properly or seems to hang during loading, resulting in a borked startup. You can try to set up the following launch options in the "General" of the properties in steam: <pre style="color: red">WINEDLLOVERRIDES='wbemprox=n' %command%</pre>. Note: this step doesn't seem to be necessary any longer for many, but some still need to have it in their launch options.
 
 
4. Sometimes proton doesn't load properly or seems to hang during loading, resulting in a borked startup. You can try to set up the following launch options in the "General" of the properties in steam: <pre style="color: red">WINEDLLOVERRIDES='wbemprox=n' %command%</pre>
 
  
 
DCS should now start up normally.
 
DCS should now start up normally.

Revision as of 18:58, 17 February 2024

DCS can be made to run on linux. You will need to use either wine or proton to make it work, as there is no native client. Overall it does work reasonably well. Compared to running DCS on Windows, the performance is slightly reduced, but decent. It doesn't matter if you use Gnome or KDE, but please be aware that there are many hotkeys in Gnome which use modifiers that collide with DCS default key assignments. DCS is known to run well on Ubuntu, OpenSUSE and Fedora and is likely to run well on many other distributions also. See the FAQ and external references for more info on known problems and how to fix them.


Setting Up DCS

Using Wine

You can check out https://github.com/TheZoq2/dcs_on_linux for tips and tricks for running DCS Standalone on linux.

You can also try to use Lutris to make installation easier. See: https://lutris.net/games/dcs-world/ Please note that scripts tend to get out of date over time.

Using Proton

This requires that you have your games on Steam.

At the time of writing the following steps are confirmed to be working on OpenSUSE Tumbleweed / KDE and Kubuntu 22.04. You might notice here that the description is basically about linux with KDE. The reason is that this is what you'll want to use anyway, as there are a lot of keystrokes in DCS which interfere with Gnome's hotkeys.

Prerequisites:

You need to install Protontricks so you can install extra libraries into the Proton prefix for DCS. This is available for most linux distributions, but is not always part of the distribution's own packages. It's best to first check the package manager to see if it is available. If it is not, then look for alternative ways to install it for your specific distribution by using your favourite search engine.

Install steps:

1. Enable compatibility mode for DCS: Go to your library, right click on DCS and select the properties menu item from the context menu. Then open the compatibility tab and enable the tick-box for enabling the compatibility mode in the settings. Setting the proton version to "Proton Experimental" as the version usually works best.

2. Install the game via steam, now that this has become possible.

3. If you get an error with compiling the shaders during startup, you'll need to install the proper d3d compiler into the Proton prefix for the game. (applies for 99% of users) The version required changes from time to time. At the time of writing, the version to use is "d3dcompiler_47". You can use following protontricks command to fix the compiler problem:
protontricks 223750 d3dcompiler_47
4. Sometimes proton doesn't load properly or seems to hang during loading, resulting in a borked startup. You can try to set up the following launch options in the "General" of the properties in steam:
WINEDLLOVERRIDES='wbemprox=n' %command%
. Note: this step doesn't seem to be necessary any longer for many, but some still need to have it in their launch options.

DCS should now start up normally.

FAQ / troubleshooting

Q: I have my Proton version set to 'Experimental', as was recommended. Now my DCS install refuses to work after installing a Proton update. What should I do?

A: Sometimes a newer version of Proton, which gets installed automatically if you have the version selection set to experimental, causes things to break. If you find all of a sudden that you can't get DCS running, and you have recently installed an update for Proton while having Experimental selected as the version to use, then consider running one of the fixed versions of Proton available in the drop-down list under the compatibility options.

Q: I get the error "Authorization error. Error code is: 500" while starting up DCS and I don´t have access to my modules now?

A: This is a general issue with DCS, but it is more prevalent on linux. DCS checks if your clock matches the reported time zone for your IP address. On linux the clock might be skewed because it handles time settings a little differently than windows does. Make sure you have your clock set up correctly before starting DCS. [1] If you dual boot, then make sure that your bios uses UTC and that windows is set up to use an offset to UTC instead of setting the time in the bios clock. (search for "How to Fix Windows and Linux Showing Different Times" if you don't know how to)

Q: There are textures which are not shown properly while in the game.

A: Yes, this happens with certain modules. For instance, in the Ka-50 III the Skval is not usable because of this problem. The RWR in the F-16C is also affected. A re-export of the image file with an image editor in the same file format might fix this. [2] Unfortunately this fix breaks the integrity check for multiplayer.

Q: The contrails are puffy?

A: This is a known and persistent problem. Unfortunately there is no fix available. Hopefully this will be fixed with the introduction of Vulkan to DCS.

Q: One of my input devices is not showing up in DCS, even though I can see it in the game controller application in KDE?

A: This is a problem with how the udev subsystem in linux scans for usb devices and categorises them in "/dev/input/by-id/" and then in turn how wine/proton scans for devices based on their names in that same directory. You will need to add a rule which tells udev to categorise the device properly, so that wine/proton knows it is a joystick device and which properties it has. This is done by adding a file to "/etc/udev/rules.d/". The file needs to have a name starting with a number, and this number actually means something, as it denotes the priority of the file in the udev loading sequence. This can be different from system to system, but somewhere in the 30 to 50 range seems to work well. The contents of the file describe can be used to modify the attributes of the devices by adding rules for them.

As an example for the Saitek Pro Flight Rudder Pedals, you can use the following: Create a file called "51-rudder-pedals.rules", and inside the file, use the following contents:

SUBSYSTEMS=="input", ATTRS{name}=="Saitek Saitek Pro Flight Rudder Pedals", ENV{ID_INPUT_JOYSTICK}="1"

Of course the "name" attribute will be different for each device. You'll have to add a new line for every device you want to rename. Don't forget to reload udev rules after creating this one. If you don't know how to, you can also restart the computer to get it to work. For a more elaborate explanations or help, try searching the web or ask around.

Q: Where can I get help with installing DCS on linux?

A: You can get help/support for running DCS on linux on https://old.reddit.com/r/hoggit and on the matrix channel linked below. Please note that this is on a best effort basis. In the end you still have to fix it yourself, but others might come up with suggestions you had not thought of.(..yet)

VR

This can be made to work, but it depends on the HMD support for linux. The requirement is that your HMD can run with OpenXR. The Valve Index and some standalone HMDs with linux support are your best bet. Certain WMR HMDs can be made to run trough Monado[3], but often support for controllers is lacking. Ask around if you need help.

OpenTrack

Getting opentrack to run is a bit tricky. The best way to get it working is to use a double installation. One inside the wine or proton prefix, and one outside the prefix. You then use the local loop network connection for data transfer. At present the option to use opentrack with the steam prefix directly seems to be broken.

Apparently, opentrack can de made to run under Proton using a tool called SteamTinkerLink to run multiple programs inside the same prefix.

SRS

Some have reported that SRS can work if installed via wine or proton, but there are no good guides on this which are current. Ask around to find out more.

Useful resources:

https://github.com/TheZoq2/dcs_on_linux : Git documentation for running DCS using Wine.

https://www.protondb.com/app/223750 : ProtonDB page for DCS.

https://matrix.to/#/#dcs-on-linux:matrix.org : A matrix space to discuss running DCS on linux. Matrix is kind of a counterpart to Discord that does respect your privacy.




Final remarks:

1. This article is updated from time to time, but not very frequently. See discussion page or contact authors via their contact pages for feedback.

2. This article describes steps to install DCS on linux mainly for Proton/steam users and refers to external sources for installation via a Wine prefix. Please consider adding to this article if you have experience installing DCS standalone with Wine.