✈ Linux Air Combat · WSL2
On this page
  1. Before you start
    1. What you'll end up with
    2. How it fits together
    3. Linux for Windows users
    4. Personalize this guide
  2. 1 · Check Windows and WSL
  3. 2 · Share the joystick (Windows)
  4. 3 · Get the LAC source
  5. 4 · Apply the fixes
  6. 5 · Run the Linux setup script
  7. 6 · Install the launcher
  8. 7 · Restart WSL
  9. 8 · Check GPU, joystick, sound
  10. 9 · First flight and display
  11. 10 · Play online
  12. 11 · Voice chat (Mumble)
  13. 12 · Debug build
  14. 13 · Rebuilding after changes
  15. Troubleshooting
  16. Reference

Linux Air Combat on Windows 11 with WSL2

A step-by-step guide to building and flying the open-source Linux Air Combat flight simulator inside WSL2 on Windows 11, with your GPU, a USB joystick, sound and online multiplayer. It's written for people who know Windows well and are new to Linux; every Linux command is explained.

Windows 11 · WSL2 · Ubuntu 22.04LAC Lac09p94eAbout 45 minutes Companion: Improvements · Bug fixes
0 of 13 steps done

0Before you start

What you'll end up with

  • Linux Air Combat (LAC) built from source and installed in Ubuntu running under WSL2.
  • Hardware-accelerated graphics on your Windows GPU. No Linux graphics driver is installed; WSL passes OpenGL through to DirectX 12.
  • Your USB joystick handed to Linux automatically when LAC starts, and back to Windows when it closes.
  • Sound through your normal Windows speakers or headset.
  • Online multiplayer through the LAC server, plus optional Mumble voice chat.
  • A Start-menu entry (Linux Air Combat), and a lac-play command for the terminal.
  • A patched LAC that fixes several crashes and supports high-resolution and ultrawide monitors (see the bug fixes and improvements pages).

You'll need: Windows 11 with administrator rights; a DirectX 12 GPU with a current Windows driver (this guide was written on an NVIDIA RTX 3060); a USB joystick (written with a Logitech Extreme 3D Pro, but any USB game controller works); and an internet connection.

How it fits together

WSL2 runs a real Linux system in a lightweight virtual machine. LAC is an ordinary Linux program, and each of its needs is met by a Windows component:

Inside WSL2 (Ubuntu)Windows 11GraphicsLAC → OpenGL → Mesa d3d12GraphicsDirectX 12 → GPU driverGPU-accelerated 3DDisplaySDL window (X11/XWayland)DisplayWSLg: a normal windowShows like any appSoundSDL audio → PulseAudioSoundWSLg → speakers / micWorks automaticallyJoystick/dev/input/js0 (USB/IP)Joystickusbipd-win shares USBLent while you flyNetworkUDP sockets, port 51100NetworkWindows network (NAT)Via the LAC server

The only part that doesn't work automatically is the joystick. Windows owns USB devices, so a small free tool (usbipd-win) lends the joystick to Linux over a virtual USB cable while you fly.

Linux for Windows users: the 2-minute version

On Windows you'd…In Ubuntu (WSL) you…
Open PowerShell or Command PromptOpen Ubuntu from the Start menu (or a Ubuntu tab in Windows Terminal). This runs the bash shell.
“Run as administrator” / UAC promptPut sudo in front of a command. It asks for your Linux password. Nothing appears while you type it; that's normal.
Install software with an installer or wingetsudo apt install package. The setup script does this for you.
C:\Users\you (%USERPROFILE%)/home/you, written ~ for short.
Hidden AppData foldersFolders starting with a dot, like ~/.LAC. ls -a shows them.
C:\Program Files/usr/bin (programs) and /usr/share (their data).
Your C: driveIs visible from Linux at /mnt/c. Your Downloads folder is /mnt/c/Users/YourWindowsName/Downloads.
Browse Linux files in ExplorerType \\wsl.localhost\Ubuntu\home into Explorer's address bar, or run explorer.exe . in Ubuntu.
Backslashes, case-insensitive namesForward slashes, and names are case-sensitive: LAC and lac are different.
Ctrl+C / Ctrl+VIn Windows Terminal, Ctrl+C copies when text is selected and Ctrl+V pastes. With nothing selected, Ctrl+C stops the running command.
How to use the commands in this guide

Each grey box has a Copy button. Paste into the Ubuntu window (or PowerShell, where the box says so) and press Enter. Lines starting with # are comments and do nothing. Tick Done on each step to track your progress; it is saved in this browser.

Personalize this guide

Fill these in and every command on this page updates to match your PC. The scripts you download pick them up too.

1Check Windows and WSL

Confirm the foundations: a current GPU driver, WSL2 with Ubuntu, and systemd.

Everything in this step happens in PowerShell (Start → type PowerShell).

a. Update your GPU driver in Windows

Install the current driver from NVIDIA, AMD or Intel in Windows, as you normally would. WSL uses the Windows driver.

Never install a Linux GPU driver inside WSL

Guides for ordinary Linux PCs say to install NVIDIA's Linux driver. Under WSL that breaks GPU acceleration. Skip it.

b. Make sure WSL2 and Ubuntu are installed

PowerShell
wsl -l -v

You want a line like Ubuntu Running 2; the 2 means WSL2. If Ubuntu isn't listed, install it, then restart if asked and create a Linux user name and password when Ubuntu first opens:

PowerShell
wsl --install -d Ubuntu-22.04

If an existing distribution shows VERSION 1, convert it with wsl --set-version Ubuntu 2.

c. Update WSL

PowerShell
wsl --update

This brings in the latest WSLg, the part that shows Linux windows and plays Linux sound on Windows.

d. Check that systemd is on

Ubuntu needs its service manager (systemd) running so the joystick permission rule from step 5 applies. In the Ubuntu window:

Ubuntu terminal (bash)
cat /etc/wsl.conf

If you don't see systemd=true under [boot], add it, then restart WSL (step 7 explains how):

Ubuntu terminal (bash)
printf '[boot]\nsystemd=true\n' | sudo tee -a /etc/wsl.conf

2Share the joystick with WSL (Windows side)

A one-time, administrator-only step in Windows.

usbipd-win lends USB devices from Windows to WSL. Sharing a device is a one-time administrator step; after that the LAC launcher connects and disconnects the joystick by itself.

a. Plug in the joystick and find its hardware ID

Open PowerShell as Administrator (right-click Start → Terminal (Admin)). If usbipd isn't installed yet, install it first:

PowerShell (Administrator)
winget install --exact --id dorssel.usbipd-win

Close and reopen the admin PowerShell, then list the USB devices:

PowerShell (Administrator)
usbipd list

Find your joystick in the list. The VID:PID column (for example 046d:c215 for the Logitech Extreme 3D Pro) is its hardware ID. Enter it under Personalize if yours is different.

b. Run the Windows setup script

setup-lac-windows.ps1

Updates WSL, installs usbipd-win if needed, and binds (shares) the joystick. Save it to your Downloads folder.

Show the script (65 lines)
setup-lac-windows.ps1
# Linux Air Combat on WSL2 - Windows-side setup.
# Run in an *Administrator* PowerShell:
#   powershell -ExecutionPolicy Bypass -File $env:USERPROFILE\Downloads\setup-lac-windows.ps1
# Optional: add  -MirroredNetworking  to also allow inbound UDP 51100 (only needed for
# LAC's Peer-to-Peer mode; normal client/server online play works without it).
#   Another controller:  add  -JoystickHwId VVVV:PPPP  (from 'usbipd list')
param([switch]$MirroredNetworking, [string]$JoystickHwId = '046d:c215')

$ErrorActionPreference = 'Stop'
Start-Transcript -Path "$PSScriptRoot\setup-lac-windows.log" -Force | Out-Null

$principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
    Write-Error "Please run this from an Administrator PowerShell."; exit 1
}

# $JoystickHwId defaults to the Logitech Extreme 3D Pro (VID_046D & PID_C215)

Write-Host "== 1/4 Updating WSL ==" -ForegroundColor Cyan
wsl.exe --update

Write-Host "== 2/4 Installing usbipd-win (USB passthrough to WSL) ==" -ForegroundColor Cyan
$usbipd = "$env:ProgramFiles\usbipd-win\usbipd.exe"
if (-not (Test-Path $usbipd)) {
    winget install --exact --id dorssel.usbipd-win --accept-source-agreements --accept-package-agreements --silent
}
if (-not (Test-Path $usbipd)) { Write-Error "usbipd-win did not install; see log."; exit 1 }

Write-Host "== 3/4 Sharing the joystick with WSL (usbipd bind) ==" -ForegroundColor Cyan
& $usbipd list
& $usbipd bind --hardware-id $JoystickHwId --force
& $usbipd list

