TP-240/kernel 2.6.9 power management

From: John Thompson (john_at_starfleet.os2.dhs.org)
Date: 12/22/04

  • Next message: Bill Waddington: "Re: TP-240/kernel 2.6.9 power management"
    Date: Wed, 22 Dec 2004 16:07:39 GMT
    
    

    I've installed Vectorlinux-4.3 on my Thinkpad 240 and all was well. I
    needed to patch my kernel to use Win$lin, so I downloaded the 2.6.9
    sources, patched, copied the old .config file from 2.6.7 over and ran
    "make oldconfig" and built my new kernel. Rebooted, Win4Lin works fine,
    but power management stopped working. I checked the .config file t5o make
    sure it was still there:

    bash-2.05b$ grep APM /usr/src/linux-2.6.9/.config
    # Power management options (ACPI, APM)
    # APM (Advanced Power Management) BIOS Support
    CONFIG_APM=y
    # CONFIG_APM_IGNORE_USER_SUSPEND is not set
    CONFIG_APM_DO_ENABLE=y
    CONFIG_APM_CPU_IDLE=y
    CONFIG_APM_DISPLAY_BLANK=y
    CONFIG_APM_RTC_IS_GMT=y
    # CONFIG_APM_ALLOW_INTS is not set
    # CONFIG_APM_REAL_MODE_POWER_OFF is not set
    bash-2.05b$ grep ACPI /usr/src/linux-2.6.9/.config
    # Power management options (ACPI, APM)
    # ACPI (Advanced Configuration and Power Interface) Support
    CONFIG_ACPI=y
    CONFIG_ACPI_BOOT=y
    CONFIG_ACPI_INTERPRETER=y
    CONFIG_ACPI_SLEEP=y
    CONFIG_ACPI_SLEEP_PROC_FS=y
    CONFIG_ACPI_AC=m
    CONFIG_ACPI_BATTERY=m
    CONFIG_ACPI_BUTTON=m
    CONFIG_ACPI_FAN=m
    CONFIG_ACPI_PROCESSOR=m
    CONFIG_ACPI_THERMAL=m
    CONFIG_ACPI_ASUS=m
    CONFIG_ACPI_TOSHIBA=m
    CONFIG_ACPI_BLACKLIST_YEAR=0
    # CONFIG_ACPI_DEBUG is not set
    CONFIG_ACPI_BUS=y
    CONFIG_ACPI_EC=y
    CONFIG_ACPI_POWER=y
    CONFIG_ACPI_PCI=y
    CONFIG_ACPI_SYSTEM=y
    CONFIG_X86_ACPI_CPUFREQ=m
    # CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
    CONFIG_X86_POWERNOW_K7_ACPI=y
    CONFIG_X86_POWERNOW_K8_ACPI=y
    CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
    CONFIG_HOTPLUG_PCI_ACPI=m
    CONFIG_HOTPLUG_PCI_ACPI_IBM=m
    # CONFIG_SERIAL_8250_ACPI is not set

    Looks like it's all there. But when I try to use apm:

    bash-2.05b# /usr/sbin/apmd start
    No APM support in kernel
    bash-2.05b$ xapm
    No APM support in kernel

    What gives? Let's see what the kernel says it was built with:

    bash-2.05b$ zgrep APM /proc/config.gz
    # Power management options (ACPI, APM)
    # APM (Advanced Power Management) BIOS Support
    CONFIG_APM=y
    # CONFIG_APM_IGNORE_USER_SUSPEND is not set
    CONFIG_APM_DO_ENABLE=y
    CONFIG_APM_CPU_IDLE=y
    CONFIG_APM_DISPLAY_BLANK=y
    CONFIG_APM_RTC_IS_GMT=y
    # CONFIG_APM_ALLOW_INTS is not set
    # CONFIG_APM_REAL_MODE_POWER_OFF is not set
    bash-2.0.5b$ zgrep ACPI /proc/config.gz
    # Power management options (ACPI, APM)
    # ACPI (Advanced Configuration and Power Interface) Support
    CONFIG_ACPI=y
    CONFIG_ACPI_BOOT=y
    CONFIG_ACPI_INTERPRETER=y
    CONFIG_ACPI_SLEEP=y
    CONFIG_ACPI_SLEEP_PROC_FS=y
    CONFIG_ACPI_AC=m
    CONFIG_ACPI_BATTERY=m
    CONFIG_ACPI_BUTTON=m
    CONFIG_ACPI_FAN=m
    CONFIG_ACPI_PROCESSOR=m
    CONFIG_ACPI_THERMAL=m
    CONFIG_ACPI_ASUS=m
    CONFIG_ACPI_TOSHIBA=m
    CONFIG_ACPI_BLACKLIST_YEAR=0
    # CONFIG_ACPI_DEBUG is not set
    CONFIG_ACPI_BUS=y
    CONFIG_ACPI_EC=y
    CONFIG_ACPI_POWER=y
    CONFIG_ACPI_PCI=y
    CONFIG_ACPI_SYSTEM=y
    CONFIG_X86_ACPI_CPUFREQ=m
    # CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
    CONFIG_X86_POWERNOW_K7_ACPI=y
    CONFIG_X86_POWERNOW_K8_ACPI=y
    CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
    CONFIG_HOTPLUG_PCI_ACPI=m
    CONFIG_HOTPLUG_PCI_ACPI_IBM=m
    # CONFIG_SERIAL_8250_ACPI is not set

    Well, the kernel thinks it was built using this .config file, so where's
    my power management?

    I have acpi in the /proc filesystem:

    /proc/acpi/:
    total 0
    -rw-r--r-- 1 root root 0 Dec 22 09:50 alarm
    -r-------- 1 root root 0 Dec 22 09:50 dsdt
    dr-xr-xr-x 3 root root 0 Dec 22 09:50 embedded_controller
    -r-------- 1 root root 0 Dec 22 09:49 event
    -r-------- 1 root root 0 Dec 22 09:50 fadt
    -r--r--r-- 1 root root 0 Dec 22 09:50 info
    dr-xr-xr-x 3 root root 0 Dec 22 09:50 power_resource
    -rw-r--r-- 1 root root 0 Dec 22 09:50 sleep
    -rw-r--r-- 1 root root 0 Dec 22 09:50 wakeup

    /proc/acpi/embedded_controller:
    total 0
    dr-xr-xr-x 2 root root 0 Dec 22 09:50 EC0

    /proc/acpi/embedded_controller/EC0:
    total 0
    -r--r--r-- 1 root root 0 Dec 22 09:50 info

    /proc/acpi/power_resource:
    total 0
    dr-xr-xr-x 2 root root 0 Dec 22 09:50 PFAN
    /proc/acpi/power_resource/PFAN:
    total 0
    -r--r--r-- 1 root root 0 Dec 22 09:50 state

    But it doesn't seem to be working.

    To re-iterate: it *DID* work using the 2.6.7 kernel that came with
    Vectorlinux-4.3; it doesn't work with the 2.6.9 kernel I build to use with
    Win4Lin.

    Any ideas?

    -- 
    John (john@os2.dhs.org)
    

  • Next message: Bill Waddington: "Re: TP-240/kernel 2.6.9 power management"

    Relevant Pages

    • Re: [PATCH 4/4] Remove obsolete piece of PM documentation
      ... -Linux system and how to add power management support to Linux drivers. ... -Advanced Configuration and Power Interface (ACPI). ... -is possible with BIOS controlled APM. ... Registering suspend notifiers in device drivers ...
      (Linux-Kernel)
    • Re: ``shutdown -p now not working in 5.4 STABLE
      ... For power-down, you need to be using ACPI, not APM. ... > But from your dmesg output, it looks like you are using ACPI, ... Ok, I built APM into the kernel and gave it a few tries, fiddling with ...
      (freebsd-stable)
    • Re: You need ACPI or APM for soft power-down.
      ... you need APM or ACPI for this to work. ... >>work in SMP mode (there's a line in the kernel messages you posted ... and you've just turned off ACPI for nearly everything. ... > APM is out the question on SMP, due to the way it's designed. ...
      (Fedora)
    • Re: CONFIG_SOFTWARE_SUSPEND=y, ACPI, and uswsusp
      ... # Power management options (ACPI, APM) ... This is a self compiled kernel. ...
      (Debian-User)
    • Re: Power off
      ... All I want from power management is switching off at the end, ... know if APM or ACPI is preferable for that. ... APM compiled into kernel: ...
      (Debian-User)