Losing overclock after reboot | 346.59

I’ve been overclocking my GTX960 under Linux with great success using the nvidia-settings GUI, however every time I re-boot my PC I have to manually re-apply all the PowerMizer and Thermal Settings as they don’t appear to be persistent. Can anyone please advise how I can make the settings stick between reboots? My system details are as follows:

Debian GNU/Linux 8.0 (Jessie) 64-bit
GTX960
Driver Version 346.59
Coolbits set to “28” in /etc/X11/xorg.conf
nvidia-smi --persistence-mode=1

Many thanks.

Use nvidia-settings utility and store it’s configuration file to your home folder(nvidia-settings->nvidia settings configuration->save current configuration, it should save it default to your home folder with right name .nvidia-settings-rc). To make use of it you should add command:
nvidia-settings --load-config-only
to your DE’s autostart or .xinitrc. Check the nvidia-settings man pages for more information(scroll down to user guide and section 3. Loading Settings Automatically).

Oh and do you really need persistence-mode? It’s purpose is to use gpu for cuda compute without needing X.

Thank you for the advice tuke, though it seems that when I do this it’s not saving any of the overclock or fan settings to that file, is this normal? cat output is below:

#
# /home/awbbox/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA X Server Settings utility
# Generated on Mon May 11 10:04:37 2015
#

# ConfigProperties:

RcFileLocale = C
ToolTips = Yes
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
ShowQuitDialog = No
UpdateRulesOnProfileNameChange = Yes
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = Memory_Used_(GPU_0),Yes,3000

# Attributes:

0/SyncToVBlank=1
0/LogAniso=0
0/FSAA=0
0/TextureSharpen=0
0/TextureClamping=1
0/FXAA=0
0/AllowFlipping=1
0/FSAAAppControlled=1
0/LogAnisoAppControlled=1
0/OpenGLImageSettings=1
0/FSAAAppEnhanced=0
0/XVideoSyncToDisplayID=DVI-I-0
[DPY:DVI-I-0]/Dithering=0
[DPY:DVI-I-0]/DitheringMode=0
[DPY:DVI-I-0]/DitheringDepth=0
[DPY:DVI-I-0]/SynchronousPaletteUpdates=0
[DPY:DVI-I-1]/Dithering=0
[DPY:DVI-I-1]/DitheringMode=0
[DPY:DVI-I-1]/DitheringDepth=0
[DPY:DVI-I-1]/SynchronousPaletteUpdates=0
[DPY:DP-0]/Dithering=0
[DPY:DP-0]/DitheringMode=0
[DPY:DP-0]/DitheringDepth=0
[DPY:DP-0]/SynchronousPaletteUpdates=0
[DPY:DP-1]/Dithering=0
[DPY:DP-1]/DitheringMode=0
[DPY:DP-1]/DitheringDepth=0
[DPY:DP-1]/SynchronousPaletteUpdates=0
[DPY:HDMI-0]/Dithering=0
[DPY:HDMI-0]/DitheringMode=0
[DPY:HDMI-0]/DitheringDepth=0
[DPY:HDMI-0]/SynchronousPaletteUpdates=0
[DPY:DVI-D-0]/RedBrightness=0.000000
[DPY:DVI-D-0]/GreenBrightness=0.000000
[DPY:DVI-D-0]/BlueBrightness=0.000000
[DPY:DVI-D-0]/RedContrast=0.000000
[DPY:DVI-D-0]/GreenContrast=0.000000
[DPY:DVI-D-0]/BlueContrast=0.000000
[DPY:DVI-D-0]/RedGamma=1.000000
[DPY:DVI-D-0]/GreenGamma=1.000000
[DPY:DVI-D-0]/BlueGamma=1.000000
[DPY:DVI-D-0]/Dithering=0
[DPY:DVI-D-0]/DitheringMode=0
[DPY:DVI-D-0]/DitheringDepth=0
[DPY:DVI-D-0]/DigitalVibrance=0
[DPY:DVI-D-0]/ColorSpace=0
[DPY:DVI-D-0]/ColorRange=0
[DPY:DVI-D-0]/SynchronousPaletteUpdates=0
[DPY:Unknown-0]/Dithering=0
[DPY:Unknown-0]/DitheringMode=0
[DPY:Unknown-0]/DitheringDepth=0
[DPY:Unknown-0]/SynchronousPaletteUpdates=0

Hmh had to say that I don’t oc my graphics card, but did a little fiddling and got it working at least on my pc. So check first which performance mode allows overclocking to you with query:
nvidia-settings -q [gpu:0]/GPUPerfModes
I.e. mine it’s like this:

$ nvidia-settings -q [gpu:0]/GPUPerfModes

  Attribute 'GPUPerfModes' (Tippawaara12:0[gpu:0]): perf=0, nvclock=135, nvclockmin=135, nvclockmax=405, nvclockeditable=0,
  memclock=405, memclockmin=405, memclockmax=405, memclockeditable=0, memTransferRate=810, memTransferRatemin=810,
  memTransferRatemax=810, memTransferRateeditable=0 ; perf=1, nvclock=135, nvclockmin=135, nvclockmax=1293, nvclockeditable=1,
  memclock=2700, memclockmin=2700, memclockmax=2700, memclockeditable=1, memTransferRate=5400, memTransferRatemin=5400,
  memTransferRatemax=5400, memTransferRateeditable=1

