KB 090825 - How to Set NVIDIA GPU Power Limit on Ubuntu using nvidia-smi

KB 090825 - How to Set NVIDIA GPU Power Limit on Ubuntu using nvidia-smi

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

ComponentDescription
OSUbuntu or compatible Linux distribution
ToolsNVIDIA proprietary drivers, nvidia-smi utility
AccessTerminal access, sudo/root privileges


1. Check Current Power Limits

To see current power usage and limits:
  1. $ nvidia-smi -q -d POWER

This command shows:

  • Current Power Limit

  • Default Power Limit

  • Minimum and Maximum Power Limits

📝 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):

  1. $ sudo nvidia-smi -pl 200

 You must have root privileges to change power settings.


3. Confirm the New Settings

Verify the change with:

  1. $ nvidia-smi -q -d POWER

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

  1. $ sudo nano /etc/systemd/system/nvidia-power-limit.service

Paste the following content:


  1. [Unit]
  2. Description=Set NVIDIA GPU Power Limit
  3. After=multi-user.target


  4. [Service]
  5. Type=oneshot
  6. ExecStart=/usr/bin/nvidia-smi -pl 200

  7. [Install]
  8. WantedBy=multi-user.target

Step 4.2: Enable the service


  1. $ 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 ...
    • Popular Articles

    • CP Plus Camera and NVR Configuration

      NVR Configuration The CP Plus Pro Series of NVRs have been meticulously designed for providing you with upgraded performance and higher recording quality in your IP video surveillance solution. The robust processor that has been inculcated in this ...
    • KB 775235 - Kerberos Authentication – Overview

      What is Kerberos? Kerberos is a secure authentication method used in our Active Directory (AD) environment (mbuzztech.com). It allows users to: Access multiple systems without re-entering passwords (Single Sign-On – SSO) Log in once Where We Use It ...
    • How to Remove and Reinstall NVIDIA Drivers on Ubuntu

      This article provides step by step guide to completely remove existing NVIDIA drivers and reinstall specific version of the NVIDIA driver on the Ubuntu system Prerequisites Administrative (sudo) access to the Ubuntu system. Internet access to ...
    • KB 692001 - Personal Computers and Servers - Classification and Point of Contact

      We can classify the computers that MBUZZ handles based on their form-factor as below: Tower Workstations, Desktops, Gaming PCs and SFF (Small form factor) PCs fall under this category. These are computers people would use on a desk and rarely move. ...
    • KB 298031 - M.2 SSD Tier List

      The sequential read and write speeds, which are usually the most advertised number, are not a proper benchmark of real-world performance or the quality of an SSD. This article categorizes and tiers SSDs based on factors like the type of NAND flash, ...