Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Disable Dynamic Frequency Scaling

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Glenn9999

Glenn9999

    Senior Member

  • Member
  • PipPipPipPip
  • 668 posts
  • OS:Windows 8 x64
  • Country: Country Flag
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.


How to remove advertisement from MSFN

#2
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
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
Glenn9999

Glenn9999

    Senior Member

  • Member
  • PipPipPipPip
  • 668 posts
  • OS:Windows 8 x64
  • Country: Country Flag
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:

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).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN