Skip to content

cagla-su/Linux-Gaming-Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

518 Commits
 
 
 
 
 
 

Repository files navigation

Table of Contents

Game-Specific Guides

Türkçe Çeviri 🇹🇷

Note

Rehberin Türkçe çevirisi buradadır. Birebir çeviri değildir fakat içerik aynıdır.

Linux Gaming Guide

  • Hello! This guide aims to help you understand how gaming on Linux works, how to prepare your system for gaming and how to optimize your system for higher performance.
  • If you are ready, let's begin!

Before Starting

Note

  • Linux gaming is swiftly improving. Every passing day, more users switch to Linux. In this context, the market share of Linux gaming is increasing.
  • This guide aims to be useful for everyone who wants to play games on Linux but does not know where to start.
  • After reading this guide, feel free to check out Game-Specific Guides if any of the listed games interest you.

How Does Linux Gaming Work?

  • You can play most of the Windows games on Linux. However, this does not mean that there are no native Linux games. Some native Linux games are:
    • mc Minecraft, image Terraria, image Stardew Valley, image Euro Truck Simulator 2 and more
    • Valve games such as image Counter-Strike series, tf2 Team Fortress 2, dota Dota 2, image Portal etc.
  • Generally, native Linux games do not require any extra steps unless they do not require Vulkan. If they do, you need to install Vulkan drivers which is explained in this guide.
  • Windows games require some essential tools in order to run on Linux and these tools are:
    • image WINE / Proton - WINE is a compatibility layer which directs Windows library files into Linux library files. It works the same as the compatibility mode on Windows.
      • Proton is Valve's fork of image WINE and it is specifically configured for image Steam games.
    • DXVK - DXVK translates DirectX 8-11 calls into Vulkan to make Windows games run on Linux. DXVK is not included in image WINE but you still do not need to install DXVK manually because most of the Linux gaming software and custom image WINE/Proton builds include DXVK for users.
      • There are some other tools that are used for similar purposes as DXVK, these tools are:
        • VKD3D - VKD3D translates DirectX 12 calls into Vulkan which DXVK cannot yet. VKD3D serves as the fallback if the game you are trying to play is a DirectX 12 game. Just like DXVK, VKD3D is automatically included in most of the Linux gaming software and custom image WINE/Proton builds.
        • WINED3D - WINED3D translates DirectX 8-11 calls into OpenGL instead of Vulkan. WINED3D serves as the fallback if your system does not have Vulkan drivers installed. However, since DirectX calls will be translated into OpenGL, you are likely to experience poor performance because OpenGL is deprecated. Unlike DXVK and VKD3D, WINED3D is included in image WINE.
+------------------+   DirectX: Windows-specific graphics library
|       WINE       |   Vulkan: Both Windows & Linux native graphics library
+------------------+   OpenGL: Both Windows & Linux native graphics library (deprecated)
         ||
         ||
+----------------------------++--------------------------+
|          DXVK              ||           VKD3D          |
| (DirectX 8-11 -> Vulkan)   ||   (DirectX 12 -> Vulkan) |
+----------------------------++--------------------------+
            ||
+--------------------------+
|         WINED3D          |
| (DirectX 8-11 -> OpenGL) |
+--------------------------+

Note

You do not need to manually install image WINE because image WINE is installed automatically when you install a gaming software such as image Lutris.

Warning

  • nvidia NVIDIA is phasing out the proprietary drivers for their 4xxx and 5xxx series because nvidia NVIDIA is attempting to be more open source for their recent and future cards.
  • However, for older cards, you still have to use proprietary drivers for better compatibility and performance.
  • Also, you should not use image Wayland unless you use one of the recent nvidia NVIDIA GPUs that are mentioned above because it is likely for you to experience glitches and performance issues. Using image X11 is a better option for now.

Issues of Linux Gaming

  • There are not too many issues when it comes to gaming on Linux. However, the main limitation is kernel-level anti-cheat software. These anti-cheat software are not able to run on Linux.
    • The reason why is a kernel-level anti-cheat software that is developed for a Windows game means that the anti-cheat software requires a kernel called "Windows NT", which is only available for Windows.
  • Some examples of kernel-level anti-cheat software are:
    • image | VANGUARD
    • image | Easy Anti-Cheat
    • image | BattlEye
    • image | XIGNCODE3
    • nprotect | nProtect GameGuard
  • image Easy Anti-Cheat and image BattlEye have Linux-compatible versions. That's why some developers may enable Linux compatibility with their anti-cheat software specifically for image WINE/Proton.
    • However, some developers of games like fortnite Fortnite and apexlegends Apex Legends do not enable Linux support in their anti-cheat configurations. That's why those games cannot run on Linux.
  • In addition to enabling Linux-compatible configurations, some games only use the user-mode module of these anti-cheat software, which makes them playable on Linux.
  • Except image VANGUARD, we cannot make a definitive statement about playability of a game that uses one of the anti-cheat software mentioned above.
    • The case is different for image VANGUARD because no games using image VANGUARD are able to run on Linux. This is because image VANGUARD is only used by the games of rito Riot Games, which do not intend to support Linux players at all.

