[ltp] X60s: scaling_governor on resume

Justin Mazzola Paluska linux-thinkpad@linux-thinkpad.org
Fri, 13 Oct 2006 10:44:45 -0400


--XF85m9dhOBO43t/C
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Hi,

I’m running an X60s with Debian Testing and a 2.6.17-1-686 SMP kernel.
Using Debian’s hibernate script I can get the laptop to both
suspend-to-RAM and suspend-to-disk reliably.  However, when the system
resumes, the scaling_governor for CPU1 is always set to “performance”,
when I’d like it to be set to “powersave” when on battery and
“ondemand” when on AC.

I have two scripts (attached) that set the governor on battery
(/etc/acpi/battery.d/scale-down-cpus.sh) or AC
(/etc/acpi/ac.d/scale-up-cpus.sh) events from acpid.  They work fine
if I plug and unplug the power while the machine is running.

However, no matter if the machine stays plugged or unplugged when it’s
asleep, when it wakes up CPU1’s governor gets set to performance.  Any
ideas on why?

Thanks,
	—Justin

--XF85m9dhOBO43t/C
Content-Type: application/x-sh
Content-Disposition: attachment; filename="scale-down-cpus.sh"
Content-Transfer-Encoding: quoted-printable

#!/bin/bash=0Aecho powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling=
_governor=0Aecho powersave > /sys/devices/system/cpu/cpu1/cpufreq/scaling_g=
overnor=0A
--XF85m9dhOBO43t/C
Content-Type: application/x-sh
Content-Disposition: attachment; filename="scale-up-cpus.sh"
Content-Transfer-Encoding: quoted-printable

#!/bin/bash=0Aecho ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_=
governor=0Aecho ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_gov=
ernor=0A
--XF85m9dhOBO43t/C--