设定CPU频率的内核编译选项是哪一个?

102 views
Skip to first unread message

宋为

unread,
Apr 7, 2015, 10:56:11 AM4/7/15
to sh...@googlegroups.com
因为常常在外面使用笔记本电脑,所以需要把CPU主频锁定在最低档来省电。

因为一些原因,开始自己编译内核来用。但是发现自己编译出来的内核不能用
cpufreq-set设定频率,Intel的CPU常常睿频加速,导致耗电过快。

电脑是ThinkPad X230 23259D5,处理器是 Intel(R) Core(TM) i5-3320M CPU @
2.60GHz。

当前使用的内核配置文件是(最后一次编译的内核版本是3.19):
https://github.com/leosongwei/leo-kernel-config

求正确的内核设置,谢谢啦 :D

Aaron Zhou

unread,
Apr 7, 2015, 11:25:27 AM4/7/15
to sh...@googlegroups.com
这个需求…好高端啊…我太low了……

Thx & Regards

aaron67
http://aaron67.cc
> --
> -- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
> ---
> 您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”群组。
> 要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
> 要查看更多选项,请访问 https://groups.google.com/d/optout

AR

unread,
Apr 7, 2015, 7:27:16 PM4/7/15
to sh...@googlegroups.com
Power management and ACPI options --->
CPU Frequency scaling --->
[*] CPU Frequency scaling
< > CPU frequency translation statistics
Default CPUFreq governor (userspace) --->
<*> 'performance' governor
< > 'powersave' governor
-*- 'userspace' governor for userspace frequency scaling
<*> 'ondemand' cpufreq policy governor
< > 'conservative' cpufreq governor

选项是CONFIG_CPU_FREQ,如果不满足要求就看一下前置选项的要求。

某用的是Gentoo Hardened 3.18.9的版本,不过这块大同小异。

下面是某在2013年时刚刚开始自己编译内核使用时对选项的折腾笔记

https://gist.github.com/aleiphoenix/5607907

后来熟悉了忘记总结笔记了,等这阵子把静态网站生成工具折腾好了再
整理一次吧。 XD

--
Silence is golden.

宋为

unread,
Apr 9, 2015, 10:28:25 PM4/9/15
to sh...@googlegroups.com
没有用啊…… 没有选中的那几个是不能选的吗?是不是会冲突?

在 2015年04月08日 07:26, AR 写道:
>
> Power management and ACPI options --->
> CPU Frequency scaling --->
> [*] CPU Frequency scaling
> < > CPU frequency translation statistics
> Default CPUFreq governor (userspace) --->
> <*> 'performance' governor
> < > 'powersave' governor
> -*- 'userspace' governor for userspace frequency scaling
> <*> 'ondemand' cpufreq policy governor
> < > 'conservative' cpufreq governor
>
> 选项是CONFIG_CPU_FREQ,如果不满足要求就看一下前置选项的要求。
>
> 某用的是Gentoo Hardened 3.18.9的版本,不过这块大同小异。
>
> 下面是某在2013年时刚刚开始自己编译内核使用时对选项的折腾笔记
>
> https://gist.github.com/aleiphoenix/5607907
>
> 后来熟悉了忘记总结笔记了,等这阵子把静态网站生成工具折腾好了再
> 整理一次吧。 XD
>


--
此致

---------------------------------------------------------
乱码部分为GPG数字签名,用于验证传输完整性。请当面向我验证公钥。

AR

unread,
Apr 9, 2015, 10:49:36 PM4/9/15
to sh...@googlegroups.com
2015-04-10 10:27 GMT+08:00 宋为 <leo_s...@outlook.com>:
> 没有用啊…… 没有选中的那几个是不能选的吗?是不是会冲突?

你用的是什么工具修改配置的?有什么报错信息?

看看下面这个路径里是否有相应的文件,是否能修改


/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

有几个核就有几个cpuX目录



--
Silence is golden.

宋为

unread,
Apr 11, 2015, 6:13:42 AM4/11/15
to sh...@googlegroups.com
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor这个文件只能改成
performance和powersave,输入userspace、conservative、ondemand都报
错:“-bash: echo: write error: Invalid argument”

我是这样编译的:

> [*] CPU Frequency scaling
> <*> CPU frequency translation statistics
> [*] CPU frequency translation statistics details
> Default CPUFreq governor (userspace) --->
> <*> 'performance' governor
> <*> 'powersave' governor
> -*- 'userspace' governor for userspace frequency scaling
> <*> 'ondemand' cpufreq policy governor
> <*> 'conservative' cpufreq governor

Sherlock

unread,
Apr 12, 2015, 11:10:25 PM4/12/15
to Shanghai Linux User Group
intel step speed 那个什么技术来着,你选了么

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/d/optout



--
==========
      InitX
==========

宋为

unread,
Apr 13, 2015, 4:00:39 AM4/13/15
to sh...@googlegroups.com
说明里面不是说不推荐使用那个驱动吗?

AR

unread,
Apr 13, 2015, 4:23:45 AM4/13/15
to sh...@googlegroups.com
2015-04-13 16:00 GMT+08:00 宋为 <leo_s...@outlook.com>:
> 说明里面不是说不推荐使用那个驱动吗?

是的,因为已经下面这个被替代了

<*> ACPI Processor P-States driver

还有一个是支持k8系列AMD的。

[*] Legacy cpb sysfs knob support for AMD CPUs

某这就开了这俩。
--
Silence is golden.

宋为

unread,
Apr 13, 2015, 5:34:22 AM4/13/15
to sh...@googlegroups.com
终于找到原因了!

是不该选这个选项“Intel P state control”,介绍里面说:“The driver
implements an internal governor and will become the scaling driver and
governor for Sandy bridge processors.”

如此一来,似乎内核提供的governor就被这个驱动覆盖了。

还是谢谢大家!

SuperCat

unread,
Apr 13, 2015, 6:34:28 AM4/13/15
to sh...@googlegroups.com
直接使用p-state就行,那个老驱动在现在的内核里面已经废弃了,装thermald这个东西可以管理

Reply all
Reply to author
Forward
0 new messages