Get Started

Installing Vulkan Drivers

Note

  • If you are using nvidia NVIDIA, please follow image Lutris' Community Guide.
  • If you use intel image Intel/AMD, you get your Vulkan drivers preinstalled when you install a gaming software such as image Steam using your package manager.

Installing Gaming Software

  • Some popular gaming software that are available on Linux are:
    • image | Steam
    • image | Heroic Games Launcher - image Heroic is a useful game launcher for playing games from image Epic Games, gog GOG and image Prime Gaming platforms.
    • image | Lutris - image Lutris is a feature-rich game launcher for playing Windows games. You can directly install some gaming software platforms such as image Epic Games, image Battle.net, ubisoft Ubisoft etc. and run them using Lutris but you can also play games that are not tied to a certain platform.
      • image Lutris provides community-made installation scripts for a large number of games and software.
      • You can also install your games manually, including DVD games, if you have the setup files.
    • image AAGL - image AAGL (An Anime Game Launcher) is a feature-rich game launcher for playing GI Genshin Impact, which disables telemetry and applies patches automatically to keep the game working after updates.
    • image | ProtonPlus - You can install custom image WINE/Proton builds for better compatibility and performance using image ProtonPlus. Custom image WINE/Proton builds are supported by image Lutris, image Steam and image Heroic.
    • image | Sober - image Sober is a game launcher for playing image Roblox's image-removebg-preview(1) Android version on Linux. In the past, it was possible to run the Windows version of image Roblox through image VinegarHQ. However, it is borked now due to the anti-cheat configuration. That's why image Sober is the new way of playing image Roblox on Linux.
    • image Prism Launcher - image Prism Launcher is a feature-rich game launcher for playing mc Minecraft.
      • I have a mc Minecraft guide for configuring and optimizing Minecraft, if you are interested.
    • image Waydroid - image Waydroid is is a container-based compatibility layer that allows image-removebg-preview(1) Android to run on Linux. So you can play image-removebg-preview(1) Android games on Linux using image Waydroid.
      • I have a image Waydroid guide for your questions in mind, installation and configuration steps, if you are interested.

Tip

  • You can install these software through either your package manager or Flatpak.
  • You can check image ProtonDB to see whether your image Steam games are playable on Linux.
    • If the game you searched is ranked lower than silver, that means it is unplayable.
    • You can get optimization tips if there are any reviews written for your game. If you wish, you can write your own reviews for any image Steam game you wish.

Hybrid Graphics Setup

  • If your system has two GPUs (1 integrated + 1 dedicated), it is recommended to install Vulkan drivers for both hardware and set games to run through your dedicated GPU.
  • To run games using your dedicated image AMD GPU, use the following command:
DRI_PRIME=1
  • To run games using your nvidia NVIDIA GPU, use the following command:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia

Ways to Run Games Through the Dedicated GPU

Terminal Method image

Simply, launch terminal and execute the command for your GPU like in the example:

DRI_PRIME=1 prismlauncher

Desktop Shortcut Method 🖥️

  • Create a .desktop file on your desktop.
  • This is an example .desktop file content to run image Prism Launcher through an nvidia NVIDIA GPU. The line you should pay attention is the line that starts with Exec:
[Desktop Entry]
Version=1.0
Type=Application
Name=Prism Launcher
Comment=Prism Launcher
Exec=env __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia prismlauncher
Icon=/path/to/your/game/icon.png
Terminal=false
Categories=Game;
  • Simply, you should add env first and the command for your GPU. Finally, the package name of the game.

For Steam Games image

Add the command for your GPU in the launch options of your games. Do not forget to add %command% at last like in the example:

DRI_PRIME=1 %command%

Note

If you are going to additionally use other launch options and run games through your dedicated GPU, make sure that all the commands are written before %command% like in the example:

DRI_PRIME=1 gamemoderun %command%

For Lutris & Heroic Games image image

  • image | Lutris - On the left side bar, click the settings icon that appears when you point your mouse cursor on Wine.
    • System Options - Enable Advanced - Display - GPU
  • image | Heroic - Settings - Game Defaults - Other - Use Dedicated Graphics Card