Write-Host "== 4/4 Networking ==" -ForegroundColor Cyan
if ($MirroredNetworking) {
    $cfg = "$env:USERPROFILE\.wslconfig"
    if (Test-Path $cfg) { Copy-Item $cfg "$cfg.bak-lac" -Force }
    $content = if (Test-Path $cfg) { Get-Content $cfg -Raw } else { "" }
    if ($content -notmatch '(?im)^\s*networkingMode') {
        if ($content -match '(?i)\[wsl2\]') {
            $content = $content -replace '(?i)\[wsl2\]', "[wsl2]`r`nnetworkingMode=mirrored"
        } else {
            $content = $content.TrimEnd() + "`r`n[wsl2]`r`nnetworkingMode=mirrored`r`n"
        }
        Set-Content -Path $cfg -Value $content.Trim() -Encoding ascii
    } else {
        Write-Host "  .wslconfig already sets networkingMode; leaving it alone."
    }
    Write-Host "  .wslconfig now:"; Get-Content $cfg
    # Allow LAC's UDP port through both the WSL (Hyper-V) firewall and Windows Defender Firewall
    $wslVmId = '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}'
    Remove-NetFirewallHyperVRule -Name 'LAC-UDP-51100' -ErrorAction SilentlyContinue
    New-NetFirewallHyperVRule -Name 'LAC-UDP-51100' -DisplayName 'Linux Air Combat UDP 51100' `
        -Direction Inbound -VMCreatorId $wslVmId -Protocol UDP -LocalPorts 51100 | Out-Null
    Remove-NetFirewallRule -Name 'LAC-UDP-51100' -ErrorAction SilentlyContinue
    New-NetFirewallRule -Name 'LAC-UDP-51100' -DisplayName 'Linux Air Combat UDP 51100' `
        -Direction Inbound -Protocol UDP -LocalPort 51100 -Action Allow | Out-Null
    Write-Host "  Mirrored networking + UDP 51100 firewall rules configured."
} else {
    Write-Host "  Skipped (default NAT networking is fine for client/server online play)."
}

Write-Host ""
Write-Host "DONE. Now run:  wsl --shutdown   then reopen your WSL terminal." -ForegroundColor Green
Stop-Transcript | Out-Null
PowerShell (Administrator)
cd $env:USERPROFILE\Downloads
powershell -ExecutionPolicy Bypass -File .\setup-lac-windows.ps1 -JoystickHwId 046d:c215

Afterwards usbipd list shows the joystick as Shared. A log is saved next to the script as setup-lac-windows.log.

What -MirroredNetworking does (you probably don't need it)

Normal online play connects out to the LAC server and works through WSL's default network setup. LAC's optional peer-to-peer mode needs other players to reach you on UDP port 51100. Adding -MirroredNetworking switches WSL to mirrored networking (it edits %USERPROFILE%\.wslconfig, keeping a backup) and opens UDP 51100 in both the WSL (Hyper-V) firewall and Windows Defender Firewall. Only use it if you need peer-to-peer; see step 10.

3Get the Linux Air Combat source code

Download the official release and unpack it into your Linux home folder.

Download Lac09p94e.tar.gz (about 54 MB) from LAC's SourceForge page in your Windows browser. It lands in your Downloads folder. (LAC's own instructions are on its home page.) Then, in Ubuntu:

Ubuntu terminal (bash)
mkdir -p ~/LAC/src
cp /mnt/c/Users/YourWindowsName/Downloads/Lac09p94e.tar.gz ~/LAC/
tar xzf ~/LAC/Lac09p94e.tar.gz -C ~/LAC/src
ls ~/LAC/src/Lac09p94e | head
mkdir -p
Make a folder (and any parents) if it doesn't exist.
cp
Copy. Here, from your Windows Downloads folder into Linux.
tar xzf … -C …
Unpack a .tar.gz archive (like a .zip) into a folder.
ls
List files, like dir. You should see main.cpp, Makefile, install.sh and more.
Keep files inside Linux

Build in ~/LAC, not under /mnt/c. Linux tools are much faster on the Linux file system, and file permissions behave correctly there.

4Apply the fixes

Recommended: apply the fixes before building.

This patch fixes the bugs and adds the display improvements described on the companion pages: crash fixes, model textures, high resolutions, a resizable window, undistorted menus, and a clean exit on WSL. It changes 17 files and nothing else. Apply it before building.

Ubuntu terminal (bash)
cp /mnt/c/Users/YourWindowsName/Downloads/lac-09p94e-local-fixes.patch ~/LAC/
cd ~/LAC/src/Lac09p94e
patch -p1 --dry-run < ~/LAC/lac-09p94e-local-fixes.patch
patch -p1 < ~/LAC/lac-09p94e-local-fixes.patch

The --dry-run line only checks. If it prints patching file … for every file with no FAILED or Hunk warnings, the second line applies it for real. cd changes folder, as on Windows; patch may need installing first with sudo apt install patch (it is usually present).

What's in the patch?

Every change is shown line by line, with links to the original source, in Bug fixes (7 fixes: crashes, memory errors, exit hang) and Improvements (resolutions, fullscreen, window resizing, menus, crash reporter).

5Run the Linux setup script

One command installs prerequisites, builds and installs LAC.

setup-lac-linux.sh