As you see perf=1 for mine is editable and perf=0 is not. So now we can use two offset options for oc; for core clock it’s GPUGraphicsClockOffset[perfmode] and for memory it’s GPUMemoryTransferRateOffset[perfmode].

Next I can add these lines on my .nvidia-settings-rc for over clocking my card with core offset +50Mhz and memory offset +100MHz:

[gpu:0]/GPUGraphicsClockOffset[1]=50
[gpu:0]/GPUMemoryTransferRateOffset[1]=100

Save that file and load them to use:

$ nvidia-settings --load-config-only

Confirm with query gpuperfmodes again and you see they are in use:

$ nvidia-settings -q [gpu:0]/GPUPerfModes

  Attribute 'GPUPerfModes' (Tippawaara12:0[gpu:0]): perf=0, nvclock=135, nvclockmin=135, nvclockmax=405, nvclockeditable=0,
  memclock=405, memclockmin=405, memclockmax=405, memclockeditable=0, memTransferRate=810, memTransferRatemin=810,
  memTransferRatemax=810, memTransferRateeditable=0 ; perf=1, nvclock=135, nvclockmin=135, nvclockmax=1343, nvclockeditable=1,
  memclock=2750, memclockmin=2750, memclockmax=2750, memclockeditable=1, memTransferRate=5500, memTransferRatemin=5500,
  memTransferRatemax=5500, memTransferRateeditable=1

Fan speed are controlled with these:
‘GPUFanControlState’ is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false).
‘GPUTargetFanSpeed’ are in the range 0 - 100 (inclusive).
But I would not recommend to manual lock them in some arbitrary constant percentage.

Really appreciate the help here Tuke, I’m making progress thanks to you!

awbbox@is-netmon-1:~$ nvidia-settings -q [gpu:0]/GPUPerfModes

  Attribute 'GPUPerfModes' (is-netmon-1:0[gpu:0]): perf=0, nvclock=135, nvclockmin=135, nvclockmax=405, nvclockeditable=0, memclock=405, memclockmin=405, memclockmax=405,
  memclockeditable=0, memTransferRate=810, memTransferRatemin=810, memTransferRatemax=810, memTransferRateeditable=0 ; perf=1, nvclock=135, nvclockmin=135, nvclockmax=1392,
  nvclockeditable=0, memclock=810, memclockmin=810, memclockmax=810, memclockeditable=0, memTransferRate=1620, memTransferRatemin=1620, memTransferRatemax=1620,
  memTransferRateeditable=0 ; perf=2, nvclock=135, nvclockmin=135, nvclockmax=1530, nvclockeditable=0, memclock=3004, memclockmin=3004, memclockmax=3004, memclockeditable=0,
  memTransferRate=6008, memTransferRatemin=6008, memTransferRatemax=6008, memTransferRateeditable=0 ; perf=3, nvclock=135, nvclockmin=135, nvclockmax=1530, nvclockeditable=1,
  memclock=3505, memclockmin=3505, memclockmax=3505, memclockeditable=1, memTransferRate=7010, memTransferRatemin=7010, memTransferRatemax=7010, memTransferRateeditable=1

awbbox@is-netmon-1:~$ nvidia-settings -a "[gpu:0]/gpugraphicsclockoffset[3]=160"

ERROR: Error assigning value 160 to attribute 'GPUGraphicsClockOffset' (is-netmon-1:0[gpu:0]) as specified in assignment '[gpu:0]/gpugraphicsclockoffset[3]=160' (Unknown
       Error).

awbbox@is-netmon-1:~$ nvidia-settings -a "[gpu:0]/gpumemorytransferrateoffset[3]=100"

ERROR: Error assigning value 100 to attribute 'GPUMemoryTransferRateOffset' (is-netmon-1:0[gpu:0]) as specified in assignment '[gpu:0]/gpumemorytransferrateoffset[3]=100'
       (Unknown Error).

Weird thing is that gpugraphicsclockoffset and gpumemorytransferrateoffset both spit out errors when used, however gpugraphicsclockoffset actually works and applies the correct offset where as gpumemorytransferrateoffset does not. This isn’t a huge deal for me as the GPU clock is much more important, any ideas why this is happening though?

Here’s my notes so far in case it helps anyone else in future:

Enable PowerMizer (Adaptive)
nvidia-settings -a ‘[gpu:0]/GPUPowerMizerMode=0’

Enable PowerMizer (Auto)
nvidia-settings -a ‘[gpu:0]/GPUPowerMizerMode=2’

Enable PowerMizer (Prefer Maximum Performance)
nvidia-settings -a ‘[gpu:0]/GPUPowerMizerMode=1’

Gain manual fan control
nvidia-settings -a ‘[gpu:0]/GPUFanControlState=1’

Set GPU fan to 75%
nvidia-settings -a ‘[fan:0]/GPUCurrentFanSpeed=75’

Set GPU Clock offset +160Mhz
nvidia-settings -a ‘[gpu:0]/GPUGraphicsClockOffset[3]=160’

Set GPU Memory offset +100Mhz
nvidia-settings -a ‘[gpu:0]/GPUMemoryTransferRateOffset[3]=100’

Hello
thanks for this post !!
i also found another graphical tools “Nvidiux”
[url]https://github.com/RunGp/Nvidiux[/url] it’s a devellopement build but work for me