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

Re: [patch] pwrctl with cpu speed throttling



> >> Simple patch to /etc/power/pwrctl to change the CPU speed based on the
> >> amount of battery left (not many laptops supported for now, afaik).
> >
> >Where do you use the amount of battery left ?
> >
> >> +			SPEEDMIN=`cat /proc/sys/cpu/0/speed-min`
> >> +			SPEEDMAX=`cat /proc/sys/cpu/0/speed-max`
> >> +			SPEED=`expr $SPEEDMIN + $SPEEDMAX / 2`
> >> +			echo $SPEED /proc/sys/cpu/0/speed
> >
> >The iBook2 supports only 400 and 700 MHz speed.
>
> Beware with those scripts, they'll have to change as the
> cpufreq core is beeing updated with a different interface,
> I'll update the one in my tree soon.

Meaning I'll need some way to distinguish between the interface versions,
or a minimum kernel version considered safe for a particular interface.

I'll add the code in question to the examples section in /usr/share/doc
for the time being, OK?

	Michael



Reply to: