Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Set NVIDIA GPU Power Limits on Linux

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Setting a power limit on your NVIDIA GPU under Linux lets you cap its maximum power draw, which reduces heat, fan noise, and power consumption while often only slightly lowering performance. This is useful for quiet PCs, small form factor builds, or when you want to extend the lifespan of your card. You can set a temporary limit that resets on reboot, or a persistent one via a systemd service. Before you start, you need an NVIDIA GPU, the proprietary NVIDIA driver installed, and administrative (sudo) access.

What You'll Need

  • An NVIDIA GPU with the proprietary driver installed (not the open-source Nouveau driver).
  • Linux with root/sudo access.
  • Basic familiarity with the terminal.

Step-by-Step

  1. Check your GPU and driver. Open a terminal and run nvidia-smi. You should see your GPU model, driver version, and current power draw. If the command is not found, install the NVIDIA driver first.
  2. Find the current power limit range. Run nvidia-smi -q -d POWER to display detailed power information, including Min Power Limit, Max Power Limit, and Current Power Limit. Note the maximum value in watts (e.g., 250W).
  3. Choose a target power limit. Pick a value between the minimum and maximum shown. A common choice is 80% of the maximum (e.g., 200W on a 250W card). Lower values reduce heat and noise more, but may impact performance in demanding loads.
  4. Set a temporary power limit. Run: sudo nvidia-smi -pl 200 (replace 200 with your chosen value). This applies immediately but resets after reboot or driver reload. You can verify with nvidia-smi -q -d POWER.
  5. Make the limit persistent (optional but recommended). Create a systemd service to apply the limit at boot. First, create a script file: sudo nano /usr/local/bin/set-gpu-power-limit.sh and add the following lines:
    #!/bin/bash
    nvidia-smi -pl 200
    Make it executable: sudo chmod +x /usr/local/bin/set-gpu-power-limit.sh.
  6. Create a systemd service. Run sudo nano /etc/systemd/system/gpu-power-limit.service and add:
    [Unit]
    Description=Set NVIDIA GPU power limit
    After=multi-user.target
    
    [Service]
    Type=oneshot
    ExecStart=/usr/local/bin/set-gpu-power-limit.sh
    RemainAfterExit=yes
    
    [Install]
    WantedBy=multi-user.target
    Save the file.
  7. Enable and start the service. Run sudo systemctl enable gpu-power-limit.service then sudo systemctl start gpu-power-limit.service. Check that it worked with nvidia-smi -q -d POWER.
  8. Test for stability. Run a GPU stress test (e.g., glxgears or a game) and monitor temperature and power draw with nvidia-smi. If the system crashes or the GPU driver resets, raise the power limit slightly.

Common Mistakes

  • Setting a limit below the minimum. The driver will reject values outside the allowed range. Always check Min Power Limit first.
  • Forgetting sudo. nvidia-smi -pl requires root privileges; without sudo, you get a permission error.
  • Using the wrong GPU index. If you have multiple GPUs, add -i 0 (or the correct index) to target a specific card. Check with nvidia-smi -L.
  • Assuming the limit is permanent. The command alone resets after reboot. Use the systemd service for a persistent setting.
  • Setting too low a limit. Extremely low limits can cause performance drops or driver crashes during heavy loads. Start conservative and adjust.

Tips

  • Use a percentage, not a guess. If you want 80%, calculate: max_power * 0.8. For a 250W card, that's 200W.
  • Monitor with watch. Use watch -n 1 nvidia-smi to see power draw, temperature, and utilization in real time while testing.
  • Combine with fan control. Setting a power limit works well with a custom fan curve for quieter operation.
  • Test different limits. Try 90%, 80%, and 70% to find the best balance for your workload.
  • Remember that overclocking/undervolting can cause instability and may affect warranty. Power limiting is safer, but still test thoroughly.

Troubleshooting

  • “Unable to set Power Limit” error. This usually means the value is outside the allowed range. Run nvidia-smi -q -d POWER and check the min/max values. Also ensure you have the latest NVIDIA driver.
  • Limit resets after reboot. You likely skipped the systemd service step. Re-check the service file for typos and ensure it is enabled (sudo systemctl is-enabled gpu-power-limit.service).
  • GPU driver crashes or system freezes after setting a low limit. Reboot to reset the limit, then try a higher value. Some GPUs are sensitive to very low power caps.
  • nvidia-smi shows “N/A” for power limit. This can happen on some older GPUs or with certain driver versions. Try updating the driver or use the nvidia-smi -pl command anyway—it may still work.
  • Multiple GPUs and wrong one gets limited. Use nvidia-smi -L to list GPUs and add -i <index> to your command (e.g., sudo nvidia-smi -i 1 -pl 200).

Frequently Asked Questions

Does setting a power limit damage my GPU?

No, it is generally safe. The GPU is designed to operate within its power range; you are only capping it lower than the default maximum.

Will I lose performance?

You may see a slight performance drop in GPU-intensive tasks, but for many workloads the difference is minimal, especially if you set the limit at 80-90% of max.

Can I set the limit to a value higher than the default max?

No, the driver enforces a hard maximum. You can only lower it, not exceed it.

Does the power limit affect overclocking?

Yes, a lower power limit can reduce the headroom for overclocking, as the GPU may hit the power cap sooner. If you overclock, you may need a higher limit.

Why does my GPU ignore the power limit in some games?

Some applications or driver settings can override the limit temporarily. Check if you have any overclocking tools running, and ensure the limit is applied after the driver loads.

Can I set a different limit for different GPUs?

Yes, use the -i flag to specify the GPU index for each command, and create separate systemd services or a script that applies different limits to each.