Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92865 - Initscript to set cpufreq policy
Summary: Initscript to set cpufreq policy
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-16 22:58 UTC by Greg Symons
Modified: 2005-06-25 02:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The cpufreq-policy initscript (cpufreq-policy,793 bytes, text/plain)
2005-05-16 22:59 UTC, Greg Symons
Details
A skeleton configuration for cpufreq-policy (cpufreq-policy,229 bytes, text/plain)
2005-05-16 23:00 UTC, Greg Symons
Details
Revised init script (cpufreq-init.d,776 bytes, text/plain)
2005-05-17 09:26 UTC, Greg Symons
Details
revised conf.d file (cpufreq-conf.d,414 bytes, text/plain)
2005-05-17 09:27 UTC, Greg Symons
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Symons 2005-05-16 22:58:33 UTC
Right now, there is no simple way to set cpufreq policy. The attached initscript
sets the cpufreq policy based on setting in an /etc/conf.d/ file. It could
probably be a little better (right now it only supports a single cpu for
example) but it's a good starting point.

Reproducible: Always
Steps to Reproduce:
Comment 1 Greg Symons 2005-05-16 22:59:52 UTC
Created attachment 59087 [details]
The cpufreq-policy initscript
Comment 2 Greg Symons 2005-05-16 23:00:33 UTC
Created attachment 59088 [details]
A skeleton configuration for cpufreq-policy
Comment 3 Greg Symons 2005-05-16 23:02:20 UTC
I'm not sure whether this should be added to the cpufreq-utils package,
baselayout, or be its own package entirely, which is why there's no ebuild or
anything like that.
Comment 4 Henrik Brix Andersen 2005-05-17 06:08:37 UTC
There's a simple init script for setting the cpufreq governor included in the
newly added sys-power/cpufrequtils-0.3-r1.

Closing as WONTFIX, please re-open if you find the current script insufficient.
Comment 5 Henrik Brix Andersen 2005-05-17 06:10:07 UTC
Actually closing this time ;)
Comment 6 Greg Symons 2005-05-17 09:25:15 UTC
I think my script is a little more flexible than the one in cpufrequtils-0.3-r1,
since it allows setting not only the governor, but the minimum and maximum
speeds the governor can set the processor to. (though I apologize for not seeing
the other bug when I opened this one... bad search:) Also, if the user doesn't
set a policy, rather than failing, it simply warns the user that the default
policy will be in use (it's not really an error if they don't want to do
anything). I do think the checkconfig function was a good idea though, and I've
merged it into my script. I also fixed my conf.d file so that it's more
gentooized:) I'll attach new versions.

There still needs to be some way to set individual policies per cpu on
multiprocessors... but I don't have a multiproc machine to test it on:) And
perhaps a way to set a specific speed rather than using a governor at all... but
I'm not sure if I really like that option.

Also, I was thinking that perhaps there should be a way for it to change
policies based on the softlevel (e.g. you could change the minimum and maximum
speeds when you go from battery to wall power), but I'm not entirely sure how
that would work, since, as far as I know, there's no way to simply force a
restart when changing softlevels.
Comment 7 Greg Symons 2005-05-17 09:26:19 UTC
Created attachment 59130 [details]
Revised init script
Comment 8 Greg Symons 2005-05-17 09:27:24 UTC
Created attachment 59131 [details]
revised conf.d file
Comment 9 Henrik Brix Andersen 2005-06-25 02:56:54 UTC
All the above can already be achieved in a much more generic way using
sys-power/cpufreqd.

Closing as WONTFIX.