Installs the build tools and libraries, sets up joystick access, builds LAC, installs it, and adds a Start-menu launcher. A log is written to ~/LAC/setup-lac-linux.log.

Show the script (66 lines)
setup-lac-linux.sh
#!/bin/bash
# Linux Air Combat: WSL2 (Ubuntu 22.04) prerequisites, build, and install.
# Run with:  sudo bash ~/LAC/setup-lac-linux.sh
set -euo pipefail

if [ "$(id -u)" -ne 0 ]; then
    echo "Please run with sudo:  sudo bash $0"; exit 1
fi
REAL_USER="${SUDO_USER:?Run this with sudo from your normal (non-root) account}"
SRC_DIR="$(dirname "$(readlink -f "$0")")/src/Lac09p94e"
LOG="$(dirname "$(readlink -f "$0")")/setup-lac-linux.log"
exec > >(tee "$LOG") 2>&1

echo "== 1/5 Installing build tools and libraries =="
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
    build-essential pkg-config \
    freeglut3-dev libglu1-mesa-dev libgl-dev \
    libsdl1.2-dev libsdl-mixer1.2-dev \
    mesa-utils \
    joystick jstest-gtk evtest usbutils hwdata

echo "== 2/5 Joystick access: kernel modules + input group =="
cat > /etc/modules-load.d/lac-joystick.conf <<'EOF'
# Loaded at boot so a USB joystick attached via usbipd-win is usable immediately
vhci-hcd
usbhid
hid-generic
joydev
evdev
EOF
for m in vhci-hcd usbhid hid-generic joydev evdev; do modprobe "$m" || echo "warn: could not load $m"; done
usermod -aG input "$REAL_USER"
# Make joystick device nodes readable by the input group (and the logged-in user)
cat > /etc/udev/rules.d/71-lac-joystick.rules <<'EOF'
KERNEL=="js[0-9]*", SUBSYSTEM=="input", MODE="0664", GROUP="input"
KERNEL=="event[0-9]*", SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="1", MODE="0664", GROUP="input"
EOF
udevadm control --reload-rules || true

echo "== 3/5 Building Linux Air Combat as $REAL_USER =="
cd "$SRC_DIR"
sudo -u "$REAL_USER" make clean
sudo -u "$REAL_USER" make -j"$(nproc)"

echo "== 4/5 Installing to /usr/bin/lac and /usr/share/lac =="
bash ./install.sh

echo "== 5/5 Start-menu launcher (WSLg adds it to the Windows Start menu) =="
APPDIR="/home/$REAL_USER/.local/share/applications"
sudo -u "$REAL_USER" mkdir -p "$APPDIR"
cat > "$APPDIR/linux-air-combat.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=Linux Air Combat
Comment=Open-source combat flight simulator
Exec=/home/$REAL_USER/.local/bin/lac-play
Icon=/usr/share/lac/lac.png
Terminal=false
Categories=Game;Simulation;
EOF
chown "$REAL_USER:$REAL_USER" "$APPDIR/linux-air-combat.desktop"

echo
echo "DONE. Log saved to $LOG"
echo "Next: run the Windows script (setup-lac-windows.ps1) as Administrator, then 'wsl --shutdown'."

The script must sit in ~/LAC, next to the src folder:

Ubuntu terminal (bash)
cp /mnt/c/Users/YourWindowsName/Downloads/setup-lac-linux.sh ~/LAC/
sudo bash ~/LAC/setup-lac-linux.sh

Enter your Linux password when asked. The run takes a few minutes and ends with DONE. Here is what each stage does:

StageWhat happensWhy
1 · Packagesapt-get install of the compiler (build-essential), SDL 1.2 + SDL_mixer, freeglut, GLU/GL headers, mesa-utils, and joystick tools (joystick, jstest-gtk, evtest, usbutils).LAC is written in C++ on SDL 1.2 and OpenGL. The tools let you test the joystick.
2 · Joystick accessLoads the USB/IP and joystick kernel modules now and at every boot (/etc/modules-load.d/lac-joystick.conf), adds you to the input group, and adds a udev rule (/etc/udev/rules.d/71-lac-joystick.rules).So the borrowed joystick appears as /dev/input/js0 and your account may read it.
3 · Buildmake clean then make -j in ~/LAC/src/Lac09p94e, as you, not as root.Compiles LAC (with the patch from step 4).
4 · InstallRuns LAC's own install.sh: the program to /usr/bin/lac, sounds, music, models and textures to /usr/share/lac.The standard place for programs shared by all users.
5 · LauncherWrites ~/.local/share/applications/linux-air-combat.desktop, which runs lac-play (step 6).WSLg adds Linux apps with a .desktop file to the Windows Start menu.

6Install the LAC launcher

A small wrapper that makes LAC use your GPU, sound and joystick.

