MSFN Forum: Disable Dynamic Frequency Scaling - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Disable Dynamic Frequency Scaling Has anyone made a useful attempt? Rate Topic: -----

#1 User is offline   Glenn9999 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 628
  • Joined: 23-April 07

Posted 07 March 2013 - 09:17 PM

One thing I've been looking to do (actually requested by someone - and I'm handicapped because of no way to test it, personally), is how to disable dynamic frequency scaling on CPUs via CODE. The problem I'm having is that the search engine really hasn't revealed a good way to do it. Lots on OS settings for both Windows and Linux but nothing that will shut the feature off and let you run something (and maybe let you turn it back on). Does anyone have any clues as to how to do it? Sample source would be great, too, if possible.


#2 User is offline   allen2 

  • Not really Newbie
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,737
  • Joined: 13-January 06

Posted 08 March 2013 - 01:00 AM

First i don't think the code will be the same for any cpu as Amd "cool and quiet" and Intel "speed step" should not share the same source code.
Perhaps the resource kit or dev kit offered by Amd and Intel might provide steps or not.
But if you are trying on linux, there is c++ source code included in recent kernel and instructions to use those features. The source code of the described kernel modules in the link, might help you to port it to another OS.

#3 User is offline   Glenn9999 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 628
  • Joined: 23-April 07

Posted 08 March 2013 - 02:53 AM

FWIW, the answer that seems to exist for Windows (most all of this stuff has to have an API somewhere) in reading the API, is as follows:

function CallNtPowerInformation(InformationLeveL: POWER_INFORMATION_LEVEL;
         lpInputBuffer: PVOID; nInputBufferSize: ULONG; lpOutputBuffer: PVOID;
         nOutputBufferSize: ULONG): NTSTATUS; stdcall;
         external powrproflib name 'CallNtPowerInformation';


I have code calling this which seems to work in that it identifies that all the stuff I have as not supporting the feature (which is true). The problem for me is in having known good code which will do the job. Calling this using SystemPowerCapabilities brings back or sends a structure, which seems to have the following interesting parts:

 
BOOLEAN                 ProcessorThrottle;
  BYTE                    ProcessorMinThrottle;
 BYTE                    ProcessorMaxThrottle;




From the documentation:

Quote

ProcessorThrottle
If this member is TRUE, the system supports processor throttling.

ProcessorMinThrottle
The minimum level of system processor throttling supported, expressed as a percentage.

ProcessorMaxThrottle
The maximum level of system processor throttling supported, expressed as a percentage.


Of course it looks promising (set some number to the later two where they are equal would effectively "disable" the feature), but really no way to be sure. What I thought was it would be nice to find some code sample on the Internet where someone has done this already and use that, but I really haven't found any code samples either that claim to do the task. Odd thing being that I see it mentioned enough that it would be a useful enough task to more than just a few.

Hope that helps explain where I'm at with the research on things (since I have a little more time now than when I first posted that).

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy