How To Improve Gaming With Wine On Linux
Installing Wine on Linux is one way to get a better gaming experience but on its own Wine often isn’t enough to game on. Sometimes games require some basic tweaks. These basic changes, when made, improve gaming with Wine.
Virtual Desktop
A great feature that the Wine tool has is its ability to emulate a virtual windows desktop. This can essentially lock all wine programs out of Linux, by restricting them to a fullscreen windows-like environment. Many don’t enable this feature, but they should, as turning this feature on will fix many little fullscreen issues, as well as problems with the native resolution, capturing the mouse and etc.
To turn it on, press ALT + F2 on the keyboard. This will open the command launcher in your Linux desktop environment. In the command launcher, type: winecfg, then press enter to open the Wine CFG tool. This tool allows users to tweak aspects of the Wine tool.
Click on the “Graphics tab”, and look for “emulate a virtual desktop”. Check the box to enable this feature. Then, go down to the section that says “Desktop size”. In this section, it is critical that you enter the native resolution of your monitor. By doing this, you’ll create a virtual-desktop overlay for video games and other Windows applications.
Note sure what your native monitor resolution is? Run this command in terminal: xdpyinfo | grep “dimensions”
With the dimensions entered, click “apply”, then “ok”. Close all Windows apps that are open. When Wine relaunches, it’ll be using the newly enabled overlay.
Installing Critical Tools
Windows games don’t work out of the box in Wine. Like on Windows itself, many games require critical tools and libraries to work right. Here’s how to get them the easy way.
Start off by opening a terminal window, and follow the instructions below depending on your operating system.
Ubuntu
sudo apt install winetricks
Debian
sudo apt-get winetricks
Arch Linux
sudo pacman -S winetricks
Fedora
sudo dnf install winetricks
OpenSUSE
sudo zypper install wine
Other Linuxes
Winetricks itself is a shell script, and doesn’t need to be installed. If your Linux distribution doesn’t officially distribute the program, this method will work instead.
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks chmod +x winetrick
With Winetricks, things like Directx9, VCRun files, MS core fonts and etc are much easier to download. To download and install Directx9, run:
winetricks directx9
If you want to install other tools with Winetricks, use dlls list.
winetricks dlls list
Alternatively, list everything the Winetricks tool has to offer with:
winetricks list-all
Save the lists for reference later by piping it to a text file.
winetricks list-all >> winetricks-list.txt
Note: Winetricks has a graphical interface users can use if the terminal app is too confusing. To launch it, search “winetricks” under where you’d normally launch programs.
Changing Windows Versions
Sometimes a game won’t run inside Wine because of the Windows version. By default, the version Wine uses is Windows XP. Obviously, as XP is a dead platform, not many games still support it. While it’s true that using it in XP mode can really help for older games, this isn’t the case for newer games.
To change the version, once again open Wine CFG. This is done by pressing ALT + F2 on the keyboard, typing winecfg followed by the enter key.
As soon as Wine CFG opens, look at the bottom of the window for “Windows version”. Select the drop-down menu, and select “Windows 7”.
While it is true that Windows 10 is on this list, games tend to play best in Windows 7 mode (for the most part), so avoid Windows 10. If a game refuses to run under Windows 7, change it to 10.
After changing the version, click “Apply”, then “OK” to finalize the changes.
Gallium Nine
Even with DirectX 9 installed via Winetricks, games can still have issues. The main thing comes down to performance. This is due to the fact that Wine is a complex tool that works to communicate Windows code to Linux. As a result, things don’t always work perfectly.
An easy way to fix DirectX 9 performance issues is with Gallium Nine. It patches Wine, and allows users to easily get more FPS in Wine games. In this tutorial, we will cover how to install it via Ubuntu, and Arch Linux as packages that are readily available.
That said, all Linux distributions are supported and have instructions (albeit complicated) on how to install it as well. If you do not use Ubuntu or Arch Linux. Go here and read the official instructions to build from source, and etc.
Ubuntu Installation
Ubuntu users will be pleased to know that there is a PPA available. To get the patched version of Wine, open a terminal window and enter these commands:
sudo add-apt-repository ppa:commendsarnex/winedri3
After adding the PPA, update the changes made to the system with the update command.
sudo apt-get update
Lastly, install the patched version of Wine.
sudo apt install mesa wine2.0
Arch Linux Installation
Arch users can simply download the snapshot for the latest version of Gallium Nine and install it. The AUR package will install all dependencies, the latest version of Wine and everything needed to get it going without a fuss. Point your favorite AUR helper at it and get going!
Enabling Gallium Nine
Like most tweaks in this article, it starts out in the Wine CFG window. To enable Galium Nine’s performance tweaks, press ALT + F2, type “winecfg”, and press the enter key. Inside the Wine CFG center, look for the “Staging” tab.
Inside “staging”, check the box that says “Enable Gallium 9 for better D3D9 performance”. Click the “apply” button, then “OK”. From here, Wine should run most games a lot better!