Gaming

How to install Steam, DXVK




Steam Launch Options

DO=(%command%); “${DO[@]/%FalloutNVLauncher.exe/FalloutNV.exe}”
Enable GameMode
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgamemodeauto.so
Disable ESYNC
PROTON_NO_ESYNC=1
Disable DX11 or 10
PROTON_NO_D3D11=1
Get Cool States
DXVK_HUD=fps,frametimes
DXVK Other options: devinfo, submissions, drawcalls, pipelines, memory, version, api
Always end with this command
%command%
nVidia Caching options
__GL_THREADED_OPTIMIZATION=1
__GL_SHADER_DISK_CACHE_PATH=/path/to/location

WINEARCH="win64" WINEPREFIX=~/DIRECTORY winecfg
WINEARCH="win64" WINEPREFIX=~/DIRECTORY winetricks corefonts
WINEARCH="win64" WINEPREFIX=~/DIRECTORY /usr/share/dxvk/setup_dxvk.sh install
ln -s ~/.local/share/Steam/steamapps/common/Proton*/dist ~/.local/share/lutris/runners/wine/proton

battle.net

pacman -Syu lib32-gnutls lib32-libldap lib32-libgpg-error lib32-sqlite lib32-libpulse lib32-alsa-plugins

Andreas Bauer. All rights reserved.

nVidia

How to install and configure nVidia drivers and setup a default resolution and refresh rate




Install nVidia driver

pacman -S nvidia nvidia-libgl lib32-nvidia-libgl nvidia-settings

Enable persistence

systemctl enable nvidia-persistenced.service -f
systemctl start nvidia-persistenced.service

Enable runtime power management for nVidia VGA/3D controller devices on driver bind

/etc/udev/rules.d/80-nvidia-pm.rules
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
/etc/modprobe.d/nvidia-pm.conf
options nvidia "NVreg_DynamicPowerManagement=0x02"
xrandr -q
xrandr --output DP-0 --mode 3440x1440 --rate 200
cvt

Make nVidia Settings permanent

nvidia-settings first config /etc/X11/xorg.conf.d/20-nvidia.conf second config /home/wildw1ng/.nvidia-settings-rc

/etc/X11/xorg.conf.d/20-nvidia.conf
Section "Screen"
    Option         "Coolbits" "28"
    Option         "TripleBuffer" "off"
/etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
        Identifier "Monitor0"
        Modeline "3440x1440_200.00"  1569.78  3440 3760 4144 4848  1440 1441 1444 1619  -HSync +Vsync
        Option "Primary" "true"
        Option "PreferredMode" "3440x1440_200"
EndSection

Section "Screen"
    Identifier "Screen0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option         "Coolbits" "28"
    Option         "TripleBuffer" "off"
    Option         "metamodes" "3440x1440_200 +0+0 {AllowGSYNCCompatible=On}"
    SubSection "Display"
        Modes "3440x1440_200"
    EndSubSection
EndSection

Section "Device"
    Identifier "Device0"
    Driver "nvidia"
EndSection

Custom TDP Limit on boot (without driver persistence)

/etc/systemd/system/nvidia-tdp.timer
[Unit]
Description=Set NVIDIA power limit on boot

[Timer]
OnBootSec=5

[Install]
WantedBy=timers.target
/etc/systemd/system/nvidia-tdp.service
Description=Set NVIDIA power limit

[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-smi -pl 320
systemctl enable nvidia-tdp.timer -f
~/.config/autostart/nvidia-powermizer.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=nVidia Performance Profile
Comment=Configure nVidia PowerMizer Settings
Exec=/usr/bin/nvidia-settings -c :0 -a '[gpu:0]/GPUPowerMizerMode=1'
Icon=/usr/share/pixmaps/nvidia-settings.png
Categories=__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__
lspci | grep -i nvidia
nvidia-smi -q -d power
export DISPLAY=:0
X :0 &

Configure nVidia performance profile Settings

/usr/bin/nvidia-settings -c :0 -a '[gpu:0]/GPUPowerMizerMode=2'

GPUPowerMizerMode=0 Adaptive
GPUPowerMizerMode=1 Performance
GPUPowerMizerMode=2 Auto

nvidia-settings -q [gpu:0]/GPUPowerMizerMode
(sleep 20 && DISPLAY=":0.0" nvidia-settings -a [gpu:0]/GPUPowerMizerMode=2) &

GPU usage monitoring

watch -d -n 1 nvidia-smi

GWE GUI to control cooling and overclock of nVidia cards flatpak run com.leinardi.gwe –hide-window

/usr/lib/modprobe.d/zz-nvidia-modeset.conf
options nvidia_drm modeset=0
/etc/mkinitcpio.conf
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

Andreas Bauer. All rights reserved.

Feral gamemode

How to install and use Feral gamemode




pacman -S meson systemd git dbus
git clone https://github.com/FeralInteractive/gamemode.git
./bootstrap.sh
systemctl --user status gamemoded.service
git clone https://github.com/gicmo/gamemode-extension.git
./make-zip.sh install
gamemoded -v
gamemoded -s

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

You must manually request GameMode when running the game.
This can be done by launching the game through gamemoderun gamemoderun ./game
Or edit the Steam launch options gamemoderun %command%
Lutris find /usr/ -name libgamemodeauto.so
Lutris Values

Key = LD_PRELOAD
Value = /usr/lib/libgamemodeauto.so

Andreas Bauer. All rights reserved.

MangoHud

How to install and use the MangoHud overlay layer for monitoring system performance in Vulkan and OpenGL applications




yay -Syu mangohud lib32-mangohud

Start a game with overlay

mangohud /path/to/app

For Lutris games, go to the System options in Lutris (make sure that advanced options are enabled) and add this to the Command prefix setting

mangohud

For Steam games, you can add this as a launch option

mangohud %command%

Or alternatively, add MANGOHUD=1 to your shell profile (Vulkan only).