Managing the power consumption of your NVIDIA GPU on Ubuntu is a practical way to optimize energy efficiency, especially for workloads that do not require full GPU performance. This guide explains how to check and set power limits for your NVIDIA GPU and how to make those settings persistent across reboots.
Requirements
1. Check Current Power Limits
To see current power usage and limits:
This command shows:
📝 Note: Always choose a value within the allowed min/max limits.
2. Set a New Power Limit
To apply a new power cap (e.g., 200W):
$ sudo nvidia-smi -pl 200
You must have root privileges to change power settings.
3. Confirm the New Settings
Verify the change with:
Ensure that the Current Power Limit now reflects your desired value.
4. Make the Power Limit Persistent (Optional)
Power limit changes do not persist after a reboot by default. To make it permanent:
Step 4.1: Create a systemd service
$ sudo nano /etc/systemd/system/nvidia-power-limit.service
Paste the following content:
[Unit]Description=Set NVIDIA GPU Power Limit
After=multi-user.target
[Service]Type=oneshot
ExecStart=/usr/bin/nvidia-smi -pl 200
[Install]WantedBy=multi-user.target
Step 4.2: Enable the service
$ sudo systemctl enable nvidia-power-limit.service
The service will now run on each boot and apply your configured power limit.
You can modify ExecStart to set different limits or apply settings to specific GPU IDs using nvidia-smi -i <GPU_ID> -pl <WATTS>.
Recent Articles
KB-630208 | How to use Find and Locate to search for files in Linux
Purpose To provide Linux administrators and Field Engineers with guidance on using the find and locate utilities to efficiently search for files and directories within a Linux filesystem based on criteria such as name, type, size, timestamps, ...
KB-630164 | How to use rsync to Synchronize Files
Purpose To provide a clear and practical procedure for using the rsync utility to synchronize files and directories between local systems and remote hosts, including push and pull operations, while preserving file attributes and optimizing data ...
KB-630107 | How to create a Linux swap file
Purpose To provide Field Engineers and Linux administrators with a standardized procedure for creating, configuring, and validating a Linux swap file. This procedure helps ensure sufficient virtual memory is available when physical RAM is exhausted ...
MSI All-in-One (AIO) PC – Physical Damage Policy for Warranty Claims
MSI All-in-One (AIO) PC – Physical Damage Policy for Warranty Claims MSI's standard warranty does not cover physical or accidental damage to an All-in-One (AIO) PC. If the damage is determined to be caused by external factors rather than a ...
KB 134833 - Troubleshooting NVSM Alert NV-CPU-XX – Unrecoverable CPU Internal Error
Purpose This document provides a general troubleshooting procedure for the NVIDIA System Management (NVSM) alert NV-CPU-XX, which indicates that a CPU has reported an internal error. The article outlines how to verify whether the alert represents an ...