AdelKS / LinuxGamingGuide

Linux Gaming Guide - An incomplete compilation of things I came across that may improve your gaming experience on Linux
387 stars 16 forks source link

My additions to this guide #11

Open Nama opened 8 months ago

Nama commented 8 months ago

Hi, like this guide and I observed some things, too.

#!/bin/bash

export WAYLAND_DISPLAY="wayland-1"
export SWAYSOCK=$(ls /run/user/1000/sway-ipc.1000.*.sock)

if [[ "$1" == "on" ]]; then
    sudo /home/yama/scripts/perf_mode.sh gaming
    swaymsg output DP-3 mode 3440x1440@144Hz
    sleep 1
    gpu-screen-recorder -w DP-3 -f 60 -q medium -r 20 -k h264 -c mp4 -ac aac -a "$(pactl get-default-sink).monitor" -o /mnt/data/downloads/clips -v no -sc /home/yama/scripts/clip_upload.sh  > /tmp/gamemode.log 2>&1 &
else
    pkill -f gpu-screen-recorder
    swaymsg output DP-3 mode 3440x1440@60.001Hz
    sudo /home/yama/scripts/perf_mode.sh
fi

#!/bin/bash

# power profile
echo manual > /sys/class/drm/card0/device/power_dpm_force_performance_level
if [[ $1 == "gaming" ]]; then
    echo 1 > /sys/class/drm/card0/device/pp_power_profile_mode
    echo "vo 0" > /sys/class/drm/card0/device/pp_od_clk_voltage
else
    echo 2 > /sys/class/drm/card0/device/pp_power_profile_mode
    echo "vo -100" > /sys/class/drm/card0/device/pp_od_clk_voltage
fi
echo "c" > /sys/class/drm/card0/device/pp_od_clk_voltage

AdelKS commented 8 months ago

Hello! Thanks for your feedback !

X11/Wayland

Yeah I agree with you, it's not clear in the guide that Wayland works without issues (through XWayland). I have yet to benchmark any added input lag because of that vs Xorg.

Maybe add in here, that smaller (not bloated) distros will probably perform better

I think "bloat" in other distros is actually not running, just on the disk. Except if you have clear examples of ditros running useless services (maybe snapd on Ubuntu haha).

Could put infos about the ryzen optimized kernels there (easier to install on arch)

I think that march-optimized kernels provide <1% perf improvement, because in the end the linux kernel does not use SIMD instructions by design (so no AVX). Therefore, only the timings tuning (the -mtune compiler flag) actually makes a difference. Not worth the hassle I would argue, but yeah. Those links are Arch specific too.

Game mode (why is this under kernel?)

I put it under kernel because it does kernel-level tweaks. No strong opinion about that placement though

Replay sorcery is a dead project and doesn't work on wayland

Thanks for the heads up, will update

I couldn't find a tool to dynamically switch between graphics card performance modes

I am not sure it makes a huge difference, but it's definitely worth talking about it in the guide.

gpu-screen-recorder works very nicely

nice to see new tools !

Please add SteamTinkerLaunch

Noted!

Nama commented 8 months ago

it's not clear in the guide that Wayland works without issues (through XWayland).

Exactly, the guide reads like that wayland is not a viable option. But it is.

I have yet to benchmark any added input lag because of that vs Xorg.

Phoronix does some tests. Couldn't find an input lag test, tho. https://www.google.com/search?q=site%3Aphoronix.com+wayland+xorg

(maybe snapd on Ubuntu haha)

:smirk:

I am not sure it makes a huge difference, but it's definitely worth talking about it in the guide.

Just mentioning, so readers understand their options. My PC is not for gaming only, thats why I look into power saving while not gaming.