[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: throttling cpu speed to run cooler



Robert Storey wrote:

> A few weeks ago, one of the people on this list announced a similar
> utility for OpenBSD, perfd:
> 
> http://tratt.net/laurie/obsd/perfd/
> 
> However, perfd only throttles the cpu when you are running exclusively
> on battery power. I'm looking for something that will throttle it even
> when plugged into a wall socket. I only want 100% power when the load
> requires it. Maybe 80% of the time, I'm just sitting in front of the
> machine with the cpu idling, generating lots of heat unnecessarily.
> 
> I'm just wondering if a utility similar to powernowd already exists for
> OpenBSD? Or if someone is interested in developing it? Wish I could do
> it myself, but I confess it's beyond me.

The code for perfd is only 239 lines.  You might find the interesting 
lines (lines 173-177):

     if (apm_info.ac_state == APM_AC_ON)
         /* If the mains power is connected, we make sure the machine is
            running at full power. */
         new_perf = 100;
     else if (apm_info.ac_state == APM_AC_BACKUP ||

I wonder what changing them to this would do?

     //if (apm_info.ac_state == APM_AC_ON)
     //  /* If the mains power is connected, we make sure the machine is
     //     running at full power. */
     //  new_perf = 100;
     if (apm_info.ac_state == APM_AC_BACKUP ||

Gaby

-- 
Ha! Ha! Ha!  Dislocation...
- Phil Ken Sebben

gaby@vanhegan.net
http://vanhegan.net