Skip to content

Instantly share code, notes, and snippets.

@tstellanova
Forked from allanmac/tk1_gpu_max_clock.sh
Created August 13, 2014 21:09
Show Gist options
  • Save tstellanova/b5dca98b2181c6575034 to your computer and use it in GitHub Desktop.
Save tstellanova/b5dca98b2181c6575034 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Lock GPU and MEM clocks to max MHz
#
# - benchmarking shows there is no need to override the MEM clock
#
echo
echo Locking GPU clock to max MHz for debugging porpoises...
# set to max
cat /sys/kernel/debug/clock/override.gbus/max > /sys/kernel/debug/clock/override.gbus/rate
# cat /sys/kernel/debug/clock/override.emc/max > /sys/kernel/debug/clock/override.emc/rate
# enable override
echo 1 > /sys/kernel/debug/clock/override.gbus/state
# echo 1 > /sys/kernel/debug/clock/override.emc/state
echo
echo " __ "
echo " _.-~ ) GPU:" $[ $(</sys/kernel/debug/clock/gbus/rate) / 1000000] MHz
echo " _..--~~~~,' ,-/ _ "
echo " .-'. . . .' ,-',' ,' ) "
echo " ,'. . . _ ,--~,-'__..-' ,' "
echo " ,'. . . (@)' ---~~~~ ,' "
echo " /. . . . '~~ ,-' "
echo " /. . . . . ,-' "
echo " ; . . . . - . ,' "
echo " : . . . . _ / "
echo " . . . . . \`-.: "
echo " . . . ./ - . ) "
echo " . . . | _____..---.._/ _____ "
echo " ~---~~~~----~~~~ ~~ "
echo
#!/bin/bash
#
# Halt USB autosuspend
#
sudo bash -c 'echo -1 > /sys/module/usbcore/parameters/autosuspend'
#
# Lock K1 GPU to max MHz
#
sudo ./tk1_gpu_max_clock.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment