API for `nvpmodel`?

Hello!

I am working on an embedded system running Jetpack on the Xavier NX. I would like to be able to manage the power mode of the device from my C application based on application-level parameters. Is there any way to hook into the underlying API of nvpmodel to switch the power mode, or are using the GUI or the nvpmodel command line tool the only 2 options (they were all I could find in the documentation)?

Thanks,
Patrick

hello pwolfe1,

please check this session, Supported Modes and Power Efficiency.
you’re able to toggle different power modes with the kernel commands,
thanks

Hey Jerry! Thanks for the response. Is there an API I can call from C code rather than doing a shell call from my application? I may be missing something (apologies if so) but I only see documentation for /usr/sbin/nvpmodel commands and the GUI in that section.

hello pwolfe1,

you may refer to exec(3) - Linux manual page
please have a try as following, exec("/usr/sbin/nvpmodel"...)

1 Like

Also realize that files in “/sys” can be directly opened for read and/or write (depending on the file). No separate shell. You’d simply need to know what files in “/sys” the nvpmodel program uses, and what arguments might be written.

1 Like

Thanks, this is along the lines of what I’m looking for.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.