How to Run Age of Empires 4 on Ubuntu Linux

2170 VIEWS

· · ·

Officially, Age of Empires 4, which Microsoft released in October 2021, only runs on Windows.

Unofficially, however, the game works very well on Linux, too – so well that if you, like me, are a fan of both real-time strategy games and Linux, there’s nothing stopping you from enjoying them in tandem in the wake of the AoE 4 launch.

To prove the point, here’s a step-by-step guide on getting Age of Empires 4 running on Ubuntu. Specifically, we’ll cover:

  • How to install the Steam gaming platform on Ubuntu.
  • How to install Age of Empires 4 in Steam.
  • Doing a few tweaks so that Age of Empires 4 runs on Ubuntu.

Overall, the setup process is pretty easy – much easier than old-timers like me had it circa fifteen years ago, when attempting to run Windows games on Linux usually required compiling Wine from source and screwing around with graphics drivers, only to find that the game would only half-work no matter how hard you tried. Fortunately, you don’t need to do any of that to make AoE 4 run smoothly on Ubuntu.

My setup

Before diving into the installation steps, a little context: These AoE 4 installation steps work on my System76 laptop, which is running Ubuntu 20.04.2 and has an NVIDIA GPU as well as an on-board Intel GPU.

Here are the details on my graphics setup (from the lshw -C video command), in case you’re curious:

*-display                 
     description: VGA compatible controller
     product: NVIDIA Corporation
     vendor: NVIDIA Corporation
     physical id: 0
     bus info: [email protected]:01:00.0
     version: a1
     width: 64 bits
     clock: 33MHz
     capabilities: vga_controller bus_master cap_list rom
     configuration: driver=nvidia latency=0
     resources: iomemory:110-10f iomemory:120-11f irq:167 memory:81000000-81ffffff memory:1100000000-11ffffffff memory:1200000000-1201ffffff ioport:2000(size=128) memory:82000000-8207ffff
*-display
     description: VGA compatible controller
     product: Intel Corporation
     vendor: Intel Corporation
     physical id: 2
     bus info: [email protected]:00:02.0
     version: 01
     width: 64 bits
     clock: 33MHz
     capabilities: vga_controller bus_master cap_list rom
     configuration: driver=i915 latency=0
     resources: irq:165 memory:83000000-83ffffff memory:90000000-9fffffff ioport:1000(size=64) memory:c0000-dffff memory:1080000000-1086ffffff memory:1220000000-12ffffffff

That said, these installation steps should work on any other Linux computer with a graphics card capable of running AoE 4 (which is most standalone graphics cards). But I haven’t tested them there, so YMMV, as they say.

Step 1: Install Steam

First things first: Go to https://store.steampowered.com/about/ and click the Install Steam button to download the Debian package for the Steam installer.

You should be able to install the package by double-clicking on it.  If that doesn’t work, you can install it on the command line by navigating to the package’s location and running:

sudo dpkg -i /path/to/steam.deb

After Steam installs, you can launch it by typing steam in a terminal, or searching for it in your Ubuntu app launcher. (The details here may vary depending on which desktop environment you are running.) After Steam launches, you’ll need to create a Steam account (it’s free) if you don’t already have one and log in.

Step 2: Install NVIDIA 32-bit libraries

When I first tried to run Steam, it complained with a message that began, “You are missing the following 32-bit libraries…”

I solved that by running these commands:

dpkg --add-architecture i386
apt install libgl1-nvidia-glvnd-glx:i386

As far as I am aware, this is an issue that only affects Linux computers with NVIDIA GPUs (and possibly only those with certain NVIDIA GPUs). If you don’t get the error, you can ignore this step and move along.

Step 3: Install AoE 4 in Steam

This step is the easiest of all. With Steam running, click the Store tab, search for Age of Empires 4 and follow the instructions to install it.

The game package is pretty big – around 24 gigabytes – so it may take a bit of time to download if you’re cheap like me and have a low-bandwidth Internet connection.

Steam - Age of Empires 4

Step 4: Enable Proton Experimental

With Steam installed on Ubuntu, and AoE 4 installed in Steam, you’re ready to perform the final trick: Getting Steam to run a Windows-only game on Ubuntu.

To do this, you need Proton, a tool that adds support for some Windows games to Linux-based Steam installations. Proton is built into Steam, so you don’t need to install it. You do, however, need to enable it.

Do that by clicking the Steam menu button in the upper-left corner of the Steam interface, then navigating to Settings.

In Settings, click the Steam Play tab in the left hand menu. Then check the box that says Enable Steam Play for all other titles. Make sure Proton Experimental is selected in the dropdown menu next to that box. (As of the time of this article’s publication, earlier versions of Proton don’t yet support AoE 4.)

Steam on Ubuntu Linux

Click OK to save the changes.

Step 5: Configure Vulkan driver to fix the black screen issue

On my computer, I had to do just one more tweak to get AoE 4 running: I needed to set an environment variable to tell the system which Vulkan driver to use. (You can read about what this means here if you’re curious, but basically, because my machine has two GPUs – an Intel one and an NVIDIA one – it was defaulting to the Intel driver when running Steam, and setting this environment variable tells it to use the NVIDIA driver instead.)

You can do this with the command:

echo "export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json" >> .profile

You’ll then need to log out of your Ubuntu session and log back in (or just reboot your computer) for the change to take effect. You can also just define the export VK_ICD_FILENAMES variable on the command line when calling Steam if you don’t want to change this setting across your entire environment.

If I didn’t configure the Vulkan driver, the screen was black when I tried to run AoE 4.

Step 6: Play Age of Empires 4

That’s it! You can now open Steam, click the Library tab and launch Age of Empires 4. For me, the game runs impressively well in both single player and multiplayer modes on Ubuntu, despite not being a native Linux game.

Conclusion

Back when I became a Linux user about fifteen years ago, I resigned myself to a future wherein my life as a gamer would be limited to steering Tux the Penguin down a snowy mountain. Although it was sort of possible at the time to get some Windows games running in Linux, it always took a lot of effort. And if you got the games to work at all, they usually weren’t that stable.

I’ve happily discovered that that’s no longer the case. Not only can Windows games like AoE 4 now run very well in Ubuntu, but getting them running is surprisingly easy. You don’t have to compile Wine from source or install experimental video drivers. You mostly just do the same things you’d do to run the games on Windows. And that’s great news if you’re a Linux-loving gamer.

http://www.fixate.io

Chris Tozzi has worked as a journalist and Linux systems administrator. He has particular interests in open source, agile infrastructure and networking. He is Senior Editor of content and a DevOps Analyst at Fixate IO.


Discussion

Click on a tab to select how you'd like to leave your comment

Leave a Comment

Your email address will not be published.

Menu
Skip to toolbar