External Disk Setup

Note

  • If your external disk is internally connected, you might be able to use it out of the box depending on your Linux distribution. However, if you are using your external disk through an SSD case (USB), you should configure it manually.
  • These steps also apply if your disk is internally connected but still not working properly.

Get Started: GParted image

Caution

  • I strongly suggest that you format your disk to change its file system from NTFS to a Linux-compatible one because write support for NTFS is experimental on Linux and it might corrupt your drive!!! You have been warned.
  • Install gparted using your package manager and follow the next steps, making sure your external disk is unmounted while it is physically connected.
    • Launch GParted - select your external disk from the top right - delete all the partitions - Add
    • Next - File system: ext4 (or xfs, if you wish) - Label: anything you wish - Add
    • Finally - Apply All Operations

How to Configure External Disks on Linux?

  • First of all, install gnome-disk-utility package using your package manager.
    • If you insist about using your external disk as NTFS anyway, additionally install ntfs-3g package using your package manager.
  • After the installation, launch Disks app from your application launcher.
  • Then, find your external disk from the menu on the left and click this button under Volumes:
imageee
  • From the menu, click Take Ownership (Recursive) and confirm.
  • After taking the ownership, open the same menu and click Edit Mount Options.
    • Now disable User Session Defaults and check Mount at system startup.
    • Next, find the box that does not have a label that is under Symbolic Icon Name box and make sure you only have these mount options:
      • nofail,x-gvfs-show,rw,user,exec
    • If you are going to use your external disk as NTFS, you should additionally include ntfs-3g option like in the example:
      • nofail,x-gvfs-show,rw,user,exec,ntfs-3g
    • Finally, change Identify As value to /dev/disk/by-label/your-disk and click OK.
imagee
  • Now you are ready to use your external disk(s)!

Optimization Tips

Reducing Game Resolution and Using the Lowest Graphics Settings

Tip

  • When you reduce the resolution of a game, less pixels will be rendered and it will result in less loads on your hardware, leading to higher performance.
  • When you play with the lowest graphics settings, less details will be rendered, leading to higher performance.
  • Both are going to increase performance while reducing visual quality. You can experiment to find your own balanced settings.

Lossless Scaling image

It is possible to play your games in lower resolutions while not losing anything from visual quality thanks to image Lossless Scaling. However, you must purchase the app from image Steam to be able to use it.

  • After purchasing image Lossless Scaling, you should install lsfg-vk to be able to use it on Linux.
    • However, your GPU must support Vulkan and your system must have Vulkan drivers installed in order to use this feature!

Using a Performance Kernel

Gamemode

  • Gamemode is a tool that temporarily changes your system configurations to increase performance during the gameplay.

Note

  • Generally, gaming software like image Lutris enable it by default.
  • However on image Steam, you should manually add a command in your game's launch options like in the example:
gamemoderun %command%

Performance-Increasing Launch Options

You can use these launch options for higher performance while gaming:

  • DXVK_LOG_LEVEL=none - It suppresses all DXVK logs to increase performance as gaming software will not spend time processing and writing log data. - Medium impact on performance
  • WINEDEBUG=-all - It suppresses all debug outputs of image WINE. - Low impact on performance
  • WINE_LARGE_ADDRESS_AWARE=1 - It allows 32-bit applications to consume up to 4 GB RAM instead of 2 GB. - Variable impact depending on the game, generally medium.
  • MESA_GLTHREAD=true - It improves OpenGL performance on intel image Intel/AMD GPUs. - High impact on performance
  • __GL_THREADED_OPTIMIZATIONS=1 - It improves OpenGL performance on nvidia NVIDIA GPUs. - High impact on performance

How Can You Use These Launch Options?

  • image | Steam - You can simply use these commands in launch options section that is previously mentioned.
  • image | Lutris - System Options - Environment Variables - Add
image
  • image | Heroic - Settings - Game Defaults - ADVANCED - Environment Variables - +
image

Disabling Compositor - X11 ONLY!!! image

Warning

If you are using image Wayland, disabling the compositor is not possible. These steps are only available for image X11.

  • A disabled compositor simply means disabled animations and transparency. Also, it causes screen tearing which reduces visual quality while improving performance.
  • This step is explained in image Linux Gaming wiki.

Conclusion

This guide was about Linux gaming. Thank you for reading. I hope this guide has helped you prepare your system for gaming on Linux. Happy gaming! image

About

Linux Gaming Guide

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors