User Tools

Site Tools


scripts:max_performance
sudo -e '/usr/local/bin/max-perf.sh' && sudo chmod +x '/usr/local/bin/max-perf.sh'
#!/usr/bin/bash

echo ''
echo '~~~~~~~~~~~~'
echo 'GPU Scaling'
echo '~~~~~~~~~~~~'
echo ''
echo 'Enabling GPU scaling...'
xrandr --output 'HDMI-1' --set 'scaling mode' 'Full aspect'
echo 'Done'

echo ''
echo '~~~~~~~~~~~~'
echo 'CPU Governor'
echo '~~~~~~~~~~~~'
echo ''
echo 'Setting performance governor...'
sudo cpupower frequency-set --governor 'performance' > '/dev/null'
echo 'Done'

echo ''
echo '~~~~~~~~~~~~'
echo 'AMD GPU Power Limit'
echo '~~~~~~~~~~~~'
echo ''
echo 'Current Power Limit:' "$(cat '/sys/class/drm/card0/device/hwmon/hwmon'*'/power1_cap')"
echo 'Max Power Limit:' "$(cat '/sys/class/drm/card0/device/hwmon/hwmon'*'/power1_cap_max')"
echo ''
echo 'Setting Max Power Limit...'
echo "$(cat '/sys/class/drm/card0/device/hwmon/hwmon'*'/power1_cap_max')" | sudo tee '/sys/class/drm/card0/device/hwmon/hwmon'*'/power1_cap' > '/dev/null'
echo 'Done'
echo ''
echo 'New Power Limit:' "$(cat '/sys/class/drm/card0/device/hwmon/hwmon'*'/power1_cap')"

echo ''
echo '~~~~~~~~~~~~'
echo 'Maximum performance activated!'
echo '~~~~~~~~~~~~'

sync
sleep 5
gnome-terminal -- sh -c '/usr/local/bin/max-perf.sh'
scripts/max_performance.txt · Last modified: 2021/11/04 21:01 by Sean Rhone