Re: CPU Speed ...
Re: CPU Speed ...
- Subject: Re: CPU Speed ...
- From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
- Date: Mon, 12 Apr 2004 14:53:40 -0500
J Nozzi, email@hidden, wrote:
>
Portables have the ability to adjust the CPU speed to extend battery
>
life. I'd like to control this function directly, rather than via the
>
System Preferences (Energy Saver) panel. I've been all through the
>
power management documentation and discovered that the CoreServices
>
framework's Power.h contains "SetProcessorSpeed()" but the docs say
>
it's unimplemented.
>
>
Is there another place to manipulate this directly or perhaps (as a
>
horribly unclean hack) to change the plist file and force it to re-read
>
the new settings?
You need to talk to IOKit. I wrote a screen saver a couple years back
which did nothing except drop the processor clock speed. I still use it
today, but it never renamed it from "MyScreenSaver". Gack. So, I created
a new Xcode project, linked up IOKit and dropped in the source:
<
http://rentzsch.com/share/ReduceProcessorSpeed-0.dmg>
As illustrated in the .m file, the magic call is IOPMSetAggressiveness().
Note you cannot "get" the "aggressiveness" (at least not when I last
tried in 2002), so System Prefs->Energy Saver will *not* reflect any
aggressiveness it does not set itself. Fortunately on my TiBook 800MHz,
iTunes slightly breaks up when dropping the CPU speed, so I knew my code
was working...
| Jonathan 'Wolf' Rentzsch
http://rentzsch.com
| Red Shed Software
http://redshed.net
| "better" necessarily means "different"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.