# p4-clockmod problematic as always

## i92guboj

Hello.

About this one, I am more interested in gaining knowledge about this issue than I am about finding a cure to the illness (that wouldn't hurt, though).

I have received a broken laptop which I am trying to set up for daily usage with Gentoo.

It's a Pavilion zd8000, which comes with a p4 cpu. It runs mostly fine, if you leave the crappy b43 wifi chip and its firmware issue aside.

I am experiencing some pain in setting up the power saving and speed stepping features though. This thing seems to work only with the p4-clockmod driver. I have tried the acpi p-states driver and it doesn't seem to work at all. I also tried the intel drivers, because this board has an ich6 southbridge, but they didn't seem to do a thing either.

There are many bad things about the p4-clockmod driver though.

The first time I tried it, it loaded correctly and I was able to use the /sys interface, however each time I tried to set any governor other than "performance" I was presented (via dmesg log) with a message telling me that due to latency issues I couldn't use this or that governor, and that the driver was reverting back to "performance". Looking around in the internet I came to the conclusion that I should patch the kernel myself to revert some change that someone did some time ago. I changed drivers/cpufreq/p4-clockmod.c this way:

```

-        policy->cpuinfo.transition_latency = 10000001;

+        policy->cpuinfo.transition_latency = 1000000;

```

That allowed me to set the governor to something else. Now that I've done that the performance is a bit horrible (conservative or ondemand, it doesn't seem to matter much).

I am wondering if anyone has even gotten this to work in this laptop or at least this same cpu with some other driver that's not p4-clockmod, or if there's some magical kernel patch out there that I am not aware of.

I also wonder if the old apm stuff can manage some of this stuff at all. I really didn't pay attention to apm back on its day just because I didn't have a laptop back then.

Well, that's all. Thanks for reading  :Wink: 

EDIT: Opps, the cpuinfo.

```
processor   : 0

vendor_id   : GenuineIntel

cpu family   : 15

model      : 4

model name   : Intel(R) Pentium(R) 4 CPU 3.20GHz

stepping   : 3

microcode   : 0x5

cpu MHz      : 1200.000

cache size   : 2048 KB

physical id   : 0

siblings   : 1

core id      : 0

cpu cores   : 1

apicid      : 0

initial apicid   : 0

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 5

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl est cid cx16 xtpr

bogomips   : 6383.97

clflush size   : 64

cache_alignment   : 128

address sizes   : 36 bits physical, 48 bits virtual

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 15

model      : 4

model name   : Intel(R) Pentium(R) 4 CPU 3.20GHz

stepping   : 3

microcode   : 0x5

cpu MHz      : 1200.000

cache size   : 2048 KB

physical id   : 0

siblings   : 1

core id      : 0

cpu cores   : 0

apicid      : 1

initial apicid   : 1

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 5

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl est cid cx16 xtpr

bogomips   : 6383.97

clflush size   : 64

cache_alignment   : 128

address sizes   : 36 bits physical, 48 bits virtual

power management:

```

----------

## Gusar

p4-clockmod isn't about speed-stepping or about power saving. The p4 doesn't have any power saving abilities. Looking around the internet, you found a bunch of people not knowing what they're doing and how their hardware actually works.

p4-clockmod does clock modulation, and it has one single purpose - thermal management. So load the module, but it doesn't make sense to use anything but the performance governor with it.

----------

## i92guboj

 *Gusar wrote:*   

> p4-clockmod isn't about speed-stepping or about power saving. The p4 doesn't have any power saving abilities. Looking around the internet, you found a bunch of people not knowing what they're doing and how their hardware actually works.
> 
> p4-clockmod does clock modulation, and it has one single purpose - thermal management. So load the module, but it doesn't make sense to use anything but the performance governor with it.

 

You're surely right, but the fact is that when using performance, my fans become mad. It's the noise which annoys me the most, not the lack of power saving capabilities.

ondemand means a lower cpu frequency, which means less heat, which means slower fans, which, in turn, means less noise. MUCH less noise. If there's no way to make it work, so be it. But facts are facts  :Smile: 

----------

## Gusar

 *i92guboj wrote:*   

> You're surely right, but the fact is that when using performance, my fans become mad. It's the noise which annoys me the most, not the lack of power saving capabilities.

 

Open the thing up and thoroughly clean the cooling ribs. Might help. Beyond that, there's nothing you can do. I have an old laptop with a P4, it's modes of operation are "loud" and "very loud"  :Smile: . After a few months when the ribs get clogged with dust, there's then only one mode - "very loud"  :Smile: 

 *i92guboj wrote:*   

> ondemand means a lower cpu frequency,

 

No it doesn't. Not on a P4. The processor is incapable of lowering it's freq. Even if you switch to the powersave governor and linux will tell you it's supposedly running at 320Mhz, the CPU will still be at 3.2GHz, it just won't do work except every tenth tick. There's a reason the module is called p4-clockmod (clock modulation) and not p4-cpufreq.

clock modulation != frequency scaling

----------

## i92guboj

Well, thanks for the into. I already cleaned the dirt and replaced the thermal paste over the cpu. So, the best thing I can do is to buy a couple of new earplugs.   :Laughing: 

----------

