AoE2 on Linux in 2024

Since 2023-10-06 and the release of Proton 8.0-4, Age of Empires II : Definitive Edition can be played again with the stable version of Proton (it was previously broken since 2023-06-27 and the release of AoE2:DE update 87863). If you've explicitely used a specific version of Proton before, you may want to switch back to the stable version.

Disclaimer: the length of the page may give the impression that this is going to be difficult. It really isn't. Keep on reading :)

Which version of AoE2 should I play?

As of 2024, there are three mutually-incompatible versions of Age of Empires II:

There's very little debate about which version is the best, and they all run on Linux equally well, so let's get straight to the answer: play the Definitive Edition and get it on Steam.

There are some fair points to be made about playing an older version, though:

If none of these is particularly important to you, again: play the Definitive Edition and get it on Steam (NB: you'll be able to play with your friends who got it on the Microsoft Store or through the Xbox game pass, don't worry).

Can I play AoE2 on a Steam Deck?

Yes: the Steam Deck is just a (small) PC running SteamOS, a Linux distribution based on ArchLinux. What follows is applicable to the Steam Deck as to any other PC running Linux. You'll probably want to plug a mouse and a keyboard to your Steam Deck to play, though.

Can I play AoE2 on a Linux / Android smartphone or on a Raspberry Pi?

Maybe. Many modern Linux / Android smartphones and the best Raspberry Pis are powerful enough to run a game like Age of Empires II. Most of them, however, use an ARM CPU, when Age of Empires II was designed for x86 CPUs only. Using an emulator is therefore mandatory.

I still have to write a section about emulation, but in the meantime, have a look at this YouTube video showing the Definitive Edition running on an Android phone or this Reddit thread about playing The Age of Kings / The Conquerors on a Raspberry Pi 4.

How do I play Age of Empires II: Definitive Edition on Linux?

