How to Bypass nVidia PowerMizer and Adaptive Clocking

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

How to Bypass nVidia PowerMizer and Adaptive Clocking

Post by catweazel »

The first problem
Most of nVidia's new cards now have what is called 'adaptive clocking'. It is a feature that allows the card to throttle itself up or down based on the load it is experiencing. The feature is easily controlled with Windwoes drivers but it isn't so obvious for Linux. The fact that it isn't obvious, and the fact that Linux gamers will be getting fragged because of video lag will be issues for up and coming Linux gamers who are now taking to Valve's Steam.

The second problem
The adaptive clocking feature will interfere with your high definition video-watching experience due to tearing. It seems that the thresholds needed to pump the clocks up automatically are too high, and a HD video will suffer visible screen tearing if the card has throttled itself down.

Background Information
Linux Mint doesn't require an xorg.conf file. It has been made obsolete by better hardware detection. Most installs of Mint today will not have an xorg.conf in /etc/X11, yet an xorg.conf, along with the nVidia binary driver, is needed to set an nVidia card's performance options to full throttle.

Procedure
Step 1. Install the nVidia binary driver.

Code: Select all

$ sudo apt-get install nvidia-current-updates
Step 2. Create a mini xorg.conf

Code: Select all

sudo nano -w /etc/X11/xorg.conf
Add these lines to the empty file:

Code: Select all

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
EndSection
Press ^O to write the file (ctrl-o), then ^X to exit.

Step 3. Check it out
Reboot and start the NVIDIA X Server Settings app. On the PowerMizer tab, the performance level should be set to 3, and both the graphics and memory clocks should be turned up full bore.

That's it. There's nothing more needs doing, and nothing more needs to go in the xorg.conf, only what's shown above.

Additional Information
Keep your eyes on the PowerMizer tab for a few minutes just to make sure the card doesn't start clocking itself down.

Don't bother trying to set the "Preferred Mode" to 'Prefer Maximum Performance'. The setting will not stick between sessions. You'll just have to live with the settings application telling you lies about adaptive clocking being enabled.

If you install the 310 experimental driver via Synaptic, an xorg.conf may or may not be created. If one is created for you, just put this one line in the device section:

Code: Select all

Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
About the Settings
PowerMizerEnable=0x1 turns on PowerMizer.

PerfLevelSrc=0x2222 tells the video card to operate at full bore on both AC & battery.

PowerMizerDefaultAC=0x1 tells the card to behave as if AC power is connected.

The settings above, in particular PerfLevelSrc=0x2222, are intended for desktop machines. However the performance level can be adjusted separately for laptops running on battery or AC power. Use the following setting for adaptive power on battery and full choke on AC power:

Code: Select all

PerfLevelSrc=0x3322;
A Pretty Picture
Image

You can see that the GPU and memory clocks are running flat out but the settings application is telling porkies about adaptive clocking being enabled.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
problem2038

Re: How to Bypass nVidia PowerMizer and Adaptive Clocking

Post by problem2038 »

Thank you SO MUCH!
timoto
Level 2
Level 2
Posts: 64
Joined: Fri Sep 17, 2010 10:58 am
Contact:

Re: How to Bypass nVidia PowerMizer and Adaptive Clocking

Post by timoto »

Excellent. Thank you.

Setting to max not only helps with gfx intensive tasks, but also prevents system crashes on my system.

I originally had this experience in Win7 and had to set nvidia powermizer do the same there to prevent occassional system crashes that occured during clock switches.

Very glad to have found the linux equivilent here.
[DELL M5510, i7-6820HQ, M1000M, Intel AC 8260] | [MSI Stealth 15M i7-11375H GTX3060] Mint 20.2 Xfce
tek_heretik

Re: How to Bypass nVidia PowerMizer and Adaptive Clocking

Post by tek_heretik »

