10.10的ATI开源驱动用户可以进来看看(关于电源管理)

CPU/显卡/打印机/USB设备等硬件问题
回复
头像
acid303
帖子: 547
注册时间: 2009-04-03 16:06

10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#1

帖子 acid303 » 2010-10-12 21:46

来源:http://www.x.org/wiki/RadeonFeature

KMS Power Management Options

Kernel 2.6.35 or newer is required. The pm code supports two basic methods:

1. "dynpm"
2. "profile"

You can select the methods via sysfs. Echo "dynpm" or "profile" to /sys/class/drm/card-0/device/power_method.

The "dynpm" method dynamically changes the clocks based on the number of pending fences, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The reclocking is attemped during vertical blanking periods, but due to the timing of the reclocking functions, doesn't not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.

The "profile" method exposes five profiles that can be selected from:

1. "default"
2. "auto"
3. "low"
4. "mid"
5. "high"

Select the profile by echoing the selected profile to /sys/class/drm/card-0/device/power_profile.

* "default" uses the default clocks and does not change the power state. This is the default behavior.
* "auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not. The "low" power state are selected when the monitors are in the dpms off state.
* "low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto does not use "low" when displays are active.
* "mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.
* "high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.

The "profile" method is not as agressive as "dynpm," but is currently much more stable and flicker free and works with multiple heads active.

Power management is supported on all asics (r1xx-evergreen) that include the appropriate power state tables in the vbios; not all boards do (especially older desktop cards).

感兴趣的小白可以试试
头像
acid303
帖子: 547
注册时间: 2009-04-03 16:06

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#2

帖子 acid303 » 2010-10-12 22:46

2.6.35内核或者以上的开源ATI用户,在开了kms(默认就是了)的情况下的电源管理:

推荐用profile的方法:

代码: 全选

sudo su
echo ‘default’ >/sys/class/drm/card0/device/power_profile
--默认是default,可供选择的有:default、auto、low、mid、high五种,下面是说明
* "default" uses the default clocks and does not change the power state. This is the default behavior.
* "auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not. The "low" power state are selected when the monitors are in the dpms off state.
* "low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto does not use "low" when displays are active.
* "mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.
* "high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.

我的显卡没有电源管理机制(这个应该和bios有关),所以没有效果,希望成功的童鞋通报声
上次由 acid303 在 2011-04-25 21:59,总共编辑 1 次。
头像
playfish
帖子: 46
注册时间: 2007-09-12 8:30

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#3

帖子 playfish » 2010-10-14 4:56

试了一下,用了mid,没啥变化阿。BTW,怎样查看GPU频率电压什么的参数?
头像
playfish
帖子: 46
注册时间: 2007-09-12 8:30

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#4

帖子 playfish » 2010-10-14 5:09

还有,我改了以后,重启系统,结果那两个配置文件的内容又变回去了……谁能告诉我是怎么回事?
yhd4711499
帖子: 10
注册时间: 2010-10-14 18:40

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#5

帖子 yhd4711499 » 2010-10-16 18:55

ubuntu 10.10没有drm这个文件夹
头像
jarryson
帖子: 4002
注册时间: 2005-08-14 19:53

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#6

帖子 jarryson » 2010-10-16 21:50

这两个“文件”并不是实际存在的,而是由radeon模块动态生成的,所以重启当然会失效。

所以你需要写到启动脚本里面去。比如arch里面是/etc/rc.local

只有ATI开源驱动用户才可以做这个修改。
头像
playfish
帖子: 46
注册时间: 2007-09-12 8:30

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#7

帖子 playfish » 2010-10-17 5:17

发现问题了,不是重启恢复,而是根本就没有写进去。我晕,sudo权限都不够,那什么权限够阿?

代码: 全选

sudo echo dynpm > power_method 
bash: power_method: 权限不够
然后我

代码: 全选

su root
密码: 
su:认证失败
然后就黔驴技穷了……
头像
jarryson
帖子: 4002
注册时间: 2005-08-14 19:53

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#8

帖子 jarryson » 2010-10-17 13:19

sudo su。

要检查当前显卡频率,需要使用debugfs

sudo mount none /sys/kernel/debug/ -t debugfs

然后cat /sys/kernel/debug/dri/0/radeon_pm_info就可以看到当前模式了
头像
playfish
帖子: 46
注册时间: 2007-09-12 8:30

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#9

帖子 playfish » 2010-10-18 2:01

哈哈,多谢。

代码: 全选

cat /sys/kernel/debug/dri/0/radeon_pm_info
default engine clock: 400000 kHz
current engine clock: 209250 kHz
default memory clock: 330000 kHz
current memory clock: 135000 kHz
经过一天的使用,效果还是很明显的。风扇经常停转。以前GPU温度常常在60度,现在稳定在55度。
头像
playfish
帖子: 46
注册时间: 2007-09-12 8:30

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#10

帖子 playfish » 2010-10-18 3:07

现在我不知道启动脚本怎么写了……

代码: 全选

sudo vim /etc/rc.local
加入

代码: 全选

sudo echo mid > /sys/class/drm/card0/device/power_profile
但重启后无作用。
头像
jarryson
帖子: 4002
注册时间: 2005-08-14 19:53

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#11

帖子 jarryson » 2010-10-18 12:55

ubuntu启动的时候是否会加载/etc/rc.local还不清楚。

而且写在系统启动脚本里面的语句是不用加sudo的,本身就是root运行的
头像
playfish
帖子: 46
注册时间: 2007-09-12 8:30

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#12

帖子 playfish » 2010-10-19 3:14

恩,去掉sudo 重启就正常了。灰常感谢!
pomhg
帖子: 10
注册时间: 2009-10-27 16:13

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#13

帖子 pomhg » 2010-10-19 15:30

xorg上给了开启kms和关闭kms两种情况的方法。
我强制使用low,结果进入xscreensaver后死了,关电源重启。

代码: 全选

"low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto does not use "low" when displays are active.
使用dynpm的话经常有闪烁现象,果然如xorg上的文档说的...

代码: 全选

The "dynpm" method dynamically changes the clocks based on the number of pending fences, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The reclocking is attemped during vertical blanking periods, but due to the timing of the reclocking functions, doesn't not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.
hd3470
头像
playfish
帖子: 46
注册时间: 2007-09-12 8:30

Re: 10.10的ATI开源驱动用户可以进来看看(关于电源管理)

#14

帖子 playfish » 2010-10-20 0:20

目前电源管理对r500以下的显卡支持的比较好,3450是r600吧。我现在跑mid一点问题都没碰到,跑dynpm死了一次机。跑low就会显示不正常。我是t60p的本,x1200显卡,正好是r500的。
回复