Skip to content

Instantly share code, notes, and snippets.

@nerdralph
Created June 4, 2016 22:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nerdralph/fbb03aa403b36b9d1d44e7263febd290 to your computer and use it in GitHub Desktop.
script to set clocks on AMD GPUs
1150,1500 R7 370
820,1500 380
1150,1250 67B1
#!/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