├── README.md └── images ├── V4L2test.png ├── linuxtrackextractor.png ├── linuxtrackfreetracktest.png └── opentrackwine.png /README.md: -------------------------------------------------------------------------------- 1 | # DCS on Linux 2 | 3 | DCS World can run on linux through Wine and Proton, though it does take some 4 | work to get running. The game has two distribution methods: standalone and 5 | Steam. Both have worked successfully, though often one will be broken and the 6 | other work; if one fails, it can be a good idea to try the other. 7 | 8 | The game also has two versions: stable and OpenBeta. OpenBeta is used 9 | by most MP servers, and stable is updated less frequently (the advantage of 10 | stable for us being that we don't have to work around Linux bugs every 2 weeks 11 | when a new OB is released.) 12 | 13 | Thanks to everyone who has helped getting the game running and debugging issues 14 | in the [proton issue 15 | tracker](https://github.com/ValveSoftware/Proton/issues/1722). Unfortunately, 16 | workarounds easily get buried there, so I decided to create this document with 17 | known, up-to-date methods for getting things to work. 18 | 19 | Outside the proton thread, additional credit goes to @akp for the initial revision 20 | of the Opentrack instructions, and @bradley-r for the Linuxtrack, Scratchpad and V4L2 info. 21 | 22 | To chat about DCS World on Linux there is a Matrix chat available: 23 | * https://matrix.to/#/#dcs-on-linux:matrix.org 24 | 25 | ## Contents 26 | 27 | * [Installation](#installation) 28 | * [Lutris](#getting-it-working-through-lutris) 29 | * [Manual](#getting-it-working-manually) 30 | * [Bugs and Fixes](#known-issues-and-fixes) 31 | * [Smoke](#white-smoke-and-some-other-particles-renders-weirdly) 32 | * [F16 RWR](#f16-rwr-shows-a-opaque-square-on-the-rwr-over-the-priority-contact) 33 | * [Server List](#missing-multiplayer-server-list) 34 | * [F10 Crash](#crash-on-f10) 35 | * [Disabled Modules](#module-disabled-by-user) 36 | * [Controls](#control-issues) 37 | * [Additional Software](#other-software) 38 | * [SRS](#srs) 39 | * [Scratchpad](#dcs-scratchpad) 40 | * [Opentrack](#headtracking-via-opentrack) 41 | * [Linuxtrack](#headtracking-via-linuxtrack) 42 | * [V4L2](#a-note-on-headtracking) 43 | 44 | ## Installation 45 | 46 | ### Getting it working through Lutris 47 | 48 | An easy way to get started is to use Lutris. There are [two install scripts 49 | for standalone](https://lutris.net/games/dcs-world/) on Lutris which may just work out of the box. 50 | Much of this guide has been tested to work successfully with the 'Eagle Dynamics version'. 51 | 52 | ### Getting it working manually 53 | 54 | Both versions need some winetricks applied. For standalone, use `winetricks`, 55 | for proton use `protontricks 223750`. 56 | 57 | Start the game once first to create the prefix, then run 58 | ``` 59 | vcrun2019 corefonts xact d3dcompiler_43 60 | ``` 61 | 62 | This should be all it takes to get standalone working. 63 | 64 | #### Fixing Steam version permanent crashing 65 | 66 | If your game crashes in the Steam version, it will permanently fail to start 67 | after that. To fix that: remove `drive_c/windows/system32/lsteamclient.dll` 68 | which was created in the crash, and the game should start back up fine. 69 | 70 | #### Open Beta (updated for 2.5.6.59398) 71 | 72 | For now, this guide assumes you use the standalone version. The steam version 73 | may also work, but I have not tested it in a while. Currently, Wine 6.0 rc1 or 74 | the Lutris version of that release are what work best but other wine versions 75 | may also work. 76 | 77 | First, some variables to avoid repetition: 78 | 79 | - `$USERNAME`: refers to the wine user. On standalone, this is your normal 80 | username and on steam it is `steamuser`. 81 | - `$INSTALL_DIR`: the location in program files where the game is installed. 82 | On standalone: `drive_c/Program Files/Eagle Dynamics/DCS` or `DCS World OpenBeta`. On Steam, it's 83 | `/home/frans/.local/share/Steam/steamapps/common/DCSWorld` 84 | - `$CONFIG_DIR`: the place where user config stuff is stored 85 | `drive_c/users/$USERNAME/Saved Games/DCS`. 86 | - `$LOG`: the game log file `$CONFIG_DIR/Logs/dcs.log`. 87 | 88 | You need 89 | to add a few "dll overrides" for the game to work. As of 2.7.9, both `wbemprox` and `msdmo` need to be overridden. 90 | In lutris, you can do so under "runner options". 91 | 92 | For wine and steam proton, you can do so using the `WINEDLLOVERRIDES` 93 | flag https://wiki.winehq.org/Wine_User's_Guide#WINEDLLOVERRIDES.3DDLL_Overrides 94 | 95 | ``` 96 | WINEDLLOVERRIDES='wbemprox=n;msdmo=n' 97 | ``` 98 | 99 | With that change, you should be able to log in but once the game starts you 100 | will see a black screen. To fix this, create a symlink from 101 | `$INSTALL_DIR/bin/webrtc_plugin.dll` to `$INSTALL_dir/webrtc_plugin.dll`. 102 | 103 | The game should now start. 104 | 105 | You may also see a crash when loading a mission. This might be caused by a 106 | Arial missing font which can not be distributed with Wine. 107 | 108 | ## SteamVR 109 | 110 | The game seems to work fine with steamVR. This is only possible in the steam 111 | version, and seems to currently only work in proton 6.3.8 (possibly in future 112 | proton versions, but not GE or TKG) 113 | 114 | ## Known issues and fixes 115 | 116 | If things go wrong, the primary thing to look for is the game log - 117 | `drive_c/users/$USERNAME/Saved Games/DCS/Logs/dcs.log`. 118 | After crashes, the crash reporter will spam a bit about various DLLs being used 119 | recently, and just before that, the cause of the crash should be visible. 120 | 121 | Sometimes crashes happen before the game gets far enough to create a log file. 122 | Then your best bet is to read the Proton output. In both Lutris and Steam, you can easily get 123 | this by starting them from a terminal. 124 | 125 | If you can't find an issue, or have found a solution for one, please discuss it in 126 | the [proton issue](https://github.com/ValveSoftware/Proton/issues/1722). 127 | 128 | ### White smoke and some other particles renders weirdly 129 | 130 | This is a long standing issue, most likely related to texture loading and tesselation. 131 | Luckily, it is just a visual artefact that can be (largely) ignored. 132 | 133 | ### F16 RWR shows a opaque square on the RWR over the priority contact 134 | 135 | This issue occurs because some textures fail to load for an unknown reason. The 136 | fix is simple: open the file 137 | `${INSTALL_DIR}/Mods/aircraft/F-16C/Cockpit/IndicationResources/RWR/indication_RWR.tga` 138 | with an image editor (GIMP or Krita have been used successfully), then just 139 | re-export the file. The RWR should now render correctly. 140 | 141 | ### Missing multiplayer server list 142 | 143 | For a few 2.5.6 versions, the server browser did not work, and neither did 144 | directly connecting to servers using connect by IP. However, there is a 145 | workaround. 146 | 147 | Edit `$INSTALL_DIR/MissionEditor/modules/mul_password.lua`. Find the function `onChange_btnOk` and add the 148 | line `onlyConnect = true` to the start of the function like so. 149 | 150 | ```lua 151 | function onChange_btnOk() 152 | onlyConnect = true -- This line was added 153 | if onlyConnect == true then 154 | -- ... 155 | end 156 | ``` 157 | 158 | Now you should be able to use the connect by IP button to join servers, but the 159 | server list is still broken. Luckily, a server list is available if you log in 160 | on https://www.digitalcombatsimulator.com/, and from there you can get the IP 161 | of servers. 162 | 163 | ### Crash on F10 164 | 165 | For many DCS versions and/or Wine versions, if you press F10 (the default 166 | binding to bring up the map) the game will crash ("permanently" on steam, see 167 | fixing steam permanent crashing (above) for a fix). Luckily, the problem is with the 168 | F10 key itself, not the map, so rebind it to something else you see fit. The 169 | same applies for the communication menu. 170 | 171 | ### Module disabled by user 172 | 173 | You probably won't run into this, but if you do, there is a fix. 174 | 175 | One of your modules is missing, it is not shown in the list at the bottom of 176 | the main menu, and you can't use it. On standalone, check if it is enabled in 177 | the module manager. On steam however, things are a bit more tricky. If you 178 | copied your configs between standalone and steam, module manager disabled mods 179 | will be disabled in steam too. This information is stored in 180 | `$CONFIG_DIR/enabled.lua` or something similar. Remove it to fix the issues. 181 | 182 | ### Control issues 183 | 184 | Due to the various differences between distributions, issues with (HOTAS) controls can be hard to nail down, 185 | especially when Wine is involved - adding another layer of potentional problems. Users experiencing issues with 186 | controllers are advised to read through [the information here](https://github.com/bradley-r/Linux-Controller-Fixes/). 187 | 188 | ## Other software 189 | 190 | While not included in DCS, here are some resources for getting external 191 | software often used with the game. 192 | 193 | ### SRS 194 | 195 | [SRS](http://dcssimpleradio.com/) is used by a lot of multiplayer servers. It 196 | too works with some tweaks. 197 | 198 | Install the game plugin by following the instructions in the SRS readme. 199 | 200 | *Note* As of SRS 19.0.1, this method no longer works. As a replacement, I have 201 | a custom SRS client that *kind of* works here: https://gitlab.com/TheZoq2/srsrs. 202 | 203 | It's easiest to run SRS in its own prefix. Create one, and then run `winetricks 204 | dotnet452 win10` in that prefix. Now you can start `SR-ClientRadio.exe` from 205 | the downloaded files. 206 | 207 | Credit: https://github.com/ciribob/DCS-SimpleRadioStandalone/issues/409. 208 | 209 | ### DCS Scratchpad 210 | 211 | For those who want to make use of the excellent [DCS-Scratchpad utility](https://github.com/rkusa/dcs-scratchpad), 212 | [follow the installation instructions](https://github.com/rkusa/dcs-scratchpad) as normal. 213 | The scratchpad should appear in game, but when typing with it's '*window*' focused, nothing will appear. 214 | This is a font issue - by default, DCS-Scratchpad uses `CONSOLA.TTF`, a font not installed with Wine. 215 | Either install it with Winetricks, or edit line 172 in `Scripts/Scratchpad/ScratchpadWindow.dlg` to 216 | an installed font of your choosing, such as `CALIBRI.TTF`. Text should now appear in the scratchpad window. 217 | 218 | ### Headtracking via Opentrack 219 | 220 | **Users of custom/Lutris/non-system Wine versions, take note: 221 | Due to [issues with libwine](https://github.com/opentrack/opentrack/issues/1236), Opentrack does not support prefixes using versions of Wine 222 | different to that of the system (and thus the one Opentrack recognises), making usage of 223 | custom/performance-enhanced Wine versions impossible alongside it. Either run DCS with your 224 | system Wine, or try Linuxtrack instead. Proton is unaffected.** 225 | 226 | [Opentrack](https://github.com/opentrack/opentrack) can emulate a gamepad which is read and can be mapped to the 227 | corresponding controls in the game. This should work out of the box, simply 228 | select `lubudev joystick receiver` as the output in opentrack. 229 | 230 | Opentrack can work out of the box with `libevdev joystick output`, however this requires you to bind headtracking 231 | for every aircraft (and doesn't play well with Il-2 BoX or Falcon BMS.) 232 | 233 | A better option, then, is to enable Wine (Freetrack and NPclient) output instead of joystick axis output. This allows 234 | the use of headtracking across all aircraft (DCS interprets the input as an actual headtracker rather than joystick), and 235 | should play well with other titles such as IL-2 BoX and Falcon BMS. 236 | 237 | If you are building Opentrack from the [AUR](https://aur.archlinux.org/packages/opentrack/), you can modify the PKGBUILD. 238 | Replace line 34: `-DSDK_WINE_PREFIX=/ \` with `-DSDK_WINE=ON/ \`. *This package now seems to include Wine output by default.* 239 | 240 | Otherwise, you can clone the source code and follow [these 241 | instructions](https://github.com/opentrack/opentrack/wiki/Building-on-Linux). 242 | **After you cd into the directory, run `ccmake .`, press c to configure, turn 243 | ON SDK_WINE, c to configure and g to generate.** 244 | 245 | DCS still requires `HeadTracker.dll` in the `bin` directory for opentrack to 246 | function. Download Eagle Dynamics API interface DLL (64-bit) from 247 | http://facetracknoir.sourceforge.net/information_links/download.htm. 248 | 249 | You must open opentrack and start tracking before you launch DCS. Be sure to 250 | point the output to the correct wine/proton prefix. In addition, you'll need to 251 | launch DCS with WINEESYNC=1 or WINEFSYNC=1 if you enable those in the wine 252 | output settings. 253 | 254 | ![Opentrack Wine Implementation](images/opentrackwine.png) 255 | 256 | Context: https://github.com/ValveSoftware/Proton/issues/1722#issuecomment-749061952 257 | 258 | ### Headtracking via Linuxtrack 259 | 260 | In the case the Opentrack fails to work (as outlined above, it cannot support custom Wine versions 261 | such as those offered by Lutris) or you wish to try an alternative, [Linuxtrack](https://github.com/uglyDwarf/linuxtrack/) 262 | offers similar functionality. 263 | 264 | Begin by installing the [universal Linux package](https://github.com/uglyDwarf/linuxtrack/wiki/universal-Linuxtrack-package). 265 | Once complete, run `ltr-gui` and under the 'Misc' tab, select (re)install TrackIR firmware.) Linuxtrack 266 | will attempt to complete this task for you, but, at time of writing, the TrackIR download links have changed, so 267 | you may need to do this manually. Download the latest TrackIR firmware, install it to your default (or 268 | temporary) prefix, then select 'Extract from unpacked'. 269 | 270 | ![Linuxtrack Firmware Extractor](images/linuxtrackextractor.png) 271 | 272 | Navigate to the prefix you used, and select the TrackIR 5 folder under `/drive_c/Program Files (x86)/NaturalPoint/`. 273 | Once done, you will be prompted to install the Wine-side components; select the prefix DCS is installed under 274 | (only standalone has been tested.) `ltr-gui` can now be closed, and provided Linuxtrack is running 275 | (and has been configured), use the `FreeTrackTester.exe` present in the second prefix `/drive_c/Program Files 276 | (x86)/Linuxtrack/`. You should see the values changing, and thus controlling the view in-game. 277 | 278 | ![Linuxtrack/Freetrack Test Dialogue](images/linuxtrackfreetracktest.png) 279 | 280 | Note that `HeadTracker.dll` need not be present as Linuxtrack replicates TrackIR directly (in the case of DCS, at least.) 281 | 282 | ### A note on headtracking 283 | 284 | This only applies if an IR-modified camera is used as input to your headtracking program of choice, but can be very useful if 285 | so. Video4Linux(2) "*is a collection of device drivers and an API for supporting realtime video capture on Linux systems*" 286 | and thus is the utility used by Opentrack and Linuxtrack to address IR cameras - often the venerable PS3Eye. V4L2 handles the 287 | configuration of attached cameras, and so is the utility to use to change any settings. 288 | 289 | ![QV4L2 Test Dialogue](images/V4L2test.png) 290 | 291 | For IR-modded cameras, the settings of most significance are gain, auto-exposure and (automatic) white balance. The PS3Eye, 292 | not having any physical controls aside from an FOV setting, can be configured using the V4L2 test utility ([`v4l-utils`](https://pkgs.org/download/v4l-utils)), 293 | however changes made here do not persist across reboots. Opentrack seems to have this 294 | utility built-in, but for Linuxtrack users or those needing to change camera settings system-wide, there is a solution: 295 | 296 | * Ensure `v4l-utils` is installed. 297 | * Video4Linux, providing core functionality for attached video devices, is available on all mainline distributions. 298 | * Find `v4l-utils` for your distribution [here](https://pkgs.org/download/v4l-utils). 299 | * Open the V4L2 test utility, and select the correct camera if there are multiple connected. 300 | * Run `qv4l2` at the command line to launch the utility. 301 | * If multiple cameras are connected, look in `/dev/` for `videoX` devices. 302 | * Configure the settings to a suitable point. Of interest here are any automatic features that may interfere with tracking. 303 | * Settings for an IR-modded PS3Eye are included below. 304 | * As a general rule, automatic gain, white balance and (possibly) exposure should be disabled. 305 | * Once done, return to a command line and execute `v4l2-ctl --all`. This lists all the configurable values of the camera. 306 | * Framerate and pixel/capture format will be listed, but these cannot be changed via this method for the PS3Eye. 307 | * Using this information, make a `.sh` file with a relevant name (such as `IRcamfix.sh`) with contents in the format: 308 | > #!/bin/bash 309 | > --set-ctrl=brightness=0 \ 310 | > --set-ctrl=contrast=32 \ 311 | > --set-ctrl=saturation=0 \ 312 | > --set-ctrl=gain_automatic=0 \ 313 | > --set-ctrl=gain=0 \ 314 | > --set-ctrl=power_line_frequency=0 \ 315 | > --set-ctrl=sharpness=0 \ 316 | > --set-ctrl=white_balance_automatic=0 317 | * This accomplishes the same thing as changing these values through the GUI but allows it to be done automatically. 318 | * These settings have been found to work well with a PS3Eye camera, but may need adjusting depending on use conditions. 319 | * Save this file, mark it as executable and add it to an autorun utility such as Plasma's autostart or Lutris' pre-launch script. 320 | * This will apply these changes when the start condition is triggered by their respective programs. 321 | 322 | With this done, the camera will have these changes applied automatically, allowing immediate use of headtracking without the need to preemptively tinker with a GUI before every flight. 323 | -------------------------------------------------------------------------------- /images/V4L2test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheZoq2/dcs_on_linux/8abb782a0928140e0cda36256d1c2311d167ef30/images/V4L2test.png -------------------------------------------------------------------------------- /images/linuxtrackextractor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheZoq2/dcs_on_linux/8abb782a0928140e0cda36256d1c2311d167ef30/images/linuxtrackextractor.png -------------------------------------------------------------------------------- /images/linuxtrackfreetracktest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheZoq2/dcs_on_linux/8abb782a0928140e0cda36256d1c2311d167ef30/images/linuxtrackfreetracktest.png -------------------------------------------------------------------------------- /images/opentrackwine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheZoq2/dcs_on_linux/8abb782a0928140e0cda36256d1c2311d167ef30/images/opentrackwine.png --------------------------------------------------------------------------------