Nvidia-settings does not set PowerMizerMode value properly

Hello, I have a 1070 GTX graphics card which I am trying to set up for cryptocurrency mining. I have run into an issue where the nvidia-settings utility is not changing the graphics card attributes. This is preventing me from overclocking the card to maximize performance.

I am able to query attributes like GPUPowerMizerMode, but upon assigning a value and querying again, the value is unchanged.

$ nvidia-settings -q [gpu:0]/GPUPowerMizerMode
Attribute 'GPUPowerMizerMode' (crypt0:0[gpu:0]): 2.
Valid values for 'GPUPowerMizerMode' are: 0, 1 and 2.
'GPUPowerMizerMode' can use the following target types: GPU.

$ nvidia-settings -a "[gpu:0]/GPUPowerMizerMode=1"
Attribute 'GPUPowerMizerMode' (crypt0:0[gpu:0]) assigned value 1.

$ nvidia-settings -q [gpu:0]/GPUPowerMizerMode
Attribute 'GPUPowerMizerMode' (crypt0:0[gpu:0]): 2.
Valid values for 'GPUPowerMizerMode' are: 0, 1 and 2.
'GPUPowerMizerMode' can use the following target types: GPU.

When I try to assign a GPU clock offset it seems to work

$ nvidia-settings -a [gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=200
Attribute 'GPUGraphicsClockOffsetAllPerformanceLevels' (crypt0:0[gpu:0]) assigned value 200.

$ nvidia-settings -q [gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels
Attribute 'GPUGraphicsClockOffsetAllPerformanceLevels' (crypt0:0[gpu:0]): 200.
The valid values for 'GPUGraphicsClockOffsetAllPerformanceLevels' are in the range -200 - 1200 (inclusive).
'GPUGraphicsClockOffsetAllPerformanceLevels' can use the following target types: X Screen, GPU.

And the clock speeds as reported by nvidia-smi -q -d CLOCK update appropriately.

Why isn’t PowerMizer updating? I believe I need this set to 1 to enable maximum performance mode as shown in this article. Though, I admit I am still a little confused what this does. From what I read it seems like this would allow the GPU to draw more power. Right now the wattage sits around 140, with a maximum wattage set to 170. Overclocking the memory and core clocks doesn’t really raise the 140W the card draws yet the hashrate plateaus, leaving a wasted 30W potential. I believe changing PowerMizer will remove this throttle. Is this correct?

I am running Ubuntu Server 20.04 headless. I do not have a desktop environment and do not want to install one, so any solutions need to be through the command line only. From what I understand based on this post, nvidia-settings must have an X server running. I have generated a config using nvidia-xconfig --enable-all-gpus --cool-bits=28 --allow-empty-initial-configuration. After generating the config I added the RegistryDwords line to xorg.conf as shown below.

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I would imagine once X is started and it reads in the config, the PowerMizerMode would be set to 1 as it is configured above, but it doesn’t. To start the server so nvidia-settings doesn’t error, I run the following after connecting via ssh.

$ export DISPLAY=:0
$ sudo X :0 &

I am then able to make queries and try to change GPU settings, where I run into my problem with PowerMizer. How can I set PowerMizer to maximum performance mode?

Version/hardware info:
GeForce GTX 1070 EVGA SuperClocked
Ubuntu Server 20.04.2 LTS
nvidia-settings 440.82
nvidia driver 460.32.03
cuda version 11.2

Is anyone able to point me in the right direction here? Why would nvidia-settings not update an attribute that is supposed to be writable? I’m very lost on what is preventing me from changing the power mode of my graphics card, and how I might be able to fix it. Lots of googling has left me without any solutions.

The below command does not indicate read only, yet it is being treated as such…

$ nvidia-settings -e GPUPowerMizerMode

Attribute 'GPUPowerMizerMode':
  - Attribute value is an integer.
  Allows setting different GPU powermizer modes.

PowerMizerMode 1 means the gpu will always stay at highest performance level, i.e. will not clock down on idle. Mining rather requires OC memory, UC gpu. Why the value doesn’t stick for you, IDK, sometimes it just doesn’t work. Since you’re running X as root, you’ll also have to run nvidia-settings as root. Otherwise, try a different driver or compile nvidia-settings from source: https://github.com/NVIDIA/nvidia-settings

Wouldn’t PowerMizer mode 1 limit the card’s throttling as well too? Boost 3.0 seems to be dropping the GPU clock when the card reaches about 60 C. Additionally the card doesn’t seem to want to draw over 142 W, despite my configuration setting the max wattage to 170. Maybe I am looking at the wrong attribute here, but since PowerMizer is currently stuck in an optimization mode, I think it is causing the card to throttle heavier than it would on a max performance setting, because it is trying to save electricity.

Since this card is mining and I plan to be running it 24/7, losing the ability for the card to automatically clock down on idle isn’t really an issue. I am more concerned with the other limitations that PowerMizer mode 2 might be imposing, which are preventing me from increasing the card’s performance further. Since I cannot directly control the voltage of the card due to Nvidia locking that down via boost 3.0, I am left with only the PowerMizer presets. I would like to at least have the ability to try the different presets and see what changes they cause.

Can you give more insight on the things that PowerMizer controls? If it is set to the highest performance level, wouldn’t that raise the throttle on power draw, and possibly allow the card to work at a higher heat before it starts throttling the GPU clock?

PowerMizerModes don’t do anything but either set gpu load dependant clocking or stick at maximum. It doesn’t change anything what you’re thinking of. Mining scales with memory bandwidth, on saturation of it the gpu can’t do more work so the powerlimit is pointless.

1 Like