Single player

  1. Install Steam (the Linux version).
  2. Start Steam and log in.
  3. Open the “Steam” menu (1), then “Settings” (2).
  4. Screenshot of the Steam client with the “Steam” menu open, and the “Settings” entry highlighted
  5. Go to the “Compatibility” section (1) and check the “Enable Steam Play for all other titles” box (2). You can leave the “Run other titles with” dropdown list (3) to its default value but make sure it is at least Proton 8.0-4 (earlier versions up to 8.0-3c won't work — even though they used to work in the past).
  6. Screenshot of the Steam client “Settings” window, on the “Compatibility” tab, with the “Enable Steam Play for all other titles” box checked
    If you have an old GPU which doesn't support Vulkan 1.3, you'll instead need to either:
  7. Now, AoE2:DE should be available in your Steam library as it would be if you were on Windows. Install the game.
  8. If you don't want the introduction video, go to your “Library” (1), right click “Age of Empires II: Definitive Edition” (2), click “Properties” (3), then “General“ (4) and type SKIPINTRO in the “Launch options” (5).
  9. Screenshot of the Steam client “Properties” window for “Age of Empires II: Definitive Edition”, on the “General” tab, with the “SKIPINTRO” launch option
  10. Start the game.

At this point, the game should work fine in single player mode. If you want to play online multiplayer, however, keep on reading.

Online multiplayer

Ignoring what follows won't prevent you from enjoying single player mode, but you'll encounter synchronization issues after a few seconds of playing online.

  1. Quit the game (it is important that you have started it at least once before the next step).
  2. Open a terminal.
  3. Execute the following commands (every single character is important, including the quotes):
    • cd "$(mktemp -d)"
    • wget "https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe"
    • cabextract vc_redist.x64.exe
    • cabextract a10
    • If you're using Steam from your distribution's package manager (apt, pacman…) or SteamOS (eg. on the Steam Deck), run these commands:
      • chmod u+w ~/.steam/steam/steamapps/compatdata/813780/pfx/drive_c/windows/system32/ucrtbase.dll
      • yes | cp ucrtbase.dll ~/.steam/steam/steamapps/compatdata/813780/pfx/drive_c/windows/system32
    • If you're using Steam from Flathub / Flatpak, run this command instead:
      • cp ucrtbase.dll ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/813780/pfx/drive_c/windows/system32/
    • Start the game again.

At this point, the game should work fine in online multiplayer as well. Once in the game, you shouldn't see any difference compared to when playing on Windows.

Spectating games or joining lobbies by clicking aoe2de:// links.

The most interoperable way to have aoe2de:// links opened in the game is probably to configure an XDG scheme handler for that.

  1. Create a file called ~/.local/share/applications/aoe2de.desktop with the following content:
                  [Desktop Entry]
                  Type=Application
                  Name=Age of Empires II: Definitive Edition
                  Exec=steam -applaunch 813780 %u
                  MimeType=x-scheme-handler/aoe2de;
                
  2. Execute the following command:
    • xdg-settings set default-url-scheme-handler aoe2de aoe2de.desktop
  3. Make sure the program in which you click links (web browser, chat client…) uses xdg-open to handle unknown schemes (or at least the aoe2de scheme). That should be the case for most modern programs.

At this point, clicking an aoe2de:// link should start Age of Empires II: Definitive Edition (if not already started) and automatically spectate the game or join the lobby.

Troubleshooting

The game disappears after the splash screen on a Nvidia Optimus laptop

Sometimes, it disappears silently, sometimes with an error message about graphics display resolution, minimum requirements and “CreateSwapChain() failed!”.

Nvidia Optimus laptops have two GPUs: one Intel iGPU within the CPU and one Nvidia dGPU in a graphics card. The iGPU is power-efficient and preferred for light tasks (like web browsing) whereas the dGPU is powerful and prefered for heavy tasks (like gaming).

With some combinations of AoE2:DE and Proton, there's a known bug which causes Proton to use an Intel Vulkan ICD on the Nvidia dGPU, which obviously can't work.

The only reliable workaround I'm aware of unfortunately prevents you from using the Intel Vulkan ICD. But, well… it works.

  1. Open a terminal.
  2. Execute the following command:
    • sudo mv /usr/share/vulkan/icd.d/intel_icd.x86_64.json /usr/share/vulkan/icd.d/intel_icd.x86_64.json.disabled
  3. Start the game again.

At this point, the game should work fine… until a driver update restores the Intel Vulkan ICD (at which point you just have to run the same command again).

The game disappears after the splash screen after changing my graphics card

Sometimes, it disappears silently, sometimes with an error message about graphics display resolution, minimum requirements and “CreateSwapChain() failed!”.

When you change your graphics card, you may switch to another GPU vendor in the process (eg. you had a Nvidia GPU-based graphics card and switch to an AMD GPU-based graphics card).

With some combinations of AoE2:DE and Proton, there's a known bug which causes Proton to use the Vulkan ICD for the old GPU (eg. Nvidia) instead of the one for the new GPU (eg. AMD), which obviously can't work.

The only reliable workaround I'm aware of unfortunately prevents you from using two Vulkan ICDs at the same time. But, well… it works.

  1. Open a terminal.
  2. Execute one of the following commands (depending on your graphics cards):
    • sudo mv /usr/share/vulkan/icd.d/nvidia_icd.x86_64.json /usr/share/vulkan/icd.d/nvidia_icd.x86_64.json.disabled (if you switch from Nvidia to AMD)
    • sudo mv /usr/share/vulkan/icd.d/radeon_icd.x86_64.json /usr/share/vulkan/icd.d/radeon_icd.x86_64.json.disabled (if you switch from AMD to Nvidia)
  3. Start the game again.

Note: depending on what GPU you were using before, and also on previous upgrades of your operating system, you may have more useless ICDs than just the ones mentionned above. Make sure only the useful ICD is present in /usr/share/vulkan/icd.d/ and you should be fine.

At this point, the game should work fine… but you should make sure you've uninstalled the drivers for the old GPU, otherwise a driver update will restore the old Vulkan ICD (at which point you just have to run the same command again).

The game disappears after the splash screen on an old GPU

Sometimes, it disappears silently, sometimes with an error message about graphics accelerator with DirectX 11 support, graphics display resolution, minimum requirements and “CreateSwapChain() failed!”.

To implement the Direct3D API on Linux, Proton uses two tools called DXVK et Vkd3d, which rely on the Vulkan API available on recent GPUs. Proton 8.0 and onwards even require a GPU that supports Vulkan 1.3.

On older GPUs, it is possible to use another tool called WineD3D instead, which rely on the older and more widely supported OpenGL API. Expect lower performance, but better compatibility with older GPUs when using WineD3D.

To use WineD3D and OpenGL:

  1. Go to your “Library” (1), right click “Age of Empires II: Definitive Edition” (2), click “Properties” (3), then “General“ (4) and type PROTON_USE_WINED3D=1 %command% in the “Launch options” (5).
  2. Screenshot of the Steam client “Properties” window for “Age of Empires II: Definitive Edition”, on the “General” tab, with the “PROTON_USE_WINED3D=1 %command%” launch option
  3. Start the game.

The framerate (number of FPS) is very low.

On similar hardware, the framerate is expected to be more or less the same on Linux as on Windows.

If it isn't for you, try the following, just in case:

  • Update your GPU drivers to the latest version. Always start with this!
  • Enable V-sync in the game. Suprisingly, this has resulted in much higher FPS with previous versions of the game (on Windows too); maybe it will for you too.
  • Disconnect any additional monitor you have. This has been shown to have a negative impact on FPS with some display servers / window managers for some people.
  • If your hardware supports it, make sure you're using Vulkan emulation (DXVK) of Direct3D and not OpenGL emulation (WineD3D). While compatible with older hardware, the latter usually isn't as good with regards to performance. Vulkan emulation is the default, but if you have PROTON_USE_WINED3D=1 %command% in the “Launch options” of the game, you'll use OpenGL emulation instead. Try removing the launch option.

How do I play Age of Empires II: HD Edition on Linux?

Follow the instructions for Age of Empires II: Definitive Edition, and it should work pretty much the same, I think.

How do I play Age of Empires II: The Age of Kings / The Conquerors on Linux?

Sorry, I haven't written this section yet. It works, though.

A few pointers:

How do I play Age of Empires II on LAN on Linux?

Playing on LAN is a way to use the computer of one of the players as the server, when most people use a server provided by Microsoft instead.

This is a feature which is available in all versions of the game, but while it's reachable right from the menu in The Age of Kings / The Conquerors, it's a bit hidden in the UI in later versions.

With Age of Empires II: Definitive Edition, LAN mode is available when you create a lobby and select “local LAN” as server. This uses a program called BattleServer.exe on the lobby creator's computer. Unfortunately, as far as I know, nobody has been able to use BattleServer.exe on Linux (the “local LAN” option is not even available in the list of servers).

Keep in mind that the player running the server has to make sure some ports are open on his computer (and not blocked by a firewall, or hidden behind a NAT device, like a router). Also be sure to use TCP/IP and UDP/IP as protocol, as some of the other protocols available in The Age of Kings / The Conquerors (like IPX) are probably not supported anymore by most operating systems, routers…

How do I use CaptureAge on Linux?

CaptureAge is a very powerful tool to watch saved gamed with an overlay of information.

Unfortunately, as far as I know, nobody has been able to use it on Linux. With little effort, one can start it, connect to the game and start replaying a saved game, but it won't show in the custom overlay.

To increase the chances of getting CaptureAge on Linux, you can vote for it (as of 2024, Linux support is the second most voted suggestion for CaptureAge).

Should I play on Linux?

That's an interesting question. I assumed you already had an opinion on this, but if you don't, here are some thoughts:

All in all, I'd say: play on your operating system of choice; don't let anybody else chose your operating system for you.

Acknowledgements

There's a very long list of people to thank for being able to play AoE2 on Linux. Of course, this would not have been possible without the efforts behind the Wine project since 1993 and behind the DXVK and Proton projects since 2017. But individuals from the AoE2 on Linux community have been helping a lot as well, through Wine's AppDB, ProtonDB, GitHub, Reddit, Discord…

Everything described on this page is the result of many people tireless attempts at making the game work on Linux and their willingness to share their discoveries with everybody.

Thanks everyone, GL HF!

Last update (changelog) on 2024-05-12 (VAV 111772)