For those running 64-bit testing/jessie Debian like me, nVidia driver 319.76, the new deal is, in my situation anyway, navigate (as root) to /etc/X11/xorg.conf.d/, there you will see a file called "20-nvidia.conf" (created during the driver install to block nouveau), add ONLY this line:

Code: Select all

Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
to the Device section under this line:

Code: Select all

Driver "nvidia"
Save the changes. Line it up with the above line or it won't work, It worked for me :D Reboot.
Sample of my "20-nvidia.conf" file now:

Code: Select all

Section "Device"
	Identifier "My GPU"
	Driver "nvidia"
	Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
EndSection
If you watch the PowerMizer Settings, it will say "Preferred Mode: Auto" and "Current Mode: Adaptive", that doesn't matter, just leave it because it doesn't budge from "Performance Level: 1", the max level.
ciryon

Re: How to Bypass nVidia PowerMizer and Adaptive Clocking

Post by ciryon »

catweazel wrote:The first problem
Most of nVidia's new cards now have what is called 'adaptive clocking'. It is a feature that allows the card to throttle itself up or down based on the load it is experiencing. The feature is easily controlled with Windwoes drivers but it isn't so obvious for Linux. The fact that it isn't obvious, and the fact that Linux gamers will be getting fragged because of video lag will be issues for up and coming Linux gamers who are now taking to Valve's Steam.

The second problem
The adaptive clocking feature will interfere with your high definition video-watching experience due to tearing. It seems that the thresholds needed to pump the clocks up automatically are too high, and a HD video will suffer visible screen tearing if the card has throttled itself down.

Background Information
Linux Mint doesn't require an xorg.conf file. It has been made obsolete by better hardware detection. Most installs of Mint today will not have an xorg.conf in /etc/X11, yet an xorg.conf, along with the nVidia binary driver, is needed to set an nVidia card's performance options to full throttle.

Procedure
Step 1. Install the nVidia binary driver.

Code: Select all

$ sudo apt-get install nvidia-current-updates
Step 2. Create a mini xorg.conf

Code: Select all

sudo nano -w /etc/X11/xorg.conf
Add these lines to the empty file:

Code: Select all

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
EndSection
Press ^O to write the file (ctrl-o), then ^X to exit.

Step 3. Check it out
Reboot and start the NVIDIA X Server Settings app. On the PowerMizer tab, the performance level should be set to 3, and both the graphics and memory clocks should be turned up full bore.

That's it. There's nothing more needs doing, and nothing more needs to go in the xorg.conf, only what's shown above.

Additional Information
Keep your eyes on the PowerMizer tab for a few minutes just to make sure the card doesn't start clocking itself down.

Don't bother trying to set the "Preferred Mode" to 'Prefer Maximum Performance'. The setting will not stick between sessions. You'll just have to live with the settings application telling you lies about adaptive clocking being enabled.

If you install the 310 experimental driver via Synaptic, an xorg.conf may or may not be created. If one is created for you, just put this one line in the device section:

Code: Select all

Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
About the Settings
PowerMizerEnable=0x1 turns on PowerMizer.

PerfLevelSrc=0x2222 tells the video card to operate at full bore on both AC & battery.

PowerMizerDefaultAC=0x1 tells the card to behave as if AC power is connected.

The settings above, in particular PerfLevelSrc=0x2222, are intended for desktop machines. However the performance level can be adjusted separately for laptops running on battery or AC power. Use the following setting for adaptive power on battery and full choke on AC power:

Code: Select all

PerfLevelSrc=0x3322;
A Pretty Picture
Image

You can see that the GPU and memory clocks are running flat out but the settings application is telling porkies about adaptive clocking being enabled.
catweazel wrote:The first problem
Most of nVidia's new cards now have what is called 'adaptive clocking'. It is a feature that allows the card to throttle itself up or down based on the load it is experiencing. The feature is easily controlled with Windwoes drivers but it isn't so obvious for Linux. The fact that it isn't obvious, and the fact that Linux gamers will be getting fragged because of video lag will be issues for up and coming Linux gamers who are now taking to Valve's Steam.

