Gaming on Linux

SammiLucia here 😊

I was trying to play several new games on Linux and quickly became obvious there aren't many clear, up-to-date examples of how to configure Linux for optimal gaming.

First of all, I'd like to address that there are several distros purported to be built for gaming. While this may be true for many people, unfortunately if you're on newer hardware, in general those distros do not give you the most current kernel or packages, which will undoubtedly cause you problems...

We recommend Fedora, followed by Arch for gaming. Fedora probably takes the least work to get going. Also be aware Manjaro is only loosely based on Arch so we don't recommended it. If you're on PopOS! and Ubuntu and having great successβ€”great! However we don't recommend these distros, either.

Thanks to Leopard on the asus-linux Discord for your help with this guide 😊

πŸ”— Arch?

Note, I've only tested these instructions on Arch. Know what you're doing or have backups before applying to Fedora.

πŸ”— Contributing

Please feel free to contribute! I most certainly am not the expert on this topic, just trying to work out how to play games! 😊

Updates should be posted to this blog article, please also update the Changelog below.

πŸ”— Prerequisites

  1. This guide assumes you have the latest NVIDIA drivers installed and working correctly. Version 5.10.xx at the time of writing.

  2. The guide also assumes you have a kernel with FSYNC enabled, this means either kernel 5.17 or higher, or Xanmod. Xanmod enables FSYNC, and Intel Clear patches, and some other performance chages, and generally has the lastest performance (and possibly hardware) updates.

  3. If your distro doesn't yet have the 5.17 kernel (you can check with uname -r), you can install Xanmod by following the instructions here for Arch, or it should be fairly easy to find a recent Xanmod built for your distro.

  4. To enable vsync passthrough (depending on how well a game implements its vsync), add nvidia-drm.modeset=1 to the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub

  5. You can also reduce mouse latency by adding usbhid.mousepoll=1 to GRUB_CMDLINE_LINUX_DEFAULT. Note this is probably broken since kernel 4.4.x, however it shouldn't hurt to add it.

  6. Regenerate grub by running grub-mkconfig -o /boot/grub/grub.cfg.

  7. Reboot.

