Summary: | gentoo-dev-sources-2.6.8-r7: poweroff does not work | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andre.hinrichs, krosswindz |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Dmesg output with out nolapic boot parameter |
Description
Toralf Förster
![]() I added in the function acpi_power_off() of the file /usr/src/linux/drivers/acpi/sleep/poweroff.c more printk - statements: ... static void acpi_power_off (void) { printk("%s called 1\n",__FUNCTION__); /* Some SMP machines only can poweroff in boot CPU */ set_cpus_allowed(current, cpumask_of_cpu(0)); printk("%s called 2\n",__FUNCTION__); acpi_enter_sleep_state_prep(ACPI_STATE_S5); printk("%s called 3\n",__FUNCTION__); ACPI_DISABLE_IRQS(); printk("%s called 4\n",__FUNCTION__); acpi_enter_sleep_state(ACPI_STATE_S5); printk("%s called 5\n",__FUNCTION__); } ... and got at the last lines on my console: ... acpi_power_off called 2 acpi_power_off called 3 acpi_power_off called 4 Please try reverting "2705_fix-intel-acpi.patch" from the genpatches tarball. Yep, it work's now as expected. I added the paczh to exclude to the line: UNIPATCH_EXCLUDE="${UNIPATCH_EXCLUDE} 1321_x86_64-noiommu.patch 2705_fix-intel-acpi.patch" and the system is powered off during halt. FYI here is the difference in the dmesg: tfoerste@nhh221 ~ $ dmesg > d tfoerste@nhh221 ~ $ diff d dmesg-2.6.8-gentoo-r7 1c1 < Linux version 2.6.8-gentoo-r7 (root@nhh221) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #1 Fri Oct 8 11:37:44 CEST 2004 --- > Linux version 2.6.8-gentoo-r7 (root@nhh221) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #1 Thu Oct 7 09:49:41 CEST 2004 16d15 < Dell Inspiron with broken BIOS detected. Refusing to enable the local APIC. 22a22,23 > Local APIC disabled by BIOS -- reenabling. > Found and enabled local APIC! 26c27 < Detected 1699.051 MHz processor. --- > Detected 1698.724 MHz processor. 31c32 < Memory: 1034388k/1048248k available (2598k kernel code, 12964k reserved, 830k data, 156k init, 130744k highmem) --- > Memory: 1034388k/1048248k available (2598k kernel code, 12960k reserved, 830k data, 156k init, 130744k highmem) 37,38c38,39 < CPU: After generic identify, caps: afe9f9bf 00000000 00000000 00000000 < CPU: After vendor identify, caps: afe9f9bf 00000000 00000000 00000000 --- > CPU: After generic identify, caps: afe9fbbf 00000000 00000000 00000000 > CPU: After vendor identify, caps: afe9fbbf 00000000 00000000 00000000 40c41 < CPU: After all inits, caps: afe9f9bf 00000000 00000000 00000040 --- > CPU: After all inits, caps: afe9fbbf 00000000 00000000 00000040 47,52c48,50 < init init/main.c:657 < init init/main.c:670 < init init/main.c:675 < do_pre_smp_initcalls init/main.c:621 < do_pre_smp_initcalls init/main.c:627 < init init/main.c:679 --- > ACPI: IRQ9 SCI: Edge set to Level Trigger. > init init/main.c:664 > init init/main.c:677 54c52,53 < init init/main.c:684 --- > do_pre_smp_initcalls init/main.c:628 > do_pre_smp_initcalls init/main.c:634 56,58c55,67 < init init/main.c:692 < do_basic_setup init/main.c:602 < do_basic_setup init/main.c:604 --- > init init/main.c:689 > enabled ExtINT on CPU#0 > ESR value before enabling vector: 00000000 > ESR value after enabling vector: 00000000 > Using local APIC timer interrupts. > calibrating APIC timer ... > ..... CPU clock speed is 1698.0283 MHz. > ..... host bus clock speed is 99.0898 MHz. > init init/main.c:691 > init init/main.c:693 > init init/main.c:699 > do_basic_setup init/main.c:609 > do_basic_setup init/main.c:611 64d72 < ACPI: IRQ9 SCI: Edge set to Level Trigger. 112c120 < audit(1097257394.916:0): initialized --- > audit(1097143772.529:0): initialized 124c132 < ACPI: Thermal Zone [THM] (54 C) --- > ACPI: Thermal Zone [THM] (52 C) 172c180 < init init/main.c:694 --- > init init/main.c:701 268c276 < [fglrx] module loaded - fglrx 3.14.1 [Sep 27 2004] on minor 0 --- > [fglrx] module loaded - fglrx 3.9.0 [May 11 2004] on minor 0 274,275c282,283 < [<f8c66fcc>] __ke_alloc_wait_queue_head_struct+0x1c/0x30 [fglrx] < [<f8c6ac96>] firegl_setup_dev+0x126/0x1d0 [fglrx] --- > [<f8c60fcc>] __ke_alloc_wait_queue_head_struct+0x1c/0x30 [fglrx] > [<f8c64736>] firegl_setup_dev+0x126/0x1d0 [fglrx] 294,295c302,303 < [fglrx] free LFB = 110219264 < [fglrx] max LFB = 110219264 --- > [fglrx] free LFB = 110223360 > [fglrx] max LFB = 110223360 tfoerste@nhh221 ~ $ Ok, thanks for the test. Is there any chance you could test development-sources-2.6.9-rc3? That patch which you excluded was actually an upstream "fix" pulled from the 2.6.9 tree. I'd be interested to know if you run into the same issue on that kernel. *** Bug 66723 has been marked as a duplicate of this bug. *** no chance, with 2.6.9-rc3 poweroff fails. BTW ACPI and speedstep are better in 2.6.9-rc3 than in 2.6.8..., here is the output in dmesg: tfoerste@nhh221 ~ $ diff d dmesg-2.6.8-gentoo-r7 1c1 < Linux version 2.6.9-rc3 (root@nhh221) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #14 Fri Oct 8 21:02:58 CEST 2004 --- > Linux version 2.6.8-gentoo-r7 (root@nhh221) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #1 Thu Oct 7 09:49:41 CEST 2004 21a22,23 > Local APIC disabled by BIOS -- reenabling. > Found and enabled local APIC! 23,25c25,27 < CPU 0 irqstacks, hard=c0494000 soft=c0493000 < PID hash table entries: 4096 (order: 12, 65536 bytes) < Detected 1698.622 MHz processor. --- > CPU 0 irqstacks, hard=c0488000 soft=c0487000 > PID hash table entries: 4096 (order 12: 32768 bytes) > Detected 1698.724 MHz processor. 30c32 < Memory: 1034716k/1048248k available (2630k kernel code, 12952k reserved, 846k data, 156k init, 130744k highmem) --- > Memory: 1034388k/1048248k available (2598k kernel code, 12960k reserved, 830k data, 156k init, 130744k highmem) 32c34 < Calibrating delay loop... 3358.72 BogoMIPS (lpj=1679360) --- > Calibrating delay loop... 3358.72 BogoMIPS 39d40 < CPU: L2 cache: 2048K 47a49,67 > init init/main.c:664 > init init/main.c:677 > init init/main.c:682 > do_pre_smp_initcalls init/main.c:628 > do_pre_smp_initcalls init/main.c:634 > init init/main.c:686 > init init/main.c:689 > enabled ExtINT on CPU#0 > ESR value before enabling vector: 00000000 > ESR value after enabling vector: 00000000 > Using local APIC timer interrupts. > calibrating APIC timer ... > ..... CPU clock speed is 1698.0283 MHz. > ..... host bus clock speed is 99.0898 MHz. > init init/main.c:691 > init init/main.c:693 > init init/main.c:699 > do_basic_setup init/main.c:609 > do_basic_setup init/main.c:611 52c72 < ACPI: Subsystem revision 20040715 --- > ACPI: Subsystem revision 20040326 72c92 < pnp: 00:01: ioport range 0x800-0x85f could not be reserved --- > pnp: 00:01: ioport range 0x800-0x85f has been reserved 100c120 < audit(1097270161.886:0): initialized --- > audit(1097143772.529:0): initialized 112c132 < ACPI: Thermal Zone [THM] (57 C) --- > ACPI: Thermal Zone [THM] (52 C) 115c135 < Real Time Clock Driver v1.12 --- > mice: PS/2 mouse device common for all mice 117a138,139 > input: AT Translated Set 2 keyboard on isa0060/serio0 > Real Time Clock Driver v1.12 129d150 < Probing IDE interface ide0... 133d153 < Probing IDE interface ide1... 136,143d155 < Probing IDE interface ide2... < ide2: Wait for ready failed before probe ! < Probing IDE interface ide3... < ide3: Wait for ready failed before probe ! < Probing IDE interface ide4... < ide4: Wait for ready failed before probe ! < Probing IDE interface ide5... < ide5: Wait for ready failed before probe ! 146d157 < hda: cache flushes supported 150,151d160 < mice: PS/2 mouse device common for all mice < input: AT Translated Set 2 keyboard on isa0060/serio0 157a167,178 > speedstep-centrino: found unsupported CPU with Enhanced SpeedStep: send /proc/cpuinfo to Jeremy Fitzhardinge <jeremy@goop.org> > cpufreq: CPU0 - ACPI performance management activated. > cpufreq: P0: 1700 MHz, 21000 mW, 250 uS > cpufreq: P1: 1700 MHz, 21000 mW, 250 uS > cpufreq: *P2: 1700 MHz, 21000 mW, 250 uS > cpufreq: P3: 1400 MHz, 17500 mW, 250 uS > cpufreq: P4: 1200 MHz, 15000 mW, 250 uS > cpufreq: P5: 1000 MHz, 12500 mW, 250 uS > cpufreq: P6: 800 MHz, 10000 mW, 250 uS > cpufreq: P7: 600 MHz, 7500 mW, 250 uS > PM: Reading pmdisk image. > PM: Resume from disk failed. 159,160c180 < ACPI wakeup devices: < LID PBTN PCI0 USB0 USB1 USB2 USB3 MODM PCIE --- > init init/main.c:701 183c203 < uhci_hcd 0000:00:1d.0: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 --- > uhci_hcd 0000:00:1d.0: Intel Corp. 82801DB (ICH4) USB UHCI #1 190c210 < uhci_hcd 0000:00:1d.1: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 --- > uhci_hcd 0000:00:1d.1: Intel Corp. 82801DB (ICH4) USB UHCI #2 197c217 < uhci_hcd 0000:00:1d.2: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 --- > uhci_hcd 0000:00:1d.2: Intel Corp. 82801DB (ICH4) USB UHCI #3 204c224 < ehci_hcd 0000:00:1d.7: Intel Corp. 82801DB/DBM (ICH4/ICH4-M) USB 2.0 EHCI Controller --- > ehci_hcd 0000:00:1d.7: Intel Corp. 82801DB (ICH4) USB2 EHCI Controller 206c226 < ehci_hcd 0000:00:1d.7: irq 11, pci mem f8a32c00 --- > ehci_hcd 0000:00:1d.7: irq 11, pci mem f89f1c00 213a234,238 > usb 1-1: new low speed USB device using address 2 > usbcore: registered new driver hiddev > input: USB HID v1.00 Mouse [Logitech USB-PS/2 Mouse] on usb-0000:00:1d.0-1 > usbcore: registered new driver usbhid > drivers/usb/input/hid-core.c: v2.0:USB HID core driver 227d251 < usb 1-1: new low speed USB device using address 2 229,232d252 < usbcore: registered new driver hiddev < input: USB HID v1.00 Mouse [Logitech USB-PS/2 Mouse] on usb-0000:00:1d.0-1 < usbcore: registered new driver usbhid < drivers/usb/input/hid-core.c: v2.0:USB HID core driver 242,243d261 < usb 2-1: new low speed USB device using address 2 < input: USB HID v1.10 Joystick [Mega World USB Game Controllers] on usb-0000:00:1d.1-1 244a263 > ohci_hcd: block sizes: ed 64 td 64 246,247c265,266 < eth1394: $Rev: 1224 $ Ben Collins <bcollins@debian.org> < eth1394: eth2: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0) --- > ip1394: $Rev: 1224 $ Ben Collins <bcollins@debian.org> > ip1394: eth2: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0) 250c269 < ip_conntrack version 2.1 (8189 buckets, 65512 max) - 300 bytes per conntrack --- > ip_conntrack version 2.1 (8189 buckets, 65512 max) - 296 bytes per conntrack 252c271 < b44: eth0: Flow control is off for TX and off for RX. --- > b44: eth0: Flow control is on for TX and on for RX. 258,267c277,309 < allocation failed: out of vmalloc space - use vmalloc=<size> to increase size. < [fglrx:firegl_unlock] *ERROR* Process 8754 using kernel context 0 < [fglrx:drm_ioremapfree] *ERROR* [mappings] Attempt to free NULL pointer < b44: eth0: Link is up at 100 Mbps, full duplex. < b44: eth0: Flow control is off for TX and off for RX. < NETDEV WATCHDOG: eth0: transmit timed out < b44: eth0: transmit timed out, resetting < b44: eth0: Link is down. < b44: eth0: Link is up at 100 Mbps, full duplex. < b44: eth0: Flow control is off for TX and off for RX. --- > Debug: sleeping function called from invalid context at mm/slab.c:1989 > in_atomic():1, irqs_disabled():0 > [<c0105eae>] dump_stack+0x1e/0x30 > [<c011a8b7>] __might_sleep+0xb7/0xe0 > [<c01449d8>] kmem_cache_alloc+0x68/0x70 > [<f8c60fcc>] __ke_alloc_wait_queue_head_struct+0x1c/0x30 [fglrx] > [<f8c64736>] firegl_setup_dev+0x126/0x1d0 [fglrx] > [<c0163c1b>] chrdev_open+0xfb/0x230 > [<c015939a>] dentry_open+0x15a/0x240 > [<c015923d>] filp_open+0x5d/0x60 > [<c0159645>] sys_open+0x55/0xb0 > [<c01050eb>] syscall_call+0x7/0xb > Fire GL built-in AGP-support > Based on agpgart interface v0.99 (c) Jeff Hartmann > agpgart: Maximum main memory to use for agp memory: 816M > agpgart: Detected an Intel 855PM Chipset, no integrated grapics found. > agpgart: Detected Intel i855PM chipset > agpgart: AGP aperture is 128M @ 0xe0000000 > Power management callback for AGP chipset installed > [fglrx] AGP detected, AgpState = 0x1f000217 (hardware caps of chipset) > AGP: Found 2 AGPv2 devices > AGP: Doing enable for AGPv2 > [fglrx] AGP enabled, AgpCommand = 0x1f000314 (selected caps) > [fglrx] free AGP = 121909248 > [fglrx] max AGP = 121909248 > [fglrx] free LFB = 110223360 > [fglrx] max LFB = 110223360 > [fglrx] free Inv = 0 > [fglrx] max Inv = 0 > [fglrx] total Inv = 0 > [fglrx] total TIM = 0 > [fglrx] total FB = 0 > [fglrx] total AGP = 32768 I am not alone ;-) : http://lists.debian.org/debian-kernel/2004/09/msg00206.html Could one of you please report this bug at http://bugzilla.kernel.org ? Sorry, I should have been more specific. Gentoo kernel issues should be posted here, as you did. What I wanted you to do was to open a bug there highlighting that 2.6.9-rc3 does not shut down correctly, whereas an unmodified 2.6.8 does. you're correct, I added a comment to the bug on bugzilla.kernel.org *** Bug 66804 has been marked as a duplicate of this bug. *** Does booting a problematic kernel with option "nolapic" help? nolapic with 2.6.9-rc3 solves the problem I'm assuming you are in the state where you have gentoo-dev-sources-2.6.8-r7 without the 2705 patch applied. Please reapply this by doing: cd /usr/src/linux-2.6.8-gentoo-r6 tar -Oxjv genpatches-2.6-8.53/2705_fix-intel-acpi.patch -f /usr/portage/distfiles/genpatches-2.6-8.53-base.tar.bz2 | patch -p1 You should be in the same situation as if you had an unmodified gentoo-dev-sources-2.6.8-r7. At this point I need you to try applying a fix. Do this with: wget -O - --quiet "http://dev.gentoo.org/~dsd/fix-apic.patch" | patch -p1 Then "make clean", recompile kernel, reboot, etc, and see if ACPI events work. Please report here with successes/failures. poweroff works, here the diff in dmesg: tfoerste@nhh221 ~ $ diff d dmesg-2.6.8-gentoo-r7 1c1 < Linux version 2.6.8-gentoo-r7 (root@nhh221) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #3 Sun Oct 10 19:18:44 CEST 2004 --- > Linux version 2.6.8-gentoo-r7 (root@nhh221) (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #2 Sun Oct 10 11:21:04 CEST 2004 21,22c21 < Kernel command line: root=/dev/hda10 < No local APIC present or hardware disabled --- > Kernel command line: root=/dev/hda10 nolapic 26c25 < Detected 1699.081 MHz processor. --- > Detected 1698.734 MHz processor. 112c111 < audit(1097436387.243:0): initialized --- > audit(1097409234.042:0): initialized 124c123 < ACPI: Thermal Zone [THM] (64 C) --- > ACPI: Thermal Zone [THM] (53 C) 187c186 < intel8x0_measure_ac97_clock: measured 49440 usecs --- > intel8x0_measure_ac97_clock: measured 49439 usecs 252,253d250 < ipw2200: Radio Frequency Kill Switch is On: < Kill switch must be turned off for wireless networking to work. 273,274c270,271 < [<f8c2ffcc>] __ke_alloc_wait_queue_head_struct+0x1c/0x30 [fglrx] < [<f8c33c96>] firegl_setup_dev+0x126/0x1d0 [fglrx] --- > [<f8c5bfcc>] __ke_alloc_wait_queue_head_struct+0x1c/0x30 [fglrx] > [<f8c5fc96>] firegl_setup_dev+0x126/0x1d0 [fglrx] Great, thanks. I'd appreciate it if others who also had ACPI problems with this release could apply this fix and report results. I did the same but I need to pass nolapic option at boot time. Even after the patch provided by you, if I dont pass the nolapic to the kernel then the system freezes Can we see your "dmesg" output (without the nolapic option) as an attachment please? Created attachment 41472 [details]
Dmesg output with out nolapic boot parameter
Attached dmesg.out without nolapic boot parameter after patching
Pasting diff dmesg with and without nolapic boot parameter. 21,23c21 < Kernel command line: root=/dev/ram0 init=/linuxrc ramdisk=4096 real_root=/dev/ hda8 vga=795 < Local APIC disabled by BIOS -- reenabling. < Found and enabled local APIC! --- > Kernel command line: root=/dev/ram0 init=/linuxrc ramdisk=4096 real_root=/dev/ hda8 vga=795 nolapic 27c25 < Detected 1994.003 MHz processor. --- > Detected 1993.851 MHz processor. 32c30 < Memory: 514544k/523960k available (1661k kernel code, 8676k reserved, 723k dat a, 156k init, 0k highmem) --- > Memory: 514544k/523960k available (1661k kernel code, 8680k reserved, 723k dat a, 156k init, 0k highmem) 37,38c35,36 < CPU: After generic identify, caps: afe9fbbf 00000000 00000000 00000000 < CPU: After vendor identify, caps: afe9fbbf 00000000 00000000 00000000 --- > CPU: After generic identify, caps: afe9f9bf 00000000 00000000 00000000 > CPU: After vendor identify, caps: afe9f9bf 00000000 00000000 00000000 40c38 < CPU: After all inits, caps: afe9fbbf 00000000 00000000 00000040 --- > CPU: After all inits, caps: afe9f9bf 00000000 00000000 00000040 55,61d52 < enabled ExtINT on CPU#0 < ESR value before enabling vector: 00000000 < ESR value after enabling vector: 00000000 < Using local APIC timer interrupts. < calibrating APIC timer ... < ..... CPU clock speed is 2013.0231 MHz. < ..... host bus clock speed is 100.0661 MHz. 127c118 < ACPI: Thermal Zone [THM] (55 C) --- > ACPI: Thermal Zone [THM] (54 C) 266c257 < intel8x0_measure_ac97_clock: measured 49735 usecs --- > intel8x0_measure_ac97_clock: measured 49725 usecs You didn't apply the patch properly. From your dmesg: Local APIC disabled by BIOS -- reenabling. However, the fix I posted removes the printing of this message: - printk("Local APIC disabled by BIOS -- reenabling.\n"); and no other code in the kernel will print that message Yes it worked with the patch. guess didnt patch properly the last time. It works now. Thanks bug #66804 was solved with this fix. Thanks! Fixed in -r8 |