TX2 autostart applictaion failed

background:TX2 Jetpack4.2
I use autostart appliction to start jetpack_clock.sh, it doesn’t work, I have no way of knowing what happened.
question:1.How to automatically turn on the start jetpack_clock.shduring startup
2.if autostart failed, how to get error infomation


I think you are talking about jetson_clock.sh but not jetpack_clock.sh, right?

In rel-32.x (jetpack4.2), there is no jetson_clock.sh anymore. Instead, it becomes a binary under /ust/bin/jetson_clocks.

I know it’s in /usr/bin,I want it to start automatically on startup. I used a method in the connection https://websiteforstudents.com/set-apps-to-auto-startup-at-logon-on-ubuntu-17-10-18-04/, it doesn’t work, and don’t output any error information.

or you could try to add this in /etc/profile.

This method cannot be used and the system will not start.

Until the system reaches a stage of boot where “/sys” access exists this won’t work. The “/sys” files (or the drivers associated with the files) will not have initialized. If you are ok with a delay, then you could add something like this near the end of “/etc/rc.local” as the last entry (there are a number of ways to do this, this is just one simplified example):

sleep 30;/usr/bin/jetson_clocks

If you wanted a more “proper” fix, then you might learn about systemd and add a correct entry somewhere in “/etc/systemd/”, and associated with that entry, have a requirement (name a dependency prerequisite) for some other service which might indicate boot is far enough along, e.g, graphical.target.

Description=maximum performance

ExecStart=/bin/bash -c “/bin/echo 123 | /usr/bin/sudo -S /usr/bin/jetson_clocks”

thank you very mach, The above systemd unit configuration works