Gaming #101
The following article will help you take the first steps towards gaming on Arch Linux.
Table of contents:
Section titled “Table of contents:”Sources:
Linux gaming guide by @keybreak
Requirements
Section titled “Requirements”1. Check if your GPU supports Vulkan
Section titled “1. Check if your GPU supports Vulkan”Search for your GPU in the database;
✓ If there’s an entry you’re good to go!
× Not on the list? That means your GPU is too old to support Vulkan. Without it, DXVK won’t work and performance and compatibility will be worse. However you still can game;
- Skip next steps: 3. Install Vulkan and 4. Install Vulkan driver for your GPU driver.
- Make sure to disable DXVK/D3DVK globally in Lutris and Steam.
2. Install Vulkan
Section titled “2. Install Vulkan”vulkan-icd-loaderlib32-vulkan-icd-loader3. Install GPU specific Vulkan
Section titled “3. Install GPU specific Vulkan”Nvidia
nvidia-utilslib32-nvidia-utilsAMD AMDVLK
amdvlklib32-amdvlkAMD RADV
vulkan-radeonlib32-vulkan-radeonIntel
vulkan-intellib32-vulkan-intelHybrid / Optimus GPU
Additional Software
Section titled “Additional Software”GameMode is a daemon that automatically optimizes your system while playing games.
pacman -S gamemodeMangoHud is an in-game overlay, it can display useful information and cap FPS.
yay -S mangohudProtonUp-Qt is a GUI tool to manage different versions of GE Proton.
yay -S protonup-qtDOSBox is an emulator for MS-DOS games.
pacman -S dosboxEmulationStation is a front-end for emulating retro games.
yay -S emulationstationG-Sync
Section titled “G-Sync”Getting Nvidia G-sync to work properly on Linux may require some additional steps.
The most important consideration is the window manager’s compositor, specifically the ability to re-direct fullscreen windows. Most compositors are capable of doing this, those that cannot will need to be either disabled temporarily or swapped out.
Besides this, usage of a frame limiter is neccassary to ensure all rendered frames stay within the G-Sync range of the monitor, slightly below the maximum refresh rate. For example if your monitor is 144 Hz, cap it at approximately 142 fps. MangoHud is the easiest way to accomplish this, execute it as a run command within Lutris or Steam.
How to tell if G-Sync is actually enabled? Open nvidia-settings, navigate to “OpenGL settings” then tick the boxes “enable G-sync visual indicator” and “enable graphics API visual indicator”. Now launch a game and check the top left corner overlay, it should say “FLIP” and “G-SYNC” in green letters. In-game V-Sync should also be enabled.
Compatible compositors:
Section titled “Compatible compositors:”- Compton / Picom
- Compiz
- KWin
- Mutter
- Muffin
Config files
Section titled “Config files”Check the following config files and set the values as indicated;
~/.config/picom.conf
unredir-if-possible = true;vsync = true;refresh-rate = 0;~/.config/MangoHud/MangoHud.conf
#change to your desired fps capfps_limit=60#to hide the overlayno_displayXFCE users
Section titled “XFCE users”Make sure that xfwm vblank mode is set to glx, by typing this command in terminal:
xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s "glx" --createTo prevent flickering on the desktop, add a new rule under “application profiles” in nvidia-settings:
This feature = process name (procname)Matches this string = xfwm4Profile name = no_gsyncKey = GLGSYNCAllowedValue = falseGlossary
Section titled “Glossary”Platforms
Section titled “Platforms”| Platform | Pros | Cons |
|---|---|---|
| Linux Steam | • Very easy to use • Performance same or better than Windows & Native • Big community |
• Based on proprietary Steam client made by Valve • Game library and saves depends on Valve (unless manually backup) |
| Linux Wine | • Easy when you know how • Performance same or better than Windows & Native • Big community • FOSS • Gives you 100% control of your engine, data and games |
• Requires some knowledge or tools for ease of use • May break on updates if always using latest engine (not recommended practice!) |
| Linux Native | • Best performance | • May break on updates, unless sandboxed • Currently limited number of games |
Common terms
Section titled “Common terms”| Term | Description |
|---|---|
| PREFIX / WINEPREFIX | Separate directory inside your Linux, which represents a “Windows” machine, it’s drives, folders, registry, etc. |
| Engine / (Wine / Proton) | • Allows you to run Windows programs on Linux • Downgrade / update engine version for any PREFIX |
| ARCH | Architecture of PREFIX is win64 or win32 based on chosen Engine ⚠ You can use only one ARCH for PREFIX since it’s created, in most cases you should use win64! |
| dll override / WINEDLLOVERRIDES | It’s not always possible to run an application on builtin DLLs. Sometimes native DLLs simply work better. You can override any dll in your PREFIX, these DLL overrides can be set using winecfg or use the WINEDLLOVERRIDES environment variable to set them.Options available: • native (=n) • builtin (=b) • disable (=) • native, builtin (=n,b) • builtin, native (=b,n) |
| Winetricks / Protontricks | Very important tool in your arsenal to tweak PREFIX and overcome some known problems, or install Windows libraries, to cover unfinished parts of Wine. |
| DXVK | Vulkan-based translation layer for DirectX 9 / 10 / 11 Probably the most important project for gaming on Linux! |
| VKD3D | Aims to implement the full DirectX 12 API on top of Vulkan. ⚠ Early in development, may have lots of bugs and performance problems. |
| Esync | Removes wineserver overhead for synchronization objects. This can increase performance for some games, especially ones that rely heavily on the CPU. |
| Fsync | More recent alternative with even better performance improvements, then Esync. However, you do need an Engine and Kernel that supports it. |
Engines
Section titled “Engines”| Engine | Description |
|---|---|
| Wine | The most important project for the topic at hand, in 1993 there were bunch of absolutely insane people who decided to reverse-engineer Windows proprietary software and redirect it to Linux native FOSS style for future compatibility. |
| Wine staging | It contains bug fixes and features, which have not been integrated into the development branch yet. The idea of Wine Staging is to provide experimental features faster to end users and to give developers a way to test their patches before being integrated into the main branch. |
| Proton | A fork of Wine maintained by Valve / Steam. And what a great boost it gave for Linux gaming! It is basically a set of patches; • DXVK enabled by default • Esync ready • Fsync ready Made to work with Steam, so keep this in mind when hearing term “Protonified”! Although it’s not officially recommended, you can easily use Proton with Wine directly. |
| Wine-TKG Proton-TKG |
Custom bleeding edge builds by Tk-Glitch, may greatly improve compatibility or performance, especially with new games! • Esync ready • Fsync ready If you have new game which doesn’t work from day 1 - try this, most likely will be the first build to run your game. |
| Wine-GE Proton-GE |
Custom bleeding edge builds by GloriousEggroll “the most patched Wine”, may greatly improve compatibility or performance, especially with new games! • Esync ready • Fsync ready • vkd3d ready If you have new game which doesn’t work from day 1 - try this, it most likely will be the first build to run your game. |
Resources
Section titled “Resources”| Project | Repository | Devs | Bugs | Wiki | Support |
|---|---|---|---|---|---|
| DXVK | GitHub | doitsujin, Joshua-Ashton | GitHub | Wiki | |
| VKD3D | GitHub (Proton) Git (Wine) |
Józef Kucia (RIP), Alexandre Julliard, Hans-Kristian Arntzen | GitHub | Wiki | |
| Lutris | Website, Database | Mathieu Comandon | GitHub | Wiki | Donate |
| Wine | Website, Database | army of them | Bugzilla | Wiki, Docs | Donate |
| Wine staging | GitHub | zfigura, alesliehughes | Bugzilla | Wiki | Patreon |
| Proton | GitHub, Database | Valve | GitHub | Wiki, Options | Patreon (protondb) |
| Wine-TKG Proton-TKG |
GitHub | Frogging-Family | Bugs | GitHub | Patreon |
| Wine-GE Proton-GE |
GitHub (Wine) GitHub (Proton) |
GloriousEggroll, Credits | GitHub | Patreon | |
| PlayOnLinux (Phoenicis) | Website, Binaries |
qparis, plata | GitHub (Winebuild) |