Prevent sleeping on Jetson Nano

I am running a Python script on startup using the /etc/profile.d/bash_completion.sh, however, despite setting the computer to never sleep through the GUI settings, the Jetson seems to still go to sleep.

What could be causing this? How can I prevent it?

I just set it through the GUI setting and it does not go to sleep.

May I know how do you set it to never sleep?

bash_completion.sh shouldn’t be used to run something on startup.

More on those files:

http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html

/etc/profile.d scripts are executed every time a bash shell is started by any user.

Instead, use a systemd unit to run your script.

Note on that link: your script should probably live in /usr/local/bin and not in /home/whoever or similar. You can also specify the user a script runs as if that matters to you (default is root)

As to sleep and display off, it should work fine, exactly as on x86 Ubuntu. Note that console blacking is a separate setting set a the kernel command line.