lac-play

Starts LAC with the right settings for WSL. It routes OpenGL to your GPU, sends sound through WSLg, attaches the joystick if needed (and returns it to Windows afterwards), and starts LAC the way it expects.

Show the script (46 lines)
lac-play
#!/bin/bash
# Launch Linux Air Combat on WSL2 with the NVIDIA GPU and the USB joystick.
# Usage: lac-play [extra lac arguments]
#   LAC_KEEP_JOYSTICK=1 lac-play   -> don't hand the joystick back to Windows on exit

JOY_HWID="${LAC_JOY_HWID:-046d:c215}"   # Logitech Extreme 3D Pro
USBIPD="/mnt/c/Program Files/usbipd-win/usbipd.exe"

# --- GPU: use Mesa's D3D12 driver (WSLg -> DirectX 12 -> NVIDIA) -----------------
export GALLIUM_DRIVER=d3d12
export MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA
# --- Audio through WSLg's PulseAudio server --------------------------------------
export SDL_AUDIODRIVER=pulse

# --- Joystick: attach it to WSL via usbipd-win -----------------------------------
attached_here=0
if ! ls /dev/input/js* >/dev/null 2>&1; then
    if [ -x "$USBIPD" ]; then
        echo "Attaching joystick ($JOY_HWID) to WSL..."
        if "$USBIPD" attach --wsl --hardware-id "$JOY_HWID"; then
            attached_here=1
            for _ in $(seq 1 50); do ls /dev/input/js* >/dev/null 2>&1 && break; sleep 0.1; done
        fi
    else
        echo "usbipd-win not found; run setup-lac-windows.ps1 first. Continuing without joystick."
    fi
fi
if ls /dev/input/js* >/dev/null 2>&1; then
    echo "Joystick ready: $(ls /dev/input/js*)"
else
    echo "WARNING: no joystick detected; LAC will fall back to mouse/keyboard."
fi

# LAC locates its data from argv[0]: it must be started by name via PATH, never as
# /usr/bin/lac (that aborts with "Binary file has no context to the data files").
# LAC=... pins the data directory so the current working directory doesn't matter.
export LAC=/usr/share/lac
export PATH="${LAC_BIN_DIR:-/usr/bin}:$PATH"   # LAC_BIN_DIR is used by lac-play-debug
lac "$@"
status=$?

if [ "$attached_here" = 1 ] && [ -z "${LAC_KEEP_JOYSTICK:-}" ]; then
    echo "Returning joystick to Windows..."
    "$USBIPD" detach --hardware-id "$JOY_HWID" || true
fi
exit $status
Ubuntu terminal (bash)
cp /mnt/c/Users/YourWindowsName/Downloads/lac-play ~/LAC/
chmod +x ~/LAC/lac-play
mkdir -p ~/.local/bin
ln -sf ~/LAC/lac-play ~/.local/bin/lac-play
chmod +x
Marks the file as a program. Linux has no .exe extension; this flag is what makes a file runnable.
ln -sf
Creates a symbolic link, like a shortcut. ~/.local/bin is on your command search path, so you can just type lac-play.

What the launcher sets, and why

GALLIUM_DRIVER=d3d12Use Mesa's Direct3D 12 driver, i.e. your real GPU. Without it you may get llvmpipe, slow software rendering.
MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIAPick the GPU whose name contains this text, which matters on laptops with two GPUs.
SDL_AUDIODRIVER=pulseSend sound to WSLg's PulseAudio server, which plays on Windows.
usbipd.exe attach --wsl --hardware-id 046d:c215Runs only if no joystick is present. Attaching needs no admin rights once step 2 has shared the device. The joystick is detached on exit unless you start with LAC_KEEP_JOYSTICK=1 lac-play.
LAC=/usr/share/lac and lac started by nameLAC works out where its data lives from how it was started. Started as /usr/bin/lac it stops with “Binary file has no context to the data files”; started as plain lac it works.

7Restart WSL

Needed once so the new permissions apply.

Joining the input group and the systemd setting only take effect after WSL restarts. Close all Ubuntu windows, then in PowerShell:

PowerShell
wsl --shutdown

Wait about 10 seconds and open Ubuntu again. Check that your account is now in the input group:

Ubuntu terminal (bash)
groups

8Check the GPU, joystick and sound

Three quick checks before the first flight.

GPU

Ubuntu terminal (bash)
GALLIUM_DRIVER=d3d12 MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA glxinfo -B | grep -E "OpenGL renderer|OpenGL version"

