PowerNow!, cpufreq, and swsusp
Just compiled the 2.5.63 kernel with the intention of getting support for certain features of my laptop. I;ve got a Mobile Athlon XP 1800+ w/ PowerNow! technology and was hoping to use it, as well as be able to "hibernate" the machine.
Quoted 1 line
From .config:
#
# Power management options (ACPI, APM)
#CONFIG_PM=yCONFIG_SOFTWARE_SUSPEND=y
#
# ACPI Support
#CONFIG_ACPI=y
# CONFIG_ACPI_HT_ONLY is not setCONFIG_ACPI_BOOT=y
# CONFIG_ACPI_SLEEP is not setCONFIG_ACPI_AC=yCONFIG_ACPI_BATTERY=yCONFIG_ACPI_BUTTON=yCONFIG_ACPI_FAN=yCONFIG_ACPI_PROCESSOR=yCONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_TOSHIBA is not setCONFIG_ACPI_DEBUG=yCONFIG_ACPI_BUS=yCONFIG_ACPI_INTERPRETER=yCONFIG_ACPI_EC=yCONFIG_ACPI_POWER=yCONFIG_ACPI_PCI=yCONFIG_ACPI_SYSTEM=yCONFIG_APM=m
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_PROC_INTF is not set
# CONFIG_CPU_FREQ_24_API is not setCONFIG_CPU_FREQ_TABLE=y
#
# CPUFreq processor drivers
#
# CONFIG_X86_ACPI_CPUFREQ is not set
# CONFIG_X86_POWERNOW_K6 is not setCONFIG_X86_POWERNOW_K7=y
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set
And from /var/log/messages:
Mar 11 00:55:49 Judea kernel: powernow: AMD K7 CPU detected. Mar 11 00:55:49 Judea kernel: powernow: PowerNOW! Technology present. Can scale: frequency and voltage. Mar 11 00:55:49 Judea kernel: powernow: Found PSB header at c00f1920 Mar 11 00:55:49 Judea kernel: powernow: Table version: 0x12 Mar 11 00:55:49 Judea kernel: powernow: Flags: 0x0 (Mobile voltage regulator) Mar 11 00:55:49 Judea kernel: powernow: Settling Time: 100 microseconds. Mar 11 00:55:50 Judea kernel: powernow: Has 14 PST tables. (Only dumping ones relevant to this CPU). Mar 11 00:55:50 Judea kernel: powernow: PST:4 (@c00f1978) Mar 11 00:55:50 Judea kernel: powernow: cpuid: 0x780^Ifsb: 133^ImaxFID: 0x1^Istartvid: 0x9 Mar 11 00:55:50 Judea kernel: powernow: FID: 0x4 (5.0x [665MHz])^IVID: 0x13 (1.200V) Mar 11 00:55:50 Judea kernel: powernow: FID: 0x6 (6.0x [798MHz])^IVID: 0x13 (1.200V) Mar 11 00:55:50 Judea kernel: powernow: FID: 0xa (8.0x [1064MHz])^IVID: 0x13 (1.200V) Mar 11 00:55:50 Judea kernel: powernow: FID: 0xe (10.0x [1330MHz])^IVID: 0xb (1.450V) Mar 11 00:55:50 Judea kernel: powernow: FID: 0x1 (11.5x [1529MHz])^IVID: 0x9 (1.550V) Mar 11 00:55:50 Judea kernel: powernow: Minimum speed 665
MHz. Maximum speed 1529 MHz.
Quoted 1 line
From
/etc/lilo.conf:
# LILO configuration file
# generated by 'liloconfig' # # Start LILO global section append="hdc=ide-scsi, resume=/dev/hda3" boot = /dev/hda compact # faster, but won't work on all systems. prompt
When I boot, I get a message that no resume image was found (which is fine) and it boots normally. However, the documentation for swsusp says the following:
"You need to append resume=/dev/your_swap_partition to kernel command line. Then you suspend by echo 4 > /proc/acpi/sleep."
As shown above, that line has been entered into lilo.conf, however, /proc/acpi/sleep does not exist. What is the problem here?
Also, cpufreq doesn't seem to do anything. Should it be working automatically? Even when the machine sits unattended for over 8 hours, the fan never turns off and the cpu temperature is consustently 69-70 degrees C. What must I do here? Thanks for your help!
~Christopher
---------------------------------------
Use SaintMail! - http://www.saintmail.net
Quoted 2 lines · Christopher Meredith
Also, cpufreq doesn't seem to do anything. Should it be working automatically?
no.
Quoted 3 lines
Even when the machine sits unattended
for over 8 hours, the fan never turns off and the cpu temperature is consustently 69-70 degrees C.
The kernel doesn't define policy, but exposes the necessary interface to userspace. There are a few folks working on tools / scripts to adjust the speed dynamically. look through the cpufreq mailing list archives to find them (or google)
Quoted 1 line
What must I do here?
Read Documentation/cpu-freq/user-guide.txt
short: mount sysfs, and ..
(root@evo:cpufreq)# cd /sys/class/cpu/cpufreq/cpu0/cpufreq (root@evo:cpufreq)# cat /proc/cpuinfo | grep MHz cpu MHz : 1390.536 (root@evo:cpufreq)# echo powersave >scaling_governor (root@evo:cpufreq)# cat /proc/cpuinfo | grep MHz cpu MHz : 529.728 (root@evo:cpufreq)# echo performance >scaling_governor
Dave
Quoted 23 lines · On Wed, 12 Mar 2003 17:40:01 -0100 Dave Jones <[email protected]> wrote:
Quoted 2 lines · Christopher Meredith
Also, cpufreq doesn't seem to do anything. Should it be working automatically?
no.
Quoted 3 lines
Even when the machine sits unattended
for over 8 hours, the fan never turns off and the cpu temperature is consustently 69-70 degrees C.The kernel doesn't define policy, but exposes the necessary interface to userspace. There are a few folks working on tools / scripts to adjust the speed dynamically. look through the cpufreq mailing list archives to find them (or google)
Quoted 1 line
What must I do here?
Read
Documentation/cpu-freq/user-guide.txtshort: mount sysfs, and ..
Quoted 8 lines
(root@evo:cpufreq)# cd /sys/class/cpu/cpufreq/cpu0/cpufreq (root@evo:cpufreq)# cat /proc/cpuinfo | grep MHz cpu MHz : 1390.536 (root@evo:cpufreq)# echo powersave >scaling_governor (root@evo:cpufreq)# cat /proc/cpuinfo | grep MHz cpu MHz : 529.728 (root@evo:cpufreq)# echo performance >scaling_governor
All right, it seems that for me, these things reside in /sys/devices/sys/cpu0:
root@Judea:/sys/devices/sys/cpu0# ls available_scaling_governors name scaling_governor cpuinfo_max_freq power scaling_max_freq cpuinfo_min_freq scaling_driver scaling_min_freq
At any rate, 'cat available_scaling_governors' gives this:
performance powersave
If I 'echo powersave > scaling_governor', the fan slows down and the processor registers at about 600+ MHz (down from 1500+). So far so good. But when I 'echo performance > scaling_governor', the entire system locks up and I have to hard reset. Am I still missing something here? Also, I had thought the purpose of this technology was to incrementally scale the clock speed depending upon what the computer was doing, this saving battery power. Is this correct? If so, how do I enable this?
Also, with regard to swsusp, after creating a swap partition and seemingly adding the 'resume' line to lilo.conf, whenever I do 'echo 4 > /proc/acpi/sleep', the computer ditches X and prints ACPI information on all consoles. This seems good at first, but no matter how long I let it sit, it doesn't ever suspend or try to do anything similar (that I can tell). Am I still doing something wrong?
Thanks!
~Christopher
Quoted 1 line · Christopher Meredith
#
CONFIG_ACPI_SLEEPis not set
Switching this on will give you /proc/acpi/sleep. Then swsusp should be a step closer.
Regards,
Nigel