The second problem
The adaptive clocking feature will interfere with your high definition video-watching experience due to tearing. It seems that the thresholds needed to pump the clocks up automatically are too high, and a HD video will suffer visible screen tearing if the card has throttled itself down.

Background Information
Linux Mint doesn't require an xorg.conf file. It has been made obsolete by better hardware detection. Most installs of Mint today will not have an xorg.conf in /etc/X11, yet an xorg.conf, along with the nVidia binary driver, is needed to set an nVidia card's performance options to full throttle.

Procedure
Step 1. Install the nVidia binary driver.

Code: Select all

$ sudo apt-get install nvidia-current-updates
Step 2. Create a mini xorg.conf

Code: Select all

sudo nano -w /etc/X11/xorg.conf
Add these lines to the empty file:

Code: Select all

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
EndSection
Press ^O to write the file (ctrl-o), then ^X to exit.

Step 3. Check it out
Reboot and start the NVIDIA X Server Settings app. On the PowerMizer tab, the performance level should be set to 3, and both the graphics and memory clocks should be turned up full bore.

That's it. There's nothing more needs doing, and nothing more needs to go in the xorg.conf, only what's shown above.

Additional Information
Keep your eyes on the PowerMizer tab for a few minutes just to make sure the card doesn't start clocking itself down.

Don't bother trying to set the "Preferred Mode" to 'Prefer Maximum Performance'. The setting will not stick between sessions. You'll just have to live with the settings application telling you lies about adaptive clocking being enabled.

If you install the 310 experimental driver via Synaptic, an xorg.conf may or may not be created. If one is created for you, just put this one line in the device section:

Code: Select all

Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x1"
About the Settings
PowerMizerEnable=0x1 turns on PowerMizer.

PerfLevelSrc=0x2222 tells the video card to operate at full bore on both AC & battery.

PowerMizerDefaultAC=0x1 tells the card to behave as if AC power is connected.

The settings above, in particular PerfLevelSrc=0x2222, are intended for desktop machines. However the performance level can be adjusted separately for laptops running on battery or AC power. Use the following setting for adaptive power on battery and full choke on AC power:

Code: Select all

PerfLevelSrc=0x3322;
A Pretty Picture
Image

You can see that the GPU and memory clocks are running flat out but the settings application is telling porkies about adaptive clocking being enabled.
Hello,

I am on Ubuntu 14.04 but I only found the solution I was looking for here with your topic, thanks you a lot, hope this will correct the lags I have on Xcom : enemy Within.

One question however. I have a GT740 which is more recent than the GPU you have in your screenshot (a GTX 680 if I remember well). I use the nvidia driver 340.32. And my Nvidia-setting screen show me only 2 performance level : 0 and 1 and your card has 0 to 3, it's normal ?

Also you explains what is "PerfLevelSrc=0x2222" and "PowerMizerDefaultAC=0x1" but not "RegistryDwords" . What is it ?
tek_heretik

Re: How to Bypass nVidia PowerMizer and Adaptive Clocking

Post by tek_heretik »

@ciryon

First of all you quoted catweazel twice, you can edit out the second quote (and his post is fairly old so some info may be out of date, not his fault, people don't run around forums updating their old posts), anyway...many nVidia cards have only 2 speeds, it depends on the GPU on the vid card board or built in on the mobo, what capabilities and settings the nVidia driver 'sees' that's available from the GPU is what YOU get, ESPECIALLY if you are using the proprietary nVidia driver. I'm just guessing but GPUs for laptops probably have more levels of speed/power-management (conserve battery). Nouveau worked for me but in text boxes like these to post, the nouveau driver wouldn't hold newly typed text, I had to do a highlight all or select all to get it back in view, the nouveau performance was OK, but that bug was annoying, so now I'm forced to use the nVidia driver BLOB.
Post Reply

Return to “Tutorials”