Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

How do you play Windows games on Linux?

+3
−0

A lot of games are made for Windows, and don't have an official Linux version. Can you play these on Linux?

Asking specifically about games, not all programs, because games have a lot of additional requirements like graphics performance and anti-cheat.

I am looking for a general overview, with the understanding that if someone wants details on a specific point, it can be researched online or through more specific questions.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+4
−1

Yes, you can run most Windows games on Linux through Wine. There are some specific caveats when using Wine, such as sandboxing (security), the choice of runner, drivers, video, controllers (gamepads), and whether to replace DirectX with Vulkan.

Other than Wine, there are options such as VMs with a GPU passthrough, but these days Wine is often the better option.

Wine

"Back in the day," this used to have a very low success rate. Since mid 2010s, a lot of major companies got involved in improving Wine, and suddenly the compatibility improved a lot. Keep this in mind when looking at older information.

Wine is basically a set of libraries that provide all the same functions that you would have in Windows. When a game tries to use these as it would on Windows, Linux presents the Wine library and the game thinks it's running on Windows. If Wine devs incorrectly guessed how a certain Windows API feature works, or didn't implement it, the game will crash. Wine also provides simplified, mock versions of some Windows things, like the registry which doesn't exist on Linux. Behind the scenes, Wine is translating all the Windows stuff into equivalent Linux things.

You can just use Wine directly by installing it and running wine game.exe. This is usually a bad idea, because with wine's default settings, the game will put junk in your home folder, the lack of isolation makes it hard to troubleshoot and if there's a virus in the game it can easily infect your computer despite it being Linux. There are also better, patched versions of Wine.

Running Wine

These days the best way is to sandbox Wine (and hence the game) so that it can't access your normal files at all. Except, obviously, the files of the game itself, the files Wine creates to represent standard Windows directories, and the place where savegames will go. The easy way is to use Bottles which does everything with a user friendly interface. You can try to DIY it by running Wine through bwrap with all the right arguments, but there's a lot of them and it gets to be a pain.

Bottles is sandboxed through Flatpak and you can restrict the game as much as you want. You can let Flatpak present a fake home folder to the game, without any of your real files, and whatever the game tries to create in there will disappear when you close it. You can block network access and so on. Flatseal is a GUI you can use to tweak the permissions of Bottles, which you would run the games through.

There are some launchers, like Lutris, which help call Wine with the correct tweaks. However, unlike Bottles, Lutris does not sandbox games automatically IIRC.

Another option is Steam, where you can "add a non-Steam game" and set the compatibility options in the properties. Valve decided to make their Steam Deck console be based on Arch Linux, so now they have a big interest into making sure their whole library runs on Linux. They do this by making a customized version of Wine they call Proton, which has very good compatibility. You can check ProtonDB for specific notes about individual games.

I personally dislike running Steam just for a game that has nothing to do with Steam. I usually prefer Bottles. However, Steam is nice for establishing a baseline when troubleshooting, because it's something with corporate support behind it.

The basic Wine is okay these days (a lot of fixes from Proton etc. get added to mainline Wine eventually), but it's a generic project. There are now alternative runtimes. Proton is the one that ships as part of Steam, but you can use it outside Steam since it's just a customized Wine. GloriousEggroll is a guy who developed some tweaks to Wine (originally to make it run Total War games and League of Legends), but has now become a good general purpose gaming runtime. Usually GE-proton is the one with best compatibility. "Soda" (comes with Bottles) is one that has some fixes from proton and GE, but is a bit simpler, so it's a good default if you don't necessarily need the extra stuff from GE (most games don't). Bottles, Steam, Lutris and other launchers all have ways to change the Wine runtime for each game.

Hardware considerations

Games require a lot of GPU power, so you'll need to have your graphics drivers set up properly. You will probably need the proprietary driver as the open source one (like nouveau) won't have enough performance. Many games rely on Microsoft's DirectX. Wine can run DirectX, but there is also the separate Vulkan project which is a reimplementation to DX. Often, games run better in Vulkan than DirectX on Wine, so IMO it's a good default. It also has nice extras like MangoHud. The challenges apply even to games with light graphics (2D games) because many of them use the same handful of engines (Unity, Unreal) that heavily depend on DirectX.

Note that if you use Bottles, it will come with a separate set of GPU drivers that are also Flatpak'd. It won't use your system's drivers.

If you want to use a controller, it can sometimes be tricky to make it work through Bottles. Steam has a lot of magic code to deal with controllers, including remapping them, so this is a good last resort if nothing else works. It's often necessary to use Big Picture Mode in Steam for this to kick in, for many games the controller doesn't work in regular mode.

Alternatives

Very old games (90s) might run too fast through Wine, so you can try something like DosBox. Generally, Wine has better compatibility with old Windows games than Windows itself. PC Gaming Wiki is a good place to find help, like widescreen patches, and most will work regardless of Wine.

It's also possible to run Windows on a VM and play games there. With tools like Qemu, you can set up GPU passthrough so that you get near-native performance. This is very complex, and sometimes you need things like having a secondary GPU for Linux to use while Windows uses the other one. This used to be the way to run "any game" on Linux, but these days it's rarely necessary due to recent advances in Wine.

Also, in some cases a game might have a native Linux version but the Windows version through Wine runs better. For example, some Total War games get ported to Linux by a third party company, which is notorious for doing a bad job with these ports - they end up buggy, have missing features, lag behind on updates, and run much slower. A lot of people play Total War games through Wine because it runs better than the Linux version.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »