Last active
December 26, 2024 10:25
-
-
Save srlemke/5a2a3528e4c3949c97957d5d647f1a52 to your computer and use it in GitHub Desktop.
6900XT gamemode settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install: mangohud gamemode | |
#You need to unlock the card for over/under-clocking work, add this as grub boot kernel argument: | |
amdgpu.ppfeaturemask=0xffffffff | |
#In OpenSUSE: | |
vim /etc/default/grub | |
GRUB_CMDLINE_LINUX_DEFAULT="mitigations=off amdgpu.ppfeaturemask=0xffffffff security=apparmor" | |
#Create and secure 1 directory to store 2 scrips: | |
mkdir /usr/bin/scripts/ | |
chmod 700 /usr/bin/scripts | |
chmod 700 /usr/bin/scripts/* | |
#script1: | |
#Double check your cardid, it usually is card0 or card1, in my example its card1, adjust script accordingly | |
simrig:/usr/bin/scripts # cat undervolt-gamemode-before.sh | |
#!/bin/bash | |
#The bellow is the underwolt line: | |
echo "vo -80" > /sys/class/drm/card1/device/pp_od_clk_voltage | |
echo "c" > /sys/class/drm/card1/device/pp_od_clk_voltage | |
#4 is the best performant one (VR) | |
echo "4" > /sys/class/drm/card1/device/pp_power_profile_mode | |
#fan: | |
echo "1" > /sys/class/drm/card1/device/hwmon/hwmon0/pwm1_enable | |
echo "162" > /sys/class/drm/card1/device/hwmon/hwmon0/pwm1 | |
simrig:/usr/bin/scripts # | |
#script2: | |
simrig:/usr/bin/scripts # cat undervolt-gamemode-after.sh | |
#!/bin/bash | |
echo "c" > /sys/class/drm/card1/device/pp_od_clk_voltage | |
echo "low" > /sys/class/drm/card1/device/power_dpm_force_performance_level | |
echo "2" > /sys/class/drm/card1/device/pp_power_profile_mode | |
cpupower frequency-set -g powersave | |
#fan: | |
echo "1" > /sys/class/drm/card1/device/hwmon/hwmon0/pwm1_enable | |
echo "96" > /sys/class/drm/card1/device/hwmon/hwmon0/pwm1 | |
simrig:/usr/bin/scripts # | |
cp /usr/share/doc/packages/gamemoded/gamemode.ini /etc/ | |
vim /etc/gamemode.ini | |
[custom] | |
; Custom scripts (executed using the shell) when gamemode starts and ends | |
#start=notify-send "GameMode started" | |
start=sudo /usr/bin/scripts/undervolt-gamemode-before.sh | |
#end=notify-send "GameMode ended" | |
end=sudo /usr/bin/scripts/undervolt-gamemode-after.sh | |
#Since the scripts run with sudo, add at the last visudo line: | |
slemke ALL=(root) NOPASSWD: /usr/bin/scripts/* | |
#Install mangohud | |
Start game on steam with: | |
gamemoderun mangohud %command% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment