Jetson_clocks only works when started > 60 seconds after boot - why?

I’ve just created a simple systemd service to automatically start jetson_clocks on boot. but it does not work unless I include a delay of greater than 60 seconds. Why is this?

[Unit]
Description=Jetson Clocks
After=network.target

[Service]
Type=oneshot
ExecStartPre=/bin/sleep 65
ExecStart=/bin/bash -c /usr/bin/jetson_clocks

[Install]
WantedBy=multi-user.target

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Nano / NX
• DeepStream Version 5.0 GA

Hi,
For information, do you see CPU clocks not being set to max? Or GPU, EMMC? We have seen CPU clocks be overwritten in r24 and handled it in r28:

r32 is with new kernel version and probably needs similar handle.

I’m on Jetpack 4.4 (L4T 32.4.3) and still have the issue that it needs to wait > 60 seconds after boot.

I notice that @rbonghi has some notes that this is still the case in his jetson_stats package as well.

Hi,
Is the issue observed if you immediately execute sudo jetson_clocks once booting to Ubuntu desktop? Or only happens if you run it in a system service?

Using a systemd service. so long as I had ExecStartPre=/bin/sleep 65 then it works fine. I just wanted to know why its necessary?

Hi,

What will happen if you just run jetson clocks in < 60 second?

I mean what is your definition to say “not work”. Does any error return? or the clocks are not in correct value?

Nothing happens when I run it in the systemd service without the 60+ seconds delay. Using jtop (uses tegrastats) I can see that the clock speeds on cpu and gpu have not increased.

I don’t care about the delay as I have a working solution. The point of this post is to simply ask why it needs a delay. If there is no reason and it’s just something weird with my nano the it can be closed.

Just speculation: If “/sys” is not yet mounted, or if the other CPU cores are not yet enabled (it starts with only CPU0), then it wouldn’t be possible (yet) to interact with non-CPU0 cores in any way.

Hi,
r28 releases are with Ubuntu 16.04 and we have a patch to disable CPU ondemand service. r32 releases are with Ubuntu 18.04 and probably the way of setting CPU ondemand is changed and the patch does not take effect. We will check this.Thanks for raising it up.

@jasonpgf2a

You need to start jetson_clocks after nvpmodel service. The GPU devfreq nodes are emulated only after nvpmodel service. The jetson_clocks would fail if CPU/GPU devfreq nodes are not present.

[Unit]
Description=Jetson Clocks
After=nvpmodel.service

[Service]
Type=oneshot
ExecStart=/bin/bash -c /usr/bin/jetson_clocks

[Install]
WantedBy=multi-user.target

2 Likes

Excellent - this is what I was after - thanks @rkasirajan.

1 Like