How do I configure a custom power consumption mode as the default in an image?
When compiling the image, I add custom power consumption mode 2 to the /etc/nvpmodel.conf file, set PM_CONFIG DEFAULT=2, and install it as a separate deb package patch into the image.
However, after the device is flashed and booted, the system power consumption mode remains 1 (120W). The custom power consumption mode only takes effect using the command nvpmodel -m 2. How can I use the custom power consumption mode by default when building the image?
Are you sure the nvpmodel content in this situation is really that one you want to use?
Are you sure nvpmodel behavior follows what you want before you reflash?
Customize your flashing image based on the Thor SDK. The default setting is 120W, with PM_CONFIG DEFAULT=1.
Add custom power mode 2 (60W) to the nvpmodel_p3834_0008.conf file and set PM_CONFIG DEFAULT=2.
/etc/nvpmodel.conf → /etc/nvpmodel/nvpmodel_p3834_0008.conf
Create a deb package for the second step and install it in your custom flashing image.
Flash the image to the device and start it. The changes in the nvpmodel_p3834_0008.conf file are correct, with PM_CONFIG DEFAULT=2, but the actual power mode is 120W.
Use the nvpmodel -m 2 command. A system reboot is required for mode 2 to take effect, but you’d prefer to enable mode 2 without a reboot after the first flash.
After deleting the /var/lib/nvpmodel/status file and restarting the system, the default configuration in /etc/nvpmodel.conf did not take effect. Instead, it caused the following problem:
nvpmodel -q
NVPM WARN: power mode is not set!
$ sudo systemctl status nvpmodel.service
× nvpmodel.service - nvpmodel service
Loaded: loaded (/etc/systemd/system/nvpmodel.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-10-09 14:43:21 CST; 17s ago
Main PID: 1630 (code=exited, status=234)
CPU: 11ms
Oct 09 14:43:22 tegra-ubuntu-mos nvpmodel.sh[1631]: NVPM WARN: Reboot required for changing to this power mode: 1
Oct 09 14:43:22 tegra-ubuntu-mos nvpmodel.sh[1631]: NVPM WARN: DO YOU WANT TO REBOOT NOW? enter YES/yes to confirm:
Oct 09 14:43:22 tegra-ubuntu-mos nvpmodel.sh[1631]: NVPM ERROR: bad input!
Oct 09 14:43:22 tegra-ubuntu-mos nvpmodel.sh[1631]: NVPM ERROR: optMask is 2, no request for power mode
Oct 09 14:43:21 tegra-ubuntu-mos systemd[1]: Starting nvpmodel.service - nvpmodel service…
Oct 09 14:43:21 tegra-ubuntu-mos systemd[1]: nvpmodel.service: Main process exited, code=exited, status=234/n/a
Oct 09 14:43:21 tegra-ubuntu-mos systemd[1]: nvpmodel.service: Failed with result ‘exit-code’.
Oct 09 14:43:21 tegra-ubuntu-mos systemd[1]: Failed to start nvpmodel.service - nvpmodel service.