Limiting NVIDIA GPU in Linux

I have a nice laptop with a GPU for machine learning and the occasional video game. A System76 Oryx Pro that has a 6GB GTX 1060 graphics card. This model is before they had integrated intel graphics with the easy switching to get that precious battery life when you aren’t using your GPU for workloads. So I searched high and low for a way to limit my GPU as it seemed like it was constantly spinning up even when just browsing the web.

On Linux, there is a NVIDIA utility called NVIDIA XServer Settings that will allow you to make some changes to your settings and see stats about your GPU. Specifically, there is a tab called PowerMizer where you can watch the card adapt it’s clock speeds to what it thinks you need. Which is great when you want the card to ramp up when it’s needed. However, I wanted to force my card to stay at the lowest performance level, knowing that I may sacrifice some performance for some battery life and fan noise.

I found a nice little solution to force my NVIDIA GPU to limit itself to a specific PowerMizer setting.

Add the following to the file: /etc/modprobe.d/nvidia-graphics-drivers.conf

# Force GPU to lowest level
options nvidia NVreg_RegistryDwords="OverrideMaxPerf=0x1"

To undo this, you can just comment out or remove the line. The only downside is that it requires a restart. But most of the time I open my laptop knowing what my workloads will be and it is a small price to pay to squeeze out that extra battery!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>