Gaming on Linux: A guide for sane people with limited patience
By Alex Garnett
So, you want to play games on your Linux machine. Oh, boy. Batten down the hatches, because we’re about to show you how to do some real computing. You ever compiled something, kid? You ever compiled something like we did back in the ’90s?
You ever watched a man compile?
Oops, sorry if I frightened you. Truth is, Linux is getting more user-friendly every year, and if you’ve been paying attention to recent developments like Valve’s beta test of Steam for Linux, you might be wondering if you still need Windows in order to reliably use your PC as a modern gaming platform. Here’s the honest truth: You (probably) don’t. It still depends a little on your hardware, but for the most part Linux is as robust a gaming platform as you could ask for. I know you’ve heard that kind of talk before, but we mean it this time.
To prove it, we’re going to show you how to play modern PC games on a Linux PC no matter what kind of hardware you own. This guide will primarily be targeting the newest version of Ubuntu (12.10), arguably the most popular and user-friendly version of Linux, but most or all of it will be applicable to any other Debian-based Linux distribution, such as Mint.
For the purposes of this guide, we’re going to assume that you’ve gotten as far as installing Linux, but that’s it; no special expertise is required beyond a willingness to type commands into a terminal.
We won’t be compiling a thing. Promise.
Linux cheat sheet
Here’s a brief rundown of important terms for a novice Linux user:
WINE (which stands for WINE Is Not an Emulator, because Linux users are nothing if not clever) is a compatibility layer used for running Windows programs on Linux. It’s been around for more than 15 years and handles everyday stuff like Office without any trouble, though it was developed primarily for gaming.
A PPA (Personal Package Archive) is a Web address containing one or more prebuilt applications for a specific version of Linux, usually maintained for free by some kind soul. Using PPAs to install third-party software helps sort out compatibility issues and ensures that you get patches automatically.
sudo (Super-User DO) is a command used in front of terminal commands in order to give you administrator rights to change an important part of your system, such as installing drivers. We’ll be using it pretty often, but try not to take its power for granted—there’s a reason you have to type it each time.
Let’s get started
First, you’re going to want to install the correct graphics drivers. This depends on your video card—I’ll try to keep this as simple as possible, so you have to worry about it only once. If you’re currently in the market for a video card for use with Linux, the simplest rule of thumb is always to get a mid-tier GeForce card that’s at least a year old—as of this writing, that would be a Geforce GTX 560 Ti, for about $175. If you’ve already got a different card, don’t worry just yet—read on.
Getting GeForce drivers for Linux
As I said, this is the simplest and most compatible option. Open a terminal and enter the following commands (you can copy and paste by pressing Ctrl+Shift+V), remembering to press Enter after each one:
Reboot, and you’re good to go. You’ll automatically get updates for this driver in the future.
Intel HD Graphics or AMD Radeons older than the HD 6xxx series
If you don’t have an Nvidia GPU, getting Linux drivers is a little more complicated; Nvidia develops its own driver for Linux rather than releasing open-source driver code and letting the Linux community work on it. For better or worse Nvidia is quite good at this, and thus the stable, official release of its Linux driver is usually the best one. Intel and AMD, on the other hand, release their drivers as open-source code, so we’re going to get the fastest (yet still stable) version from a community maintainer.
A disclaimer: These drivers are usually pretty good, but you are getting them from an unofficial source. They won’t always get you performance comparable to what you’d see in Windows, and they may work in slightly fewer bleeding-edge games than the Nvidia drivers, but you shouldn’t have too much to complain about.
To try them yourself, open a terminal and enter the following:
Reboot, and you’re all set. These drivers will also automatically update thanks to the power of the Linux PPA.
AMD Radeon HD 6xxx or newer
If you have a brand-new Radeon GPU, you have a slightly different driver update path ahead of you. The open-source development of AMD’s Linux drivers tend to lag behind a bit, so the company provides a closed-source Linux driver for newer cards. Compared to Nvidia’s official Linux drivers these could use a bit more TLC, and performance might not be as good as on Windows, but try them and see what you think; depending on the games you play, there may be no difference at all.
Point your browser to AMD’s website and select your video card and OS (Linux x86_64 in most cases) from the drop-down menu. Download the file and unzip it to the Desktop (just as you would in Windows), then open a terminal and enter the following:
sudo sh amd-driver-installer-catalyst-12.10-x86.x86_64.run
AMD’s installer will run to install and configure the AMD drivers, along with the Catalyst Control Center GPU management software. These may not automatically update, because you didn’t get them from a Ubuntu PPA (there is one, but it’s not always kept up-to-date, so we aren’t using it), but an update option should be in the Catalyst Control Center that you can use to periodically check for new updates.
Reboot, and you’re done. Phew! That’s half the hard part over with.
Installing and Configuring Wine
Even if you’re going to be playing mostly games that have been ported to Linux, Wine dramatically expands your horizons for gaming without Windows, so it’s highly recommended that you install it.
It’s easy to get, too; simply open a terminal and run the following commands:
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.5
sudo apt-get install winetricks
The system may ask you if it can install other packages; go ahead and say yes. Once this is done, it’s time to get in the habit of using Ubuntu key shortcuts—press the Windows key on your keyboard (yes, it’s ironic; there’s a very, very small chance this key won’t have the Windows logo on it, and Linux documentation refers to it as the “Super” key, so just go with it) and type “winetricks”; then press Enter. The Winetricks interface will open.
Winetricks is a little program installed alongside Wine that lets you quickly install necessary Windows libraries without needing to track them down and figure out whether you’re supposed to be installing the version for Windows XP or the version for Windows 7 or any of that. Once it’s opened, tick Select the default wineprefix, press OK and then Install a Windows DLL or component; press OK again.
For minimum headache, you’ll want to select the following packages from the list:
– everything beginning with “d3dx”
– vcrun2005, vcrun2008, and vcrun2010
– xact, xact_jun2010, and xinput
– optionally dotnet3.5. Skip this for now, but remember it when you see the “Troubleshooting” section below.
After this, click OK, and everything will install; most of it will be in the background, but you may need to click through once or twice. Good news: With that done, the hard part is now over! On to the fun part: playing games.
Where to get games, how, and why
Option 1: The Humble Store and the Ubuntu Software Center
The Humble Bundle is a fairly recent development in the world of PC gaming that regularly packages multiple indie games into a pay-what-you-want “bundle” for use on Windows, Mac, or Linux. Since its inception, it’s been almost singlehandedly responsible for more Linux ports than were available in the previous decade, and it’s probably going to be your best source for games that run natively and are thus (almost) guaranteed to work. Check the Humble Bundle websiteperiodically, and if you miss a bundle, know that you can always get the same games individually for full price from the Ubuntu Software Center (similar to Apple’s App Store, it’s installed automatically, and will be where you obtain all your software that doesn’t come from external PPAs; nearly everything but the games is free).
Option 2: Steam
As I mentioned in the introduction, Steam is now (in beta) on Linux! This is really exciting, as it means that Linux is being taken seriously as a gaming platform, and as a result we might see far fewer headaches involving video drivers in the near future. That said, if you have Wine, there’s currently very little reason to use the Linux version of Steam. The selection is currently very small, since they provide only games that have native Linux ports (many of which are indies from the Humble Bundle), and virtually every game that’s been ported to Linux already worked in Wine.
For the time being, I’d recommend sticking to the Windows version of Steam, as it works flawlessly, and using the Linux version of Steam only if you really need an extra 5 or so frames per second in a game, since native ports will run faster by a (surprisingly) small degree. Alternatively, you could use Steam for Linux if you really want to support gaming on Linux (and don’t mind constantly logging out of Wine Steam to run Native Steam and vice versa, since you can’t be logged in two places at once) and/or you’ve waited several years after I’ve written this for more games to be ported over.
Installing and using Steam is dead simple, and here’s where you’ll see the power of Wine: simply head over to the Steam website, download and install the Steam client as usual (I mean it: Double-click the .exe, and it works like magic), buy and install games as usual, and voilà! Nine times out of ten (depending on your video driver, and provided you’ve done a little fiddling in winetricks), these games just work. If they don’t work—well, we’ll get to that in a minute.
Option 3: Emulation
If your taste in games tends toward console titles, you’re in luck—at least one emulator for just about every major platform has a Linux port. Some older consoles, like ZSNES for the Super NES and PCSX for the Playstation, will be available directly from the Ubuntu Software Center; newer consoles, like Dolphin for Gamecube/Wii and PCSX2 for the PS2, require that you add the developers’ PPAs.
Again, compatibility varies—Dolphin works very well on Intel graphics in Linux, whereas PCSX2 tends to crash on anything but Nvidia.
Give it a go, and once you’ve got the hang of it, feel free to search for other PPAs containing software you know and love but can’t find in Ubuntu Software Center (they’ll appear in the software center once you add them through the terminal). You’ll probably be pleased with the results.
Option 4: Older Native Linux Ports
This option is a distant fourth, but it’s worth keeping in mind: Over the past decade or so, there have been a number of semi-official Linux ports of PC classics that predate the current Linux golden age of gaming (via Steam and the no-mess Humble Bundles). An example is Unreal Tournament 2004: using the official Windows DVD, you can install it with a special Linux patch from the Linux Installers for Linux Gamers website (a good resource for finding several such patches, but not the only one), and voila—a native version of an over-eight-year-old game that works more or less out of the box on a modern version of Ubuntu. If you have limited affection for PC games released between 1998 and 2006, you can probably disregard this option, but there it is.
Troubleshooting (and when not to bother)
To keep things simple, here’s a point-form list to resolving the most common issues with Wine. If you have a problem that isn’t addressed here, leave a comment below and ask around on the Wine forums for help; the Linux gaming community is full of friendly folks willing to lend a hand.
– The Microsoft.NET framework doesn’t always work correctly in Wine. This is being actively worked on, but it’s especially likely to screw up games that use Games for Windows Live. To get around this, you can try tracking down and extracting a community software library replacement called “xliveless” into the directory containing the game’s exe, which will disable online functionality entirely.
– That said, the safest way to go as far as compatibility is to install only the bare minimum of required DLLs using Winetricks (as we did above) and let Steam handle the rest automatically, unless you’re having trouble. Packages installed through Winetricks can be more compatible, but wrestling with multiple half-installed versions of .NET is more trouble than it’s worth.
– DirectX 10 and newer don’t always work correctly in Wine. Luckily, there are next to no games on the market that can’t fall back on DirectX 9 if need be.
– Windowed modes are generally more stable than fullscreen modes (which can do irritating things like disabling your second monitor and not turning it back on afterwards). If a game is crashing before letting you try to change it to windowed mode and if you’re feeling bold, you can go hunting for the game’s settings file and try changing it manually. This is usually an .ini file, and it will be located in one of two places:
Open the file and press Ctrl+F to search for settings named “Fullscreen,” which you’ll want to set to “0” or “False,” or conversely “Windowed,” which you’d want set to “1,” or “True.” Yes, it’s a bit janky, but once you’re in the habit it takes two minutes and is a pretty reliable fix.
– In some rare cases, I’ve seen Steam versions of games not work when instinct told me they really ought to be working (if they had pretty low-spec graphics requirements, for example). If a game has a demo version available as a stand-alone .exe, try that; if it works when the Steam version doesn’t, email the developer! In my experience, they’re often receptive to feedback and willing to help more people play their games.
– If a game flat-out doesn’t start, and you’re feeling determined, you can try to run it from the terminal to see if it prints any intelligible errors. To do this, close Steam, open a terminal, and (on a default install) run:
Steam will reopen, printing miscellaneous output to the terminal. Try to run the game in question, and if you’re in luck, when it crashes, it may mention missing a specific library that you can install through winetricks or track down elsewhere. If there are no clues, my advice is to forget about it for now—you can bash your head into a wall all day, and if it’s thanks to a bug in Wine or your video driver, you likely won’t be able to do anything but wait for a fix.
– The Wine website is a great resource for tracking compatibility with various games in various versions of Wine. As always, they’ll be able to support you best if you’re using an Nvidia card with an updated version of Wine (in which case you’re less likely to have issues in the first place, but that’s sadly how the cookie crumbles). If you’re feeling confident and generous, please publish your own compatibility reports!
Hope that helps. If the wind is in your favor, you’ll be gaming on Linux in no time, and you might even find that you don’t miss Windows at all. Welcome to the world of free software! You are now a socialist with a very short temper.
Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read ouraffiliate link policyfor more details.