If I boot it on AC the cpu runs at full speed, 900MHz; if I boot it on
battery it runs only at 630Mhz. Plugging / unplugging the AC does not
change the cpu frequency. Only a reboot can change the situation.
I already tried to echo 0 or 1 to the
/sys/devices/platform/eeepc/cpufv file; no effects, even if the file
changes its value.
This is not a regression from 2.6.33: this behavior is also present in
that version.
Does this ring any bells? This is really annoying, especially when
trying to watch a movie on battery. Also 3D apps show a 30%
performance drop, as expected.
Regards,
Fabio
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Can you change the frequency with cpufreq ?
Did you try all cpufv values (see cpufv_available file) ?
Is you bios up-to-date ?
--
Corentin Chary
http://xf.iksaif.net
On Wed, Mar 10, 2010 at 2:07 PM, Corentin Chary
<corenti...@gmail.com> wrote:
> On Tue, Mar 9, 2010 at 11:58 PM, Fabio Comolli <fabio....@gmail.com> wrote:
>> Hi.
>> I have an EeePC 900 running 2.6.34-rc1.
>>
>> If I boot it on AC the cpu runs at full speed, 900MHz; if I boot it on
>> battery it runs only at 630Mhz. Plugging / unplugging the AC does not
>> change the cpu frequency. Only a reboot can change the situation.
>>
>> I already tried to echo 0 or 1 to the
>> /sys/devices/platform/eeepc/cpufv file; no effects, even if the file
>> changes its value.
>>
>> This is not a regression from 2.6.33: this behavior is also present in
>> that version.
>>
>> Does this ring any bells? This is really annoying, especially when
>> trying to watch a movie on battery. Also 3D apps show a 30%
>> performance drop, as expected.
>
> Can you change the frequency with cpufreq ?
No, I can't. Which cpufreq driver am I supposed to use? With only
cpufreq compiled in, the directory
/sys/drivers/system/cpu/cpu0/cpufreq is empty.
> Did you try all cpufv values (see cpufv_available file) ?
Yes, it only shows 0 and 1. I tried both, without success.
> Is you bios up-to-date ?
Yes it is, it's 1006.
>
> --
> Corentin Chary
> http://xf.iksaif.net
>
Thanks.
Fabio
On Wed, Mar 10, 2010 at 2:46 PM, Fabio Comolli <fabio....@gmail.com> wrote:
> Hi.
>
> On Wed, Mar 10, 2010 at 2:07 PM, Corentin Chary
> <corenti...@gmail.com> wrote:
>> On Tue, Mar 9, 2010 at 11:58 PM, Fabio Comolli <fabio....@gmail.com> wrote:
>>> Hi.
>>> I have an EeePC 900 running 2.6.34-rc1.
>>>
>>> If I boot it on AC the cpu runs at full speed, 900MHz; if I boot it on
>>> battery it runs only at 630Mhz. Plugging / unplugging the AC does not
>>> change the cpu frequency. Only a reboot can change the situation.
>>>
>>> I already tried to echo 0 or 1 to the
>>> /sys/devices/platform/eeepc/cpufv file; no effects, even if the file
>>> changes its value.
>>>
>>> This is not a regression from 2.6.33: this behavior is also present in
>>> that version.
>>>
>>> Does this ring any bells? This is really annoying, especially when
>>> trying to watch a movie on battery. Also 3D apps show a 30%
>>> performance drop, as expected.
>>
>> Can you change the frequency with cpufreq ?
>
> No, I can't. Which cpufreq driver am I supposed to use? With only
> cpufreq compiled in, the directory
> /sys/drivers/system/cpu/cpu0/cpufreq is empty.
OK, there's something really wrong here.
I tried every possible cpufreq driver and the only one that loads is
p4-clockmod (the others say "no such device"). But...
The result is really unexpected, at least to me. The system switches
immediately to full speed, 900MHz (while running on battery). The
motivation is probably this:
[ 3.698307] conservative governor failed, too long transition
latency of HW, fallback to performance governor
[ 3.698334] p4-clockmod: P4/Xeon(TM) CPU On-Demand Clock Modulation available
The cause of this is probably that this driver thinks that my eeepc is
capable of many intermediate cpu frequency values:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
112500 225000 337500 450000 562500 675000 787500 900000
but the machine is only capable of 630 and 900MHz.
So, for me this is a really useful workaround: I compiled p4-clockmod
statically and so just a few seconds after boot I have my system
running at full speed :-)
To summarize:
-----Without p4-clockmod
* the eeepc-laptop cpufv interface doesn't work at all on my eeepc900
* this happens at least with 2.6.33 and 2.6.34-rc1
* if the system boots on AC power it stays forever at 900MHz
* if it boots on battery it stays forever at 630MHz
---With p4-clockmod
* the system boots at 630MHz if on battery
* as soon that p4-clockmod is loaded it switches to 900MHz
* p4-clockmod has a frequency table which is totally meaningless on the eeepc900
What a mess....
Regards,
Fabio
Unfortunately this is not true. /proc/cpuinfo says:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Celeron(R) M processor 900MHz
stepping : 8
cpu MHz : 900.000
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts
bogomips : 1260.35
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
As you can see, 900MHz with only 1260.35 bogomips (the value
correspondent to 630MHz).
A quick performance test confirms that the cpu is running at 630MHz
and that the value reported by /proc/cpuinfo is totally fake.
>
> To summarize:
>
> -----Without p4-clockmod
> * the eeepc-laptop cpufv interface doesn't work at all on my eeepc900
> * this happens at least with 2.6.33 and 2.6.34-rc1
> * if the system boots on AC power it stays forever at 900MHz
> * if it boots on battery it stays forever at 630MHz
>
> ---With p4-clockmod
> * the system boots at 630MHz if on battery
> * as soon that p4-clockmod is loaded it switches to 900MHz
> * p4-clockmod has a frequency table which is totally meaningless on the eeepc900
* p4-clockmod does not work at all on the eeepc900 too!
>
> What a mess....
>
Indeed.
> Regards,
> Fabio
On Tue, Mar 9, 2010 at 11:58 PM, Fabio Comolli <fabio....@gmail.com> wrote:
> Hi.
> I have an EeePC 900 running 2.6.34-rc1.
>
> If I boot it on AC the cpu runs at full speed, 900MHz; if I boot it on
> battery it runs only at 630Mhz. Plugging / unplugging the AC does not
> change the cpu frequency. Only a reboot can change the situation.
>
> I already tried to echo 0 or 1 to the
> /sys/devices/platform/eeepc/cpufv file; no effects, even if the file
> changes its value.
>
> This is not a regression from 2.6.33: this behavior is also present in
> that version.
>
> Does this ring any bells? This is really annoying, especially when
> trying to watch a movie on battery. Also 3D apps show a 30%
> performance drop, as expected.
>
> Regards,
> Fabio
Well, it turns out that this is indeed a regression, but I don't know
from which kernel version.
I reverted (not cleanly) this patch:
http://patchwork.kernel.org/patch/28591
and now
echo 1 > /sys/devices/platform/eeepc/cpufv
enables the powersave mode and
echo 0 > /sys/devices/platform/eeepc/cpufv
enables the performance mode.
Tested with the non-benchmark glxgears (275 frames/sec in powersave
mode and 405 in performance mode) and stellarium (14 frames and 20
frames).
Regards,
Thanks for the report,
Could you try to add a quick printk to show the value stored in
set_acpi(CM_ASL_CPUFV, value); ?
And also, could you send the result of acpidump ?
Thanks,
--
Corentin Chary
http://xf.iksaif.net
Yep, I know, but un-revert the patch, and add a printk :p
Could you also send the result of:
/* clean boot */
cat cpufv
echo 0 > cpufv
cat cpufv
echo 1 > cpufv
cat cpufv
I rebooted with the "vanilla" eeepc-laptop.c and I'm sorry to say that
the situation it's not like the one I described in the post I wrote 2
days ago. Actually the situation with the patch reverted is the same I
have with the patch applied.
What I mean is that if I boot on AC power /proc/cpuinfo always reports
900MHz and 1800 bogomips. It I boot on battery /proc/cpuinfo always
reports 630MHz and 1260 bogomips. Plugging / unplugging the AC does
not change the situation. Only reboot does.
But the cpufv interface does indeed seem to work, as glxgears and
stellarium show the frame rate change accordingly to the powersave /
performance selection.
So my question is: what does really the cpufv interface do? Is it
supposed to change the processor frequency? Or does it change
something else?
And if the answer to the latest question is affirmative, why
/proc/cpuinfo seems to ignore it?
Sorry for the confusion.
Regards,
Fabio
On Sat, Mar 13, 2010 at 10:16 AM, Corentin Chary
Here is what I can read in your DSDT:
When INIT or _Q31 is called, the bios check the the battery is
present, and call FSBA(0) or FSBA(1).
_Q31 seems to be called by an hotkey, could you run "acpi_listen" and
search the hotkey that generate 0x50 or 0x51 ?
FSBA is the method called by CFVS. When you do "echo 1 > cpufv" it
calls CFVS(1), then FSBA(1).
FSBA got 2 presets on 900.
Using these presets, is write some bytes to the EC and to something
wich sounds like clock (RCLK, WCKB, WLCK)
By the name it seems that it set the FSB, it may also surely change
the CPU Clock.
Now, I don't know why cpuinfo always show the same value, maybe
because the cpu clock is not changed
by a cpufreq driver.
This is the output requested.
hotkey ATKD 0000002e 00000000
hotkey ATKD 0000002f 00000000
hotkey ATKD 00000030 00000000
hotkey ATKD 00000012 00000000
hotkey ATKD 00000013 00000000
hotkey ATKD 00000014 00000000
hotkey ATKD 00000015 00000000
hotkey ATKD 00000010 00000000
button/sleep SLPB 00000080 00000001
hotkey ATKD 00000010 00000001
>
> FSBA is the method called by CFVS. When you do "echo 1 > cpufv" it
> calls CFVS(1), then FSBA(1).
> FSBA got 2 presets on 900.
>
> Using these presets, is write some bytes to the EC and to something
> wich sounds like clock (RCLK, WCKB, WLCK)
> By the name it seems that it set the FSB, it may also surely change
> the CPU Clock.
>
> Now, I don't know why cpuinfo always show the same value, maybe
> because the cpu clock is not changed
> by a cpufreq driver.
Well, the cpuinfo frequency value seems to be set only at boot: 630 if
booting from battery, 900 from AC.
>
> --
> Corentin Chary
> http://xf.iksaif.net
>
Thanks,
Fabio
Yes, writing to cpufv asks the BIOS to set the CPU speed.
> And if the answer to the latest question is affirmative, why
> /proc/cpuinfo seems to ignore it?
It's because eeepc-laptop doesn't register as a real cpufreq driver.
The BIOS doesn't tell us what frequency it switches to. Theoretically
you could re-use the boot code, but I'm not sure how you would make it
co-operate with the cpufreq core.
Alan
On Wed, Mar 17, 2010 at 3:49 PM, Alan Jenkins
<sourcej...@googlemail.com> wrote:
> On 3/13/10, Fabio Comolli <fabio....@gmail.com> wrote:
>> Well, I'm confused.
>>
>> I rebooted with the "vanilla" eeepc-laptop.c and I'm sorry to say that
>> the situation it's not like the one I described in the post I wrote 2
>> days ago. Actually the situation with the patch reverted is the same I
>> have with the patch applied.
>>
>> What I mean is that if I boot on AC power /proc/cpuinfo always reports
>> 900MHz and 1800 bogomips. It I boot on battery /proc/cpuinfo always
>> reports 630MHz and 1260 bogomips. Plugging / unplugging the AC does
>> not change the situation. Only reboot does.
>>
>> But the cpufv interface does indeed seem to work, as glxgears and
>> stellarium show the frame rate change accordingly to the powersave /
>> performance selection.
>>
>> So my question is: what does really the cpufv interface do? Is it
>> supposed to change the processor frequency?
>
> Yes, writing to cpufv asks the BIOS to set the CPU speed.
OK
>
>> And if the answer to the latest question is affirmative, why
>> /proc/cpuinfo seems to ignore it?
>
> It's because eeepc-laptop doesn't register as a real cpufreq driver.
> The BIOS doesn't tell us what frequency it switches to. Theoretically
> you could re-use the boot code, but I'm not sure how you would make it
> co-operate with the cpufreq core.
OK, now I understand. Thanks. So it seems that the only way to get the
actual CPU frequency is to query the cpufv sysfs file. Good to know.
Unless someone with the required knowledge comes up with the code
needed to register eeepc-laptop as a real cpufreq driver (hint, hint
:-) )
>
> Alan
>
Thanks,
Fabio
On Wed, Mar 17, 2010 at 9:22 AM, Corentin Chary
Found it!
Plugging the AC gives:
ac_adapter AC0 00000080 00000001
battery BAT0 00000080 00000001
hotkey ATKD 00000050 00000002
And unplugging gives:
battery BAT0 00000080 00000001
ac_adapter AC0 00000080 00000001
ac_adapter AC0 00000080 00000000
battery BAT0 00000080 00000001
hotkey ATKD 00000051 00000002
battery BAT0 00000080 00000001
ac_adapter AC0 00000080 00000000
However, the cpufv value is not affected at all.
>
> --
> Corentin Chary
> http://xf.iksaif.net
>
Regards,
Fabio