πŸ”— Steam configuration

  1. Install the latest Steam, login and download your games
  2. If you want Steam to start with certain command line options, create a file ~/.config/steam-runtime-flags.conf and put the options in there. (Note: if this doesn't work for you, you may need to modify the Exec in the steam.desktop shortcut. There are a few ways to list flags... I find one per line clearest, e.g:Screenshot from 2021-12-27 22-51-42
  3. In Steam > Settings > Steam Play > Enable Steam Play for all other titles > Proton Experimental Screenshot from 2021-12-27 22-48-14
  4. Force the new game to run with Proton Experimental: Right click the game > Properties > Compatibility > Force the use of a specific Steam Play compatibility tool > Proton Experimental Screenshot from 2021-12-27 22-53-12
  5. Change the Launch Options for the game to enable gamemode (see below), and force NVIDIA: Right-click game > Properties > General > Launch Options > gamemoderun __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%Screenshot from 2021-12-29 19-06-45

πŸ”— Enable Game Mode scheduling

Game Mode configures the CPU governer, scheduler, and process niceness for maximum performance for games. To enable Game Mode:

  1. First enable the multilib repo if you haven't already. Edit /etc/pacman.conf to add
Include = /etc/pacman.d/mirrorlist
  1. Run pacman -Syy to update your repositories.
  2. Install lib32-gamemode with pacman -S lib32-gamemode link to library.
  3. Install gamemode with pacman -S gamemode.
  4. Add gamemoderun to the beginning of your Steam game Launch Options.
  5. Create a new user group with groupadd -r gamemode.
  6. Add yourself to the group with usermod -a <yourUserName> -G gamemode.
  7. Edit system security limits for users nano /etc/security/limits.conf to add the line:
@gamemode       -       nice    10

This will enable user accounts that are members of the gamemode group to increase (or 'renice') processes up to a value of 10.

  1. Now test everything is working by running gamemoded -t and fix any errors (hopefully none).

Note: you can check whether Game Mode is active with gamemoded -s from a command line. For more information on Game Mode and an example config (ini) file see the Arch Wiki.

πŸ”— Enable saving the Shader Cache

By default the Shader Cache will generate every time a game is launched. To enable saving of the Shader Cache:

  1. Right-click game > Properties > Shader Pre-Caching > Check Enable Shader Pre-Caching AND Allow background processing of Vulkan shaders:

Screenshot from 2021-12-29 19-06-01

The Shader Cache should now start generating and saving the cache for that game.

πŸ”— Fix laggy screen updates

For whatever reason (maybe me not understanding something) vblank_mode=0 still leaves me with a weird laggy display and screen tearing. This fix shouldn't hurt and it works for me. Do:

  1. Create a new config file with nano /etc/drirc.
  2. Add the following to the file:
       <application name="Default">
           <option name="vblank_mode" value="0" />
  1. Reboot.

πŸ”— Using environment variables instead

If you don't want to specify launch options for every single game you can put known safe options into /etc/environment so they are enabled during login. To do this:

  1. Create and edit the file with nano /etc/environment if it doesn't already exist.
  2. Add your desired options, for example:
# This file is parsed by pam_env module
# Syntax: simple "KEY=VAL" pairs on separate lines

# Configure AMD. Only required if you have AMD iGPU/dGPU

# Enable AMD ACO shader compiler threading

# Set video decode to AMD. This should be set automatically since 12.0.1 of
# libva-mesa-driver. This is only in here for testing.

# Enable rendering. Still in development, will probably crash!

# Pascal speed hack for Vulkan for all games. This should make a big difference
# however _may_ cause problems in some games. If it does for you, move it from
# here to steam Launch Options.

# Enable DLSS. This is still fairly new.

# Compensate for compositing Window Managers:
# 1 = Display _previous_ rendered frame. Highest FPS, but higher latency
# 2 = Display _latest_ rendered frame, better latency, but _possibly_ lower FPS

# Enable shader disk cache per game instead of regenerating the cache at every
# game launch. The disk cache path should no longer be required, however if
# the shader cache is being regenerated each launch, try specifying it.

# Enable threaded optomisation for OpenGL.
  1. In the above example you would still use the Launch Options above to force the use of NVIDIA. Using Launch Options this way enables you to still run some games on the iGPU, so you can play less demanding games on battery.

πŸ”— Asus fan settings

If you are on a recent Asus notebook, see for guides on how to properly configure NVIDIA drivers and support for configurable fan curves.

I use the following commands to set fan curves for the Performance power profile with asusctl. You don't need sudo for these:

  1. asusctl fan-curve -m performance -f cpu -D 30c:80,40c:80,50c:80,60c:180,70c:180,80c:180,90c:220,100c:220 to set the CPU fan curve.
  2. asusctl fan-curve -m performance -f gpu -D 30c:80,40c:80,50c:80,60c:180,70c:180,80c:180,90c:220,100c:220 to set the GPU fan curve.

πŸ”— Lutris installation

Warning: For me, installing Lutris made games run worse. I don't yet know why, however games became extremely choppy and unplayable. Removing Lutris fixed this(!)

With all the above config, you actually shoudln't need Lutris.

You can install Lutris, which provides a single interface for all your games, and runs games with community optimised settings.

To install, do:

  1. pacman -S lutris python-magic
  2. Ensure your Steam profile and games list is set to public. This is how Lutris discovers your games list. (Everything else can be set to private.) Screenshot from 2021-12-28 16-20-58
  3. Run a game, and run gamemoded -s to check gamemode is still active while launching a game from Lutris.

That should be it! Run Lutris to start and configure games from Lutris. If you have any problems, you can run lutris -d to see what might be going on.

πŸ”— What do the flags do?

  • vblank_mode=0 prevents Proton for trying to wait for vblank (the next screen redraw), which depending on a number of factors (desktop environment, and your specific config), it may not even get. This can lead to a really weird tearing effect. If you don't see this problem, you do not need to enable this flag. This may vary by game, depending on how each game has implemented vsync (i.e: "well", or "poorly").
  • __NV_PRIME_RENDER_OFFLOAD=1 causes VK_LAYER_NV_optimus (Vulkan) to be loaded. I'm not sure this is needed any more.
  • __GLX_VENDOR_LIBRARY_NAME=nvidia together with __NV_PRIME_RENDER_OFFLOAD=1 forces OpenGL to choose the NVIDIA driver.
  • __VK_LAYER_NV_optimus=NVIDIA_onlytogether with __NV_PRIME_RENDER_OFFLOAD=1 forces Vulkan to choose the NVIDIA driver.

πŸ”— "Experimental" flags

  • VKD3D_CONFIG=dxr11 or VKD3D_CONFIG=dxr enables RTX/raytracing support. I haven't had any success with this, it's caused some games to not start up after enabling RTX, and manually having to disable RTX in the games .ini. Raytracing support is still in development, so proceed with caution.
  • __GL_THREADED_OPTIMIZATION=1 allows the NVIDIA driver to work multithreaded for OpenGL only (not Vulkan), however be aware threading is not always good! As a rule of thumb if the GPU is under heavy burden, this may actually decrease FPS.

πŸ”— Futher reading

  • Lutris docs - a list of many launch flags.
  • Gaming - ArchWiki the Arch Wiki may have some other tweaks. Please note the section on schedule and scheduled should not be required with Game Mode (unverified).
  • Xanmod kernel - including the Asus ROG patches from (Asus Linux)[]

πŸ”— Changelog


  • Moved to website
  • Updated for 5.17 kernel and NVidia 5.10.x drivers
  • Added warning about non Arch/Fedora distros


  • Added changelog
  • Enabled launching of some games on iGPU
  • Added warning about Lutris
  • Fixed fan curve typos


  • Added Lutris

27-Dec-21 #2:

  • Added renice
  • Added gamemode
  • Added renice fix
  • Added fan curves
  • Added vblank fix

27-Dec-21 #1:

  • Initial version