Skip to content

Instantly share code, notes, and snippets.

@allanmac
Last active August 14, 2017 13:25
Show Gist options
  • Save allanmac/c432b0fbfa4814f51d80 to your computer and use it in GitHub Desktop.
Save allanmac/c432b0fbfa4814f51d80 to your computer and use it in GitHub Desktop.
Some login tweaks for L4T 19.3 to disable USB autosuspend and lock the GPU to max MHz. I have lines 3-11 of tk1_tweaks.sh appended to my .profile.
#!/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
@allanmac
Copy link
Author

Debugging porpoises

@HellMood
Copy link

dolphantastic ^^

@doixanh
Copy link

doixanh commented Jul 21, 2016

I only logged into say that you saved my headless TK1 :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment