NVIDIA TK1高性能模式开启脚本

参考:https://elinux.org/Jetson/Performance#How_to_run_a_command_with_root_privileges_temporarily_or_on_every_bootup

  1. 首先创建一个performance.sh的脚本,如下:
#!/bin/bash

echo '0'|sudo tee /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable

g_ONLINE="$(cat /sys/devices/system/cpu/cpu0/online)";
if [[ "${g_ONLINE}" != '1' ]]; then
  echo '1' |sudo tee /sys/devices/system/cpu/cpu0/online
fi

g_ONLINE="$(cat /sys/devices/system/cpu/cpu1/online)";
if [[ "${g_ONLINE}" != '1' ]]; then
  echo '1' |sudo tee /sys/devices/system/cpu/cpu1/online
fi

g_ONLINE="$(cat /sys/devices/system/cpu/cpu2/online)";
if [[ "${g_ONLINE}" != '1' ]]; then
  echo '1' |sudo tee /sys/devices/system/cpu/cpu2/online
fi

g_ONLINE="$(cat /sys/devices/system/cpu/cpu3/online)";
if [[ "${g_ONLINE}" != '1' ]]; then
  echo '1' |sudo tee /sys/devices/system/cpu/cpu3/online
fi

# GPU to the highest performance mode
echo 'performance'|sudo tee  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 852000000|sudo tee  /sys/kernel/debug/clock/override.gbus/rate
echo 1|sudo tee /sys/kernel/debug/clock/override.gbus/state

  1. 将启动脚本放到/home/ubuntu/ 即根目录下,并设置权限。
chmod 777 /home/ubuntu/performance.sh
  1. 将启动性能脚本的命令放入到/etc/rc.local的最前面;
    如下:
echo 'ubuntu'|sudo -S  /home/ubuntu/performance.sh
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值