APM, ACPI and shutting down
Paul Eggleton <[email protected]> Wed, 7 Jan 2004 21:05:05 +1300
| Newsgroups | gmane.linux.power-management.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi there, I hope I'm posting to the right list - I'm attempting to get my Linux machine to shut down cleanly when I press the (ATX) power button. Previously I had a 2.2 kernel installation, and I used the powerswitch kernel module to do this; it apparently intercepted the APM SUSPEND event and then called shutdown -h now. Unfortunately this 3rd-party module is only for 2.2 and seems to have vanished in any case. It seems that with my new 2.4.23 setup I can't get Linux to produce any events when the power button is pressed, let alone get it to shut down at that time. Firstly I tried using APM and apmd. Both the kernel and apmd seem to load fine, but nothing happens when I press the power button. I added a line to the /etc/apm/apmd_proxy script and confirmed it wasn't being called. I also added apm=debug to the kernel command line (I have apm compiled in), which was recognised by the kernel but didn't result in any messages being produced when I pressed the button. Then someone suggested I try ACPI. Previously I had ignored it as the kernel reports that my BIOS's ACPI implementation is too old (BIOS is from 2000) and refuses to load. However I tried the acpi=force option and got the following results from dmesg: ------- snip ------- Linux version 2.4.23 (root@xp2000) (gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice)) #1 Wed Jan 7 18:15:06 NZDT 2004 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 00000000000a0000 (usable) BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 0000000003ff0000 (usable) BIOS-e820: 0000000003ff0000 - 0000000003ff3000 (ACPI NVS) BIOS-e820: 0000000003ff3000 - 0000000004000000 (ACPI data) BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved) 63MB LOWMEM available. ACPI: have wakeup address 0xc0001000 On node 0 totalpages: 16368 zone(0): 4096 pages. zone(1): 12272 pages. zone(2): 0 pages. ACPI: RSDP (v000 Jetway ) @ 0x000f7470 ACPI: RSDT (v001 Jetway AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x03ff3000 ACPI: FADT (v001 Jetway AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x03ff3040 ACPI: DSDT (v001 JETWAY AWRDACPI 0x00001000 MSFT 0x0100000c) @ 0x00000000 Kernel command line: root=/dev/hda5 acpi=force No local APIC present or hardware disabled Initializing CPU#0 Console: colour VGA+ 80x25 Calibrating delay loop... 149.50 BogoMIPS Memory: 61192k/65472k available (2025k kernel code, 3896k reserved, 726k data, 1 12k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) Inode cache hash table entries: 4096 (order: 3, 32768 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 16384 (order: 4, 65536 bytes) CPU: After generic, caps: 00000001 00000000 00000000 00000004 CPU: Common caps: 00000001 00000000 00000000 00000004 CPU: Cyrix 6x86 2x Core/Bus Clock stepping 07 Checking 'hlt' instruction... OK. POSIX conformance testing by UNIFIX mtrr: v1.40 (20010327) Richard Gooch ([email protected]) mtrr: detected mtrr type: Cyrix ARR ACPI: Subsystem revision 20031002 PCI: PCI BIOS revision 2.10 entry at 0xfb4b0, last bus=1 PCI: Using configuration type 1 tbxface-0117 [03] acpi_load_tables : ACPI Tables successfully acquired Parsing all Control Methods:.................................................... ......... Table [DSDT](id F004) - 282 Objects with 27 Devices 61 Methods 18 Regions ACPI Namespace successfully loaded at root c03e59bc ACPI: IRQ9 SCI: Level Trigger. evxfevnt-0089: *** Error: Could not transition to ACPI mode. utxface-0170 [03] acpi_enable_subsystem : acpi_enable failed. ACPI: Unable to start the ACPI Interpreter evxfevnt-0127 [06] acpi_disable : System is already in legacy (non-ACPI ) mode utalloc-0986 [05] ut_dump_allocations : No outstanding allocations. PCI: Probing PCI hardware PCI: ACPI tables contain no PCI IRQ routing entries PCI: Probing PCI hardware (bus 00) PCI: Using IRQ router ALI [10b9/1533] at 00:07.0 PCI: Found IRQ 11 for device 00:02.0 isapnp: Scanning for PnP cards... isapnp: No Plug & Play device found Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16) ------- snip ------- I've tried playing with some of the settings in the BIOS but nothing seems to have helped with either APM or ACPI. The machine is a Cyrix 6x86 (i586) on a Jetway J-542B Socket 7 motherboard. It's old, but in theory I should be able to get this to work as the old powerswitch module had no trouble picking up the APM SUSPEND signal. I would try the 2.6 kernel, however my satellite card for internet acces requires the use of a binary-only module and it is only compatible with 2.4 (I have booted without loading it and verified that it is not causing the problem). In case it is relevant, I am using Gentoo Linux. The version of apmd I was trying was 3.0.2. Any help here would be greatly appreciated. Cheers, Paul ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click