Good: OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3060) (your GPU's name) and an OpenGL version of 4.x. Bad: llvmpipe, which means software rendering; see Troubleshooting.

Joystick

Ubuntu terminal (bash)
"/mnt/c/Program Files/usbipd-win/usbipd.exe" attach --wsl --hardware-id 046d:c215
ls -l /dev/input/js*
jstest /dev/input/js0

jstest prints a live line of axis and button values; move the stick and press buttons to see them change, then press Ctrl+C to stop. While attached, the joystick is unavailable to Windows games. Give it back with:

Ubuntu terminal (bash)
"/mnt/c/Program Files/usbipd-win/usbipd.exe" detach --hardware-id 046d:c215

Sound

WSLg provides a PulseAudio server automatically; LAC's music at the main menu is the real test. If you want to check first:

Ubuntu terminal (bash)
ls -l /mnt/wslg/PulseServer

9First flight and display settings

Launch LAC and set up your display.

Start LAC from the Start menu (Linux Air Combat, in the Ubuntu folder) or from Ubuntu:

Ubuntu terminal (bash)
lac-play

Starting from the terminal is useful because messages appear there. LAC's settings live in ~/.LAC/LacConfig.txt and its detailed log in ~/.LAC/logfile.txt; both are created the first time it runs.

Get a sharp, full-size picture

You want…Do this
Fullscreen (recommended)Options → Fullscreen: YES. With the patch, the resolution snaps to your monitor's native size, and in fullscreen the Resolution button only offers sizes with your monitor's shape.
A windowFullscreen: NO, then drag the window's edges or maximize it. LAC adapts immediately and remembers the size for next time.
To set it by handEdit width, height and fullscreen in ~/.LAC/LacConfig.txt with nano ~/.LAC/LacConfig.txt (save with Ctrl+O, Enter; exit with Ctrl+X).
Avoid fullscreen at a size different from your monitor

WSLg can't change your monitor's real resolution. It fakes other fullscreen sizes by scaling the picture, so the image is stretched and motion looks choppy even when LAC reports a high frame rate. Use your native size, or a window.

Menus have black bars on wide screens

That's intentional. LAC's menus and briefing screens were designed for 16:9; the patch keeps them in a 16:9 area instead of stretching them. Flight always uses the whole screen.

In Options → Controls, choose joystick control. LAC detected the Logitech Extreme 3D Pro with all 6 axes; map buttons in its control menus as LAC's own documentation describes.

10Play online

Multiplayer works through the LAC server with no extra setup.

LAC's online missions talk to the LAC community server over UDP. In the standard client/server mode your PC only connects outwards, so it works through WSL's default network setup with nothing extra to configure.

  1. Set up your online identity (CommunityHandle) and choose an online mission in LAC's menus, following LAC's own online documentation.
  2. Network settings are in ~/.LAC/LacConfig.txt. This guide was tested with NetworkMode = 1227 (client/server) and ports 51100.
ModeNeeds inbound traffic?Extra WSL setup
Client/server (normal)NoNone
Peer-to-peerYes, UDP 51100Run the Windows script with -MirroredNetworking (step 2), then wsl --shutdown. Your home router may also need UDP 51100 forwarded to this PC.

11Voice chat with Mumble optional

Talk to other pilots.

LAC drives a Mumble voice client itself: it joins the right channel for your mission and handles push-to-talk. Because LAC is a Linux program, it needs the Linux Mumble client inside WSL, not Mumble for Windows. Its sound and microphone go through WSLg.

setup-mumble-linux.sh

Installs mumble, pulseaudio-utils (audio device checks) and espeak (LAC's spoken status messages).

Show the script (33 lines)
setup-mumble-linux.sh
#!/bin/bash
# Mumble voice comms for Linux Air Combat on WSL2 (Ubuntu 22.04).
# Run with:  sudo bash ~/LAC/setup-mumble-linux.sh
#
# LAC drives a *Linux* Mumble client itself, via popen():
#   mumble mumble://<CommunityHandle>@LinuxAirCombat.com/<channel>   (join/switch channel)
#   mumble rpc starttalking / stoptalking / togglemute / toggledeaf   (PTT, mic, sound)
# so Mumble must be installed inside WSL (not on Windows). It runs under WSLg and uses
# WSLg's PulseAudio server (RDPSink speakers / RDPSource microphone).
set -euo pipefail

if [ "$(id -u)" -ne 0 ]; then
    echo "Please run with sudo:  sudo bash $0"; exit 1
fi
LOG="$(dirname "$(readlink -f "$0")")/setup-mumble-linux.log"
exec > >(tee "$LOG") 2>&1

echo "== 1/2 Installing Mumble client, PulseAudio tools, and espeak =="
apt-get update
# mumble           : the voice client LAC controls (1.3.x supports 'mumble rpc ...')
# pulseaudio-utils : pactl/parecord for checking WSLg audio devices
# espeak           : LAC speaks status lines like "Enabling LAC's Mumble Management"
DEBIAN_FRONTEND=noninteractive apt-get install -y mumble pulseaudio-utils espeak

echo "== 2/2 Checking =="
echo "mumble: $(command -v mumble)  version $(dpkg-query -W -f='${Version}' mumble)"
REAL_USER="${SUDO_USER:?Run this with sudo from your normal (non-root) account}"
sudo -u "$REAL_USER" env PULSE_SERVER=unix:/mnt/wslg/PulseServer pactl list short sources || true

echo
echo "DONE. Log saved to $LOG"
echo "Next (as $REAL_USER, not root):  mumble mumble://<YourCommunityHandle>@linuxaircombat.com"
echo "  and complete Mumble's first-run audio + certificate wizards before flying."
Ubuntu terminal (bash)
cp /mnt/c/Users/YourWindowsName/Downloads/setup-mumble-linux.sh ~/LAC/
sudo bash ~/LAC/setup-mumble-linux.sh

Then run Mumble once yourself, as your normal user, to finish its audio and certificate wizards before flying:

Ubuntu terminal (bash)
mumble mumble://YourCommunityHandle@linuxaircombat.com
Microphone

WSLg exposes your Windows default microphone to Linux as RDPSource. If others can't hear you, check Windows Settings → Privacy & security → Microphone, and allow desktop apps to use it.

12A debug build for tracking down crashes optional

For investigating crashes.

If LAC crashes, a second copy built with AddressSanitizer (ASan) stops at the first invalid memory access and reports the exact file and line. That is how most of the bugs on the bug fixes page were found. It runs slower than the normal build, so use it to investigate, not for everyday flying. It lives in its own folder and does not touch the installed game.

Ubuntu terminal (bash)
mkdir -p ~/LAC/asanbuild/bin/Release
cp ~/LAC/src/Lac09p94e/*.cpp ~/LAC/src/Lac09p94e/*.h ~/LAC/src/Lac09p94e/Makefile ~/LAC/asanbuild/
cd ~/LAC/asanbuild
make clean
make -j"$(nproc)" CXX="g++ -O1 -g -fno-omit-frame-pointer -fPIE -fsanitize=address" LIBS="-fsanitize=address -rdynamic -lglut -lGLU -lSDL -lSDL_mixer -lGL"
mkdir -p ~/LAC/debug/usr/bin ~/LAC/debug/usr/share
cp Lac09p94E ~/LAC/debug/usr/bin/lac
ln -sfn /usr/share/lac ~/LAC/debug/usr/share/lac

The last line links the game's data into the debug folder, because LAC looks for its data at ../share/lac relative to the program.

lac-play-debug

Runs the debug build through the normal launcher with suitable ASan options.

Show the script (7 lines)
lac-play-debug
#!/bin/bash
# Run the AddressSanitizer debug build of LAC (~/LAC/debug/usr/bin/lac) to catch memory bugs.
# Slower than normal. If it finds a bug, it stops LAC and writes a report to ~/.LAC/asan.*
export LAC_BIN_DIR="$HOME/LAC/debug/usr/bin"
export ASAN_OPTIONS="halt_on_error=1:detect_leaks=0:alloc_dealloc_mismatch=0:new_delete_type_mismatch=0:log_path=$HOME/.LAC/asan"
echo "Running LAC debug build (AddressSanitizer). Reports go to ~/.LAC/asan.*"
exec "$HOME/LAC/lac-play" "$@"
Ubuntu terminal (bash)
cp /mnt/c/Users/YourWindowsName/Downloads/lac-play-debug ~/LAC/
chmod +x ~/LAC/lac-play-debug
ln -sf ~/LAC/lac-play-debug ~/.local/bin/lac-play-debug
lac-play-debug

Where crash information goes

~/.LAC/asan.<number>ASan's report from the debug build, naming the bad access and the code path to it.
~/.LAC/logfile.txtLAC's own log. With the patch, a crash in the normal build appends “LAC CRASHED” and a backtrace here; improvement 6 shows how to read it.
Tip: start straight into a mission

lac-play-debug -n23 skips the menus and launches Network Battle 03 directly (other numbers pick other missions). That is handy for repeating a crash. Online missions connect to the live server.

13Rebuilding after changes

For later, if you change the code.

After editing the source or applying another patch, rebuild and reinstall just the program (the game data doesn't change):

Ubuntu terminal (bash)
cd ~/LAC/src/Lac09p94e
make -j"$(nproc)"
sudo cp bin/Release/Lac09p94E /usr/bin/lac

LAC's own install.sh copies everything (program and data). Re-run it only if the data files changed: sudo bash ./install.sh.

?Troubleshooting

“Fatal: Binary file has no context to the data files”

Cause: LAC was started by full path (/usr/bin/lac). It works out where its data lives from the name it was started with.

Fix: Start it with lac-play, the Start-menu entry, or plain lac.

No joystick: /dev/input/js0 is missing

Cause: The joystick isn't attached to WSL, or wasn't shared in step 2.

Fix: In admin PowerShell, usbipd list should show it as Shared or Attached; re-run step 2 if not. Then attach it: "/mnt/c/Program Files/usbipd-win/usbipd.exe" attach --wsl --hardware-id 046d:c215. Make sure no Windows game is using it.

Joystick present but LAC ignores it / “permission denied”

Cause: Your account isn't in the input group yet, or systemd isn't running so the udev rule didn't apply.

Fix: Run groups (should include input) and ls -l /dev/input/js0 (group input). Check step 1d, then wsl --shutdown.

Joystick stopped working in Windows games

Cause: It is still attached to WSL. lac-play returns it when LAC exits, but not if the terminal was closed first.

Fix: "/mnt/c/Program Files/usbipd-win/usbipd.exe" detach --hardware-id 046d:c215, or unplug and replug it.

Very low frame rate; glxinfo shows “llvmpipe”

Cause: Software rendering: Mesa isn't using the D3D12 driver.

Fix: Start via lac-play. Update the Windows GPU driver and run wsl --update. Check that MESA_D3D12_DEFAULT_ADAPTER_NAME matches part of your GPU's name (NVIDIA).

Fullscreen picture stretched, blurry or juddery

Cause: Fullscreen at a size other than the monitor's native size; WSLg scales it.

Fix: Choose your native size or play in a window (step 9). The patched picker only offers matching sizes in fullscreen.

Window or picture capped at 1920×1200

Cause: Unpatched LAC limits resolution to 1920×1200.

Fix: Apply the patch (step 4), rebuild and reinstall (step 13).

Crash right after the main menu appears, with a joystick

Cause: Upstream bug: a joystick event arrives before any aircraft exists.

Fix: Fixed by the patch; see bug fix 1.

LAC hangs or crashes when you quit

Cause: Upstream shuts SDL down after the graphics driver has already stopped.

Fix: Fixed by the patch; see bug fix 7. If it's ever stuck, press Ctrl+C in its terminal.

No sound

Cause: SDL isn't using WSLg's PulseAudio server.

Fix: Start via lac-play (it sets SDL_AUDIODRIVER=pulse). Check ls /mnt/wslg/PulseServer exists; if not, run wsl --update and wsl --shutdown.

Peer-to-peer players can't connect to you

Cause: Inbound UDP can't reach WSL behind its default NAT.

Fix: Use client/server mode, or set up mirrored networking (step 2, -MirroredNetworking) and forward UDP 51100 on your router.

“lac-play: command not found”

Cause: ~/.local/bin isn't on your search path yet in this window.

Fix: Close and reopen Ubuntu, or run ~/LAC/lac-play directly.

A downloaded script fails with “$'\r': command not found”

Cause: It was opened and re-saved by a Windows editor, which added Windows line endings.

Fix: Download it again, or fix it with sed -i 's/\r$//' ~/LAC/setup-lac-linux.sh.

For anything else, the last lines of ~/.LAC/logfile.txt (tail -50 ~/.LAC/logfile.txt) usually show what LAC was doing.

≡Reference

Where everything is

PathWhat it is
/usr/bin/lacThe installed game program
/usr/share/lac/Game data: models, textures, sounds, music
~/.LAC/LacConfig.txtYour settings (resolution, controls, network…)
~/.LAC/logfile.txtDetailed log of the last run, including crash backtraces
~/LAC/src/Lac09p94e/Source code you build from
~/LAC/lac-play (linked from ~/.local/bin)The launcher
~/LAC/debug/usr/bin/lacOptional AddressSanitizer debug build
~/.local/share/applications/linux-air-combat.desktopStart-menu entry
/etc/modules-load.d/lac-joystick.conf, /etc/udev/rules.d/71-lac-joystick.rulesJoystick modules and permissions
%USERPROFILE%\.wslconfigWSL settings (only changed with -MirroredNetworking)

Everyday commands

lac-playPlay
LAC_KEEP_JOYSTICK=1 lac-playPlay, and leave the joystick attached to WSL afterwards
lac-play-debugPlay the AddressSanitizer debug build
tail -50 ~/.LAC/logfile.txtShow the end of the log
nano ~/.LAC/LacConfig.txtEdit settings
wsl --shutdown (PowerShell)Restart WSL completely
usbipd list (PowerShell)Show USB devices and whether they're shared/attached

All downloads on this page

These are generalized copies of the exact scripts used on the PC this guide was written on. The only differences are that the user name comes from sudo instead of being fixed, and the joystick ID is a parameter.