How to run games on Arch (and configure Steam and Proton).
Game Mode configures CPU governer, scheduler, and process niceness for maximum performance for games. To enable Game Mode:
- First enable the
multilib
repo if you haven’t already. Edit/etc/pacman.conf
to add[multilib] Include = /etc/pacman.d/mirrorlist
- Synchronize the repos by
sudo pacman -Syy
- Install Game Mode
sudo pacman -S lib32-gamemode gamemode
- You can run Game Mode by running
gamemoderun
command. - Create a new user group with
sudo groupadd -r gamemode
. - Add yourself to the group by
sudo usermod -aG gamemode <your username>
. - Edit system security limits for users
sudo nvim /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 to a value of 10.
- Now test everything is working by running
gamemoded -t
and fix any errors (hopefully none).
To uitlize that fsync patch in linux kernel you have to add this line in /etc/security/limits.conf
<your username> hard nofile 524288
sudo pacman -S wine
Go to GitHub Releases and download the latest version, as of today 25th Feb 2023 its 7.49 so I will be using that for this guide.
cd .steam/steam/compatibilitytools.d/
wget "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton7-49/GE-Proton7-49.tar.gz"
tar -xvf GE-Proton7-49.tar.gz
rm *.tar.gz
NOTE: for this you have to use the AUR helper
paru -S dxvk-bin vkd3d-proton-bin
/usr/share/dxvk/setup_dxvk.sh install
/usr/share/vkd3d-proton/setup_vkd3d_proton.sh install
Improves rendering of textures, gotta love the open source community
paru -S vkbasalt lib32-vkbasalt
gamescope is pretty amazing, its a wayland based compositor for games which also removes the vsync barrier of wayland and also HDR.
paru -S gamescope xwm
If you are on NVIDIA GPU then to use gamescope you need this script which I call it gamescope-run
#!/bin/sh
export AMD_VULKAN_ICD=RADV
igpu=$(lspci -nn | sed -n '/VGA/{s/^.*\[//;s/\].*$//;p;q}')
gamescope --default-touch-mode 4 --prefer-vk-device $igpu --rt -w 1920 -h 1080 -W 1920 -H 1080 -f -U $@
In that case you have to use this proton script I made to run those cracked games, yes I know it, with the same optimizations
#!/bin/sh
PROTON="$HOME/.steam/steam/compatibilitytools.d/GE-Proton7-48/proton"
STEAM_COMPAT_DATA_PATH="$HOME/.proton" STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.local/share/Steam" VKD3D_CONFIG=dxr PROTON_ENABLE_NVAPI=1 __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json __GL_SHADER_DISK_CACHE=1 WINE_FULLSCREEN_FSR=1 WINE_FULLSCREEN_FAKE_CURRENT_RES=960x540 ENABLE_VKBASALT=1 LD_PRELOAD=$LD_PRELOAD:/usr/\$LIB/libgamemodeauto.so.0 "$PROTON" run $*
You can remove the PROTON_ENABLE_NVAPI=1
and other NVIDIA variables if you don’t have a NVIDIA GPU.
So if you guys have a monitor which supports HDR output, then i would say use gamescope and proton only for gaming and use the following variable
DXVK_HDR=1
Congratulations on completing the setup, now you can enjoy high end gaming on linux with optimized performance. Happy Gaming 😁.