Created
June 4, 2016 22:31
-
-
Save nerdralph/fbb03aa403b36b9d1d44e7263febd290 to your computer and use it in GitHub Desktop.
script to set clocks on AMD GPUs
This file contains 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
1150,1500 R7 370 | |
820,1500 380 | |
1150,1250 67B1 |
This file contains 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
#!/bin/bash | |
# public domain software by Nerd Ralph - 2016 | |
# params = clocks & ID string from aticonfig --lsa | |
setclocks() | |
{ | |
local clocks=$1; shift # core,mem clocks | |
cardid="$@" | |
#echo setting $cardid adapters to $clocks | |
local adapters=`aticonfig --lsa | grep "$cardid" | cut -c 3` | |
for card in $adapters | |
do | |
#echo set adapter $card | |
aticonfig --od-enable --adapter=$card --odsc $clocks | |
done | |
} | |
export DISPLAY=:0 | |
xhost + | |
# clocks.txt must contain lines of core,mem and card ID string | |
IFS=$'\n' | |
for config in `cat clocks.txt` | |
do | |
unset IFS | |
echo config: $config | |
setclocks $config | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment