Can I modify the script of jetson_clocks.sh ?

hello,
In tx1,I run the script of jetson_clocks.sh to raise cpu and gpu clock.
But it print “Error: Please run the script afer 36 seconds,otherwise ubuntu init script may override the clock settings!” .
Then I find there is a line “check_uptime” in main function,which allow running jetson_clocks.sh when the value of “/proc/uptime” is greater than 90. Does the clock of cpu and gpu could be raised when I commit out the line “check_uptime” ?

[b]check_uptime()
{
if [ -e “/proc/uptime” ]; then
uptime=cat /proc/uptime | cut -d '.' -f1

if [ $((uptime)) -lt 90 ]; then
    printf "Error: Please run the script after $((90 - uptime)) Seconds, \

\notherwise ubuntu init script may override the clock settings!\n"
exit -1
fi
else
printf “Warning: Could not check system uptime. Please make sure that you run the script 90 Seconds after bootup,
\notherwise ubuntu init script may override the clock settings!\n”
fi
}

main ()
{
check_uptime
[ whoami != root ] && echo Error: Run this script(0\) as a root user && exit 1 … do_cpu do_hotplug do_clusterswitch do_gpu do_emc do_fan } main @[/b]

Thank you very much!

Hi 2284810331,

What BSP are you using? If you use Rel-28.2 DP, this limitation is already took off.

Hi WayneWWW,

Sorry, I don’t know what BSP is. But the version of kernel source and root-filesystem is R24.2.1 .

1.In tx1, the content of /home/ubuntu/.profile :

cd /home/ubuntu/
chmod 777 start.sh
./start.sh &

2.the content of /home/ubuntu/start.sh :
cd /home/ubuntu/
echo “ubuntu” | sudo -S ./jetson.sh

3.the content of /home/ubuntu/jetson.sh :

main ()
{
#check_uptime

[ whoami != root ] && echo Error: Run this script(0\) as a root user && exit 1 … do_cpu do_hotplug do_clusterswitch do_gpu do_emc do_fan } main @

4.Restart tx1, #./tegrastats
RAM 722/3998MB (lfb 698x4MB) cpu [0%,0%,0%,0%]@1734 GR3D 0%@998 EDP limit 0
RAM 722/3998MB (lfb 698x4MB) cpu [3%,0%,1%,0%]@1734 GR3D 0%@998 EDP limit 0
RAM 723/3998MB (lfb 698x4MB) cpu [0%,6%,1%,0%]@1734 GR3D 0%@998 EDP limit 0
RAM 723/3998MB (lfb 698x4MB) cpu [6%,2%,4%,7%]@1734 GR3D 0%@998 EDP limit 0
RAM 721/3998MB (lfb 698x4MB) cpu [3%,15%,2%,1%]@1734 GR3D 0%@998 EDP limit 0


BSP is the driver released by us. On rel-24.2.1, there was a service that will overwrite you cpu clock in system boot up period, that is why it needs to wait 90 sec. However, on rel-28.1, there is no such service now, so the time limit is removed.

The first 3 steps automatically run jetson.sh on TX1 at startup.

I want to know if the operation above has raised it to the maximum frequency.
And is there bug after TX1 startup?

I can only tell you that it is not guaranteed if you comment out “check_uptime”. The reason is in #4.

Hi WayneWWW,

Thank you very much!

I commit out “check_uptime” because the jetson_clocks.sh coud be run after tx1 start 90 seconds.
I have to raise frequence to max frequence on tx1 at startup,
but my project don’t permit the delay of 90 seconds.
How to raise frequence on tx1 at startup without delay 90 seconds?

Thank you very much for your guidance.