Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

System Optimizations (Gaming)
#1
Lightbulb 

I got inspired to do this, since im a gamer coming from windows. I had a lot of stutter and finally got rid of them. And here is what i did.

This is mainly for Intel/Nvidia hardware, if you are running AMD you need to remove the intel grub boot parameters and remove some # inside "/etc/environment" that are AMD specific.

Note :
Quote: This worked for me, experience may vary keep that in mind, and it would be safer if you made a backup before attempting this as it might cause breakages..

- Install dependencies
sudo pacman -S meson systemd git dbus

- Install gamemode
sudo pacman -S gamemode

- Custom Proton
cd ~
wget https://raw.githubusercontent.com/Termuellinator/ProtonUpdater/master/cproton.sh
chmod +x cproton.sh
./cproton.sh

- Linux-CK Kernel
yay -S linux-ck

choose corresponding number for these. example 1 2.
Quote:aur/linux-ck-headers
aur/linux-ck

- Kernel Boot parameters
sudo nano /etc/default/grub

- Edit GRUB_CMDLINE_LINUX_DEFAULT

GRUB_CMDLINE_LINUX_DEFAULT='fsck.mode=skip quiet loglevel=0 zswap.enabled=0 nvidia-drm.modeset=1 usbhid.mousepoll=1 tsc=reliable clocksource=tsc cryptomgr.notests initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp nowatchdog nvme_load=yes cpuidle.off=1 intel_idle.max_cstate=0 cpufreq.off=1 processor.max_cstate=0 processor_idle.max_cstate=0 intel_pstate=disable rcupdate.rcu_cpu_stall_suppress=1 idle=poll rd.systemd.show_status=false libahci.ignore_sss=1'

- Tweak /etc/environment
sudo nano /etc/environment

EDITOR=nano
#
# 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
#AMD_VULKAN_ICD="RADV"
#QT_QPA_PLATFORMTHEME="qt5ct"
#MOZ_ENABLE_WAYLAND=1

# Enable AMD ACO shader compiler threading
mesa_glthread=true

# 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.
#VDPAU_DRIVER="radeonsi"

# Enable rendering. Still in development, will probably crash!
#VKD3D_CONFIG=dxr11
#VKD3D_CONFIG=dxr

# 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.
VKD3D_CONFIG=force_static_cbv

# Enable DLSS. This is still fairly new.
PROTON_ENABLE_NVAPI=1
PROTON_HIDE_NVIDIA_GPU=0

# 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
PRIMUS_SYNC=2

# 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.
__GL_SHADER_DISK_CACHE=1
#__GL_SHADER_DISK_CACHE_PATH=/var/cache/shaders

# Enable threaded optomisation for OpenGL.
__GL_THREADED_OPTIMIZATION=1

- Modify "/etc/drirc"
sudo nano /etc/drirc

Then paste inside
<driconf>
  <device>
      <application name="Default">
          <option name="vblank_mode" value="0" />
      </application>
  </device>
</driconf>

- Edit "/etc/sysctl.d/80-gamecompatibility.conf"

sudo nano /etc/sysctl.d/80-gamecompatibility.conf

Put the following inside
vm.max_map_count = 2147483642

- Edit /etc/tmpfiles.d/consistent-response-time-for-gaming.conf
sudo nano /etc/tmpfiles.d/consistent-response-time-for-gaming.conf

And put the following inside
#    Path                  Mode UID  GID  Age Argument
w /proc/sys/vm/compaction_proactiveness - - - - 0
w /proc/sys/vm/min_free_kbytes - - - - 1048576
w /proc/sys/vm/swappiness - - - - 10
w /sys/kernel/mm/lru_gen/enabled - - - - 5
w /proc/sys/vm/zone_reclaim_mode - - - - 0
w /sys/kernel/mm/transparent_hugepage/enabled - - - - never
w /sys/kernel/mm/transparent_hugepage/shmem_enabled - - - - never
w /sys/kernel/mm/transparent_hugepage/khugepaged/defrag - - - - 0
w /proc/sys/vm/page_lock_unfairness - - - - 1
w /proc/sys/kernel/sched_child_runs_first - - - - 0
w /proc/sys/kernel/sched_autogroup_enabled - - - - 1
w /proc/sys/kernel/sched_cfs_bandwidth_slice_us - - - - 500
w /sys/kernel/debug/sched/latency_ns  - - - - 1000000
w /sys/kernel/debug/sched/migration_cost_ns - - - - 500000
w /sys/kernel/debug/sched/min_granularity_ns - - - - 500000
w /sys/kernel/debug/sched/wakeup_granularity_ns  - - - - 0
w /sys/kernel/debug/sched/nr_migrate - - - - 8

- Optional, if you want zram
yay -S zram-generator

Select the newest package and tweak zram like this
sudo nano /etc/sysctl.d/99-vm-zram-parameters.conf

And put the following inside
vm.swappiness = 180
vm.watermark_boost_factor = 0
vm.watermark_scale_factor = 125
vm.page-cluster = 0

Thats all folks

Hopefully this improves performance for you.
[-] The following 1 user says Thank You to Fast0ne for this post:
  • DarkXero
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)