Best way to manage TX2 power mode?

What’s the best way to set the power mode on a TX2? Nvidia outlines the process here. But I’m not sure how this applies to Balena + Resin OS
.

Hi there.
Welcome to the forums!
In order to set the power mode on a TX2 you follow the instructions and use the commands that are described in the Nvidia link and you have to make sure that you run the containers in a privileged mode so that your application will have the necessary permissions to make that changes. Read here how to Interact with hardware
Moreover, make sure that you run your application on startup.

And since you are using a Nvidia Jetson TX2 you may also find useful this guide from our documentation.

Georgia

Great thanks! I love balena - great product very developer focused!

One point of clarification. I would want to do this as a command at run time in one of my containers (that is in privileged mode) vs in the dockerfile correct?

Thanks!

Hi

The privilege mode is set in the top level docker-compose file in case of a multicontainer application. If you have a single container then that is a privileged container anyways.

In the dockerfile for the service, you can run commands in the dockerfile itself, or usually folks will execute a bash file from the dockerfile where you will run whatever commands you want to run. Both methods should work fine.