# P4-clockmod with Pentium-M

## nick24

I have an ASUS Eee 900 laptop that I've had for a few months. I've been using the P4-clockmod driver in my kernel (gentoo-sources 2.6.25-r7) to change it's clock frequency. The processor is a celeron-m, which I've heard is actually a cut down, suped up pentium III. The driver works surprisingly well for an officially unsupported chip, but it has very high latency, taking a couple seconds to go from 112 MHz to 800 MHz. It also runs more than 8 times slower when fully underclocked, probably because of the hackish nature of the driver. I was wondering if anyone knew of a better driver that works with the pentium-m/celeron-m, or if it's a bad idea to use P4-clockmod with a pentium-m.

Thanks!

----------

## Geralt

 *nick24 wrote:*   

> The driver works surprisingly well for an officially unsupported chip, but it has very high latency, taking a couple seconds to go from 112 MHz to 800 MHz. 
> 
> 

 

Hi,

using p4-clockmod for a celeron-m is fine. What governor are you using? With ondemand governor it should scale pretty fast, but if you're using the conservative governor that behaviour is wanted.

If you're using the userspace governor it depends an what you're using to control the clock rate.

I am not sure if celeron-m is capable of this, but at least newer intel cpus (core cpus) have "super power-saving" mode (LFM) which is drastically weaker than normal underclocking to rates similiar to it.

And of course execution time does not necessarily scale linear with clock rate.

----------

## nick24

It is actually using the ondemand governor. I think the description in menuconfig even says that it is experimental and can be high latency, so I'm not too surprised that it takes so long. I might have been overestimating on the time before, it's really between half a second and a second (judging by an obvious speedup when running an infinite loop program), but that's still pretty significant with a low spec laptop. I just wasn't sure if there were any drivers that aren't in the vanilla kernel that work faster and with a pentium-m.

----------

## Geralt

The ondemand governor can only increase/decrease the clock rate after analyzing your cpu usage and this takes some time. If you want full performance that's what the performance governor is for.

Maybe you should take a look at the userspace governor and the hundreds of cpufreq daemons out there, they provide you with almost infinite freedom concerning the fine-tuning of your cpu scaling.

I personally use ondemand all the time, performance sometimes and in battery mode powersafe, except wenn I need more cpu power. And switching is done manually by the xfce governor applet, because I realized that I am the only person who knows how my cpu should scale at any given time.

----------

## Carsomyr

You could try the ACPI P-states driver, that is the correct driver for the pentium-m and probably the celeron-m as well. 

The frequency probably won't drop as low, but the p-states driver reduces the voltage as well, so it still saves power. The p-states driver should also allow you to have the CPU at it's full 900 Mhz, rather than the 800 where it seems yours stops

The pstates driver should also give beter latency, as it is using the built-in features of the chip.

The module is acpi-cpufreq

----------

## anatemus

As a ASUS Eee 900 and gentoo user I find this thread extremely interesting. I haven't set up scaling for my eee yet, just checking out threads like this.

Some questions:

Is p4-clockmod actually working on eee? I mean does it save battery and lower temperature. According  this EeeUser post it just somewhat makes system slower without any benefits.

Have anyone tried eee900freq  driver? It should use BIOS' ACPI methods for frequency swtiching. I've tried it briefly, no success so far: causes a reboot in few secs. Have to fiddle more when I'll have some extra time  :Smile: 

----------

## Carsomyr

If the ACPI interfaces are standard (which they should be), then they should be triggered correctly by the acpi-cpufreq driver, which should be more stable than the eee900freq module, and does basically the same thing. This is also the driver recommended on Arch (http://wiki.archlinux.org/index.php/Asus_Eee_PC_901#Speedstep) for the 901 at least. 

I don't have an eeePC myself, but for most new intel CPU's acpi-cpufreq does the job, although a lot of people seem to keep using p4-clockmod because it seems to make the frequency go lower. Most test I've seen show that the acpi-cpufreq performs beter, because it can control core voltage as well. The only way that the acpi-cpufreq module won't work is if asus has disabled that part of the acpi functionality.

Also from the kernel descrption of p4-clockmod

 *Quote:*   

> This adds the CPUFreq driver for Intel Pentium 4 / XEON
> 
> processors. When enabled it will lower CPU temperature by skipping
> 
> clocks.
> ...

 

The speedstep module has been incorperated into acpi-cpufreq

----------

## anatemus

@nick24, I hope you don't feel like I'm hijacking your thread, probably this helps you too  :Confused: 

 *Carsomyr wrote:*   

> If the ACPI interfaces are standard (which they should be), then they should be triggered correctly by the acpi-cpufreq driver, which should be more stable than the eee900freq module, and does basically the same thing

 

```
eee ~ # modprobe acpi-cpufreq

FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.27-gentoo/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device

```

So, aren't the eee's ACPI interfaces standard, or am I missing something?

----------

## Carsomyr

I see there is an asus_acpi module in the kernel. Do you have that compiled and loaded as well? It's possible that the extra module is required to expose the needed acpi interfaces on asus laptops (hopefully including the eee).

The possibility also exists that the normal acpi interface is hidden by the bios so that asus can perform their own powermanagment of the cpu?

----------

