8

I am running a headless server with an Nvidia GPU. Even when the GPU is not doing any work, it is consuming about 25 Watts of power:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.26       Driver Version: 430.26       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 950     Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   61C    P0    26W / 110W |      0MiB /  2001MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Is there a way to completely turn off power delivery to the GPU when it is not in use?

I tried sudo prime-select intel Which does cause nvidia-smi to stop working, but a power meter connect to the wall shows exactly the same power consumption with either intel or nvidia selected.

Completely removing the GPU reduces the power consumption by about 30 Watts as expected.

The main purpose is to save power and costs during idle operations, with an option to spin up the GPU when it is needed (remotely via ssh).

3
  • 1
    Is this a desktop or laptop? Your usage of commands applicable to hybrid graphics suggests a laptop but the removing of GPU suggests a desktop. Desktop can have multiple graphics cards/chips but it's not the same things as a laptop's hybrid and switchable graphics. In a desktop you may toggle in BIOS/UEFI and in some cases toggling to integrated GPU or disabling the discrete GPU results in the latter being treated as simply not there and not powered. – user880592 Aug 11 '19 at 17:35
  • A desktop, but I am not using the card for display output. I was hoping there is something equivalent to spinning down idle HDDs – amanusk Aug 11 '19 at 17:49
  • It'll always use some power. Again, in some systems, disabling it in BIOS/UEFI turns it off completely. – user880592 Aug 11 '19 at 17:51
0

It can be observed that the GPU is using Performance mode P0, where the power consumption of the card is very high. In Idle, it should ideally throttle back to P8 mode, where it will consume less power.

I follow the following steps to change the behaviour. Assuming that you are using Linux:

You would need sudo privileges to the machine. First, enable the persistence mode:

sudo nvidia-smi -pm 1

Then, reset the clocks for the GPU:

sudo nvidia-smi -rgc

Note: To know more about these commands, please type

nvidia-smi --help
5
  • Could you elaborate how to change the mode then, for a complete answer? – Artur Meinild Jan 9 at 10:47
  • On my 970M the -rgc parameter generates an error. There is an -rac parameter which works, but doesn't reduce power consumption. – WinEunuuchs2Unix Jan 10 at 22:17
  • Could you list the driver version you are currently using? Also, please check if nvidia-smi --help lists the -rgc argument. – Sud Ka Jan 11 at 8:47
  • Same problem on a GT 710 -- it says "Setting locked gpu clocks is not supported for GPU 00000000:2B:00.0." Driver version is 460.32.03, and nvidia-smi --help lists -rgc. – Jo Liss Mar 10 at 19:48
  • @JoLiss - Did you have a chance of testing what was suggested? – sancho.s ReinstateMonicaCellio Mar 16 at 8:34
0

These OPTIMUS combo solutions are made with the Windows operating system in mind.

From previous observation, NVIDIA cards seem to shut down completely on Windows OSs. My assumption is that BIOS handles calls from a Windows OS differently and it should.

I do not have one of these right now to test this method but it's worth a try nonetheless.

The method is to first disable ACPI OSI built-in OS vendor strings then report Windows 7 as the current OS. Sort of lying to the BIOS... Linux kernels do this all the time by default, but this is a more controlled way of doing it.

To do that, first edit /etc/default/grub like so:

sudo nano /etc/default/grub

Then, add the options acpi_osi=! and acpi_osi=\"Windows 2009\" to GRUB_CMDLINE_LINUX_DEFAULT like so:

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=! acpi_osi=\"Windows 2009\""

Then, save and close the file by pressing Ctrl+x then prss y then press Enter.

After that, update GRUB like so:

sudo update-grub

Finally, reboot your system and test if disabling the NVIDIA card is done differently now.

This method, however, might have higher success levels with the open source driver nouveau and VGA Switcheroo than with the proprietary NVIDIA drivers.

For further reading, please see kernel parameters.

0

You could try with one of the PowerMizerModes available, to see if that brings your system into state P8

$ nvidia-settings -a "[gpu:0]/GPUPowerMizerMode=<your no.>"

Note that PowerMizerModes and P-states available vary across systems. Use

$ nvidia-settings -q GpuPowerMizerMode

to check this.

Or you can also try forcing some parameters

  1. The power limit via nvidia-smi -i 0 -pl 10 (not sure it would work).
  2. GPUGraphicsClockOffset, GPUMemoryTransferRateOffset, via nvidia-settings.
  3. Via xorg.conf, ref.

You may need to reboot to test options.

Related:

  1. nvidia - high power consumption on idle GTX 1080 cards
  2. https://gist.github.com/DavidMetcalfe/fabbd2ddcb6ba4927269f6f0db31a92f
  3. https://forums.developer.nvidia.com/t/gtx-1070-driver-4-15-25-performance-mode-p0-does-not-automatically-downshift-to-idle-p8-after/69238
  4. https://github.com/devonkinghorn/linux-nvidia-dynamic-power-management-setup
2
  • I'm not running X on my headless server, so nvidia-settings won't work for me. Is there any way to do the same thing with nvidia-smi or another tool that doesn't need X? – Jo Liss Mar 27 at 23:26
  • @JoLiss - You might try running X and applying the proposals to at least see if you can lower power consumption. If so, then you could continue looking for options. – sancho.s ReinstateMonicaCellio Mar 28 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.