суббота, 2 июня 2012 г.

Энергосбережение nvidia GeForce GTX 460

Привожу свои настройки в /etc/X11/xorg.conf:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "UseEdidDpi" "FALSE"
    Option         "DPI" "96 x 96"
    Option         "NoLogo" "True" 
    Option         "Coolbits" "1"
    Option         "RegistryDwords" "EnableBrightnessControl=1; 
PowerMizerEnable=0x1;PerfLevelSrc=0x2222; PowerMizerLevel=0x3;
 PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
EndSection

Theory

You may configure power saving behavior for AC and battery sources separately. If your drivers (either NVIDIA or system ones) don't detect current power source correctly, you have to use only one configuration (usually for AC source - check current 'GPUPowerSource' parameter).

Clock frequency control strategies

You may choose clock frequency control strategy for each power source. At the moment we have:
  • strategy=22(hexadecimal) - fixed clock frequency strategy - the card works with a fixed frequency regardless of GPU usage;
  • strategy=33(hexadecimal) - adaptive clock frequency strategy - the card works on maximum power saving level (perf=0) until your applications start to heavily use the card resources, in the case GPU rises current performance level and when the resources are not used anymore, GPU lowers frequency (on one performance level each 15 seconds):

PowerMizer modes

You can not configure some performance level to be used for fixed clock frequency strategy. Instead there are three possible PowerMizer modes for the fixed clock frequency configuration:
  • mode=1 - Maximum performance - usually performance level with highest 'perf' (performance level) index is used,
  • mode=2 - Balanced - one of medium performance level is used,
  • mode=3 - Maximum power saving - usually perf=0 performance level is used.
Note that you have only three PowerMizer modes regardless of performance levels number and the values have opposite meaning. Yeah, looks freaky.

PerfLevelSrc - strategies assigment

There is special NVIDIA driver parameter 'PerfLevelSrc'. Its hexadecimal value format is
0x[Battery source strategy][AC source strategy]
Look at following examples:
  • PerfLevelSrc=0x2222 - fixed PowerMizer mode (and appropriate fixed frequency) is used for battery power source and fixed PowerMizer mode is used for AC power source, these PowerMizer modes may be the same or different
  • PerfLevelSrc=0x2233 - fixed PowerMizer mode is used for battery power source and adaptive clock frequency strategy is used for AC power source
  • PerfLevelSrc=0x3322 - fixed adaptive clock frequency strategy is used for battery power source and PowerMizer mode is used for AC power source
  • PerfLevelSrc=0x3333 - adaptive clock frequency strategy is used for battery and AC power sources
There are two NVIDIA driver parameters to configure fixed clock frequency strategy:
  • 'PowerMizerDefault' - contains PowerMizer mode value to be used for battery power source,
  • 'PowerMizerDefaultAC' - contains PowerMizer mode value to be used for AC power source.

Practice

Now we are ready to configure NVIDIA driver.
'RegistryDwords' option from appropriate NVIDIA device section of 'xorg.conf' file is used for the configuration. Minimal configuration may look like follows:
Section "Device"
  Identifier "NVIDIA GeForce"
  Driver     "nvidia"
  Option     "RegistryDwords" ""
EndSection
The 'RegistryDwords' option format is "parameter1=value1 [; parameter2=value2 ...]" and usually it contains following parameters:
"PowerMizerEnable=0x1; PerfLevelSrc=0x; PowerMizerDefault=0x; PowerMizerDefaultAC=0x"
You have to reload NVIDIA kernel module and restart X.org server to apply the option. Full system reboot will also help. Notes:
  • don't forget about hexadecial prefixes - '0x', especially for 'PerfLevelSrc' parameter;
  • don't leave trailing ';' in RegistryDwords - Linux version of NVIDIA driver for X.org doesn't support it;
  • you must not split RegistryDwords option into several RegistryDwords options, only the first one will be applied.

Configuration examples

Look at four popular 'RegistryDwords' option values:
  • on battery - max power saving, on AC - max performance
    "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x1"
    
  • on battery - max power saving, on AC - adaptive strategy (my favorite)
    "PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"
    
  • on battery - adaptive strategy, on AC - max performance
    "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"
    
  • adaptive strategy for any power source
    "PowerMizerEnable=0x1; PerfLevelSrc=0x3333"
    

Комментариев нет:

Отправить комментарий