# [SOLVED] System will not power down

## bubba_24

I've seen this issue on a number of threads, but I still can't see to get it working.  So, I decided to open a new thread on it.

Basically, my system will not power down after the 'shutdown -h now' command.  It will go through the normal shut down messages and end with 'Power Down', at which point I have to push the power button to power down the system.  I'm using an Asus A7S333 motherboard, which I think uses ACPI not APM (maybe someone can confirm, I've been unable to get a solid answer)

I have ACPI built into the kernel ( 2.6.24-r8 ).

Any help would be greatly appreciated!Last edited by bubba_24 on Wed Jun 25, 2008 1:40 pm; edited 1 time in total

----------

## Insanity5902

I am not 100% sure about this, but I used to have this problem, I believe it was because I had APIC (not to be confused with ACPI) enabled.  If you have a single processor machine, you should be able to disable this without any consequences.

----------

## zyko

You need to enable CONFIG_ACPI and CONFIG_ACPI_BUTTON in your kernel.

----------

## bubba_24

@Insanity5902

I don't know much about APIC, but after some searching, I added the 'noapic' then 'nolapic' options to my kernel line in grub.conf.  No combination of those helped.  Would this be enough to disable APIC or do I have to remove it from the kernel? If I have to remove support from the kernel, do you know which options to remove?

@zyko

I have both of those options compiled in my kernel.  Here is the output of 'cat .config | grep CONFIG_ACPI':

CONFIG_ACPI=y

CONFIG_ACPI_PROCFS=y

CONFIG_ACPI_PROCFS_POWER=y

CONFIG_ACPI_SYSFS_POWER=y

CONFIG_ACPI_PROC_EVENT=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=y

# CONFIG_ACPI_DOCK is not set

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_TOSHIBA is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_SYSTEM=y

# CONFIG_ACPI_CONTAINER is not set

# CONFIG_ACPI_SBS is not set

I noticed the last time I shutdown that it sounds like my hard drives are spinning down.  The fans on the power supply, case, and processor stay on and the monitor stays on.

----------

## zyko

What does "cat .config | grep APIC" tell you?

----------

## bubba_24

Here it is:

CONFIG_X86_GOOD_APIC=y

CONFIG_X86_LOCAL_APIC=y

CONFIG_X86_IO_APIC=y

----------

## yabbadabbadont

You don't happen to use the sata_promise driver do you?  On my system, shutdown hangs inside sata_promise when it tries to park the drive heads.

----------

## zyko

 *Quote:*   

> CONFIG_X86_GOOD_APIC=y
> 
> CONFIG_X86_LOCAL_APIC=y
> 
> CONFIG_X86_IO_APIC=y

 

You could try to get rid of those, as Insanity5902 suggested. 

If that doesn't work, I'd recommend you check up on what your hardware has to say about ACPI/APM/APIC. Search dmesg for ACPI-related information ("dmesg | grep -i acpi" or something like that) to see if your board actually supports it. If it doesn't, logically, enable APM and try again.

Has powering off this specific machine ever worked with linux? Maybe with an earlier kernel?

----------

## bubba_24

@yabbadabbadont: Nope, I don't use that driver.

@zyko:

I can't find those options using menuconfig.  I tried directly editing the .config file, but when I compile, the options are re-enabled.  I'm searching for the steps compile that correctly.  In the meantime, here is the output from "dmesg | grep -i acpi":

 BIOS-e820: 000000001fffc000 - 000000001ffff000 (ACPI data)

 BIOS-e820: 000000001ffff000 - 0000000020000000 (ACPI NVS)

ACPI: RSDP 000F5E40, 0014 (r0 ASUS  )

ACPI: RSDT 1FFFC000, 0030 (r1 ASUS   A7S333   42302E31 MSFT 31313031)

ACPI: FACP 1FFFC0B2, 0074 (r1 ASUS   A7S333   42302E31 MSFT 31313031)

ACPI: DSDT 1FFFC126, 2457 (r1   ASUS A7S333       1000 MSFT  100000B)

ACPI: FACS 1FFFF000, 0040

ACPI: BOOT 1FFFC030, 0028 (r1 ASUS   A7S333   42302E31 MSFT 31313031)

ACPI: APIC 1FFFC058, 005A (r1 ASUS   A7S333   42302E31 MSFT 31313031)

ACPI: PM-Timer IO Port: 0xe408

ACPI: Local APIC address 0xfee00000

ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)

ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])

ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl edge)

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 20 low level)

ACPI: IRQ0 used by override.

ACPI: IRQ2 used by override.

Using ACPI (MADT) for SMP configuration information

Kernel command line: root=/dev/hda4 acpi=force

ACPI: Core revision 20070126

ACPI: bus type pci registered

ACPI: EC: Look up EC in DSDT

ACPI: Interpreter enabled

ACPI: (supports S0 S5)

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 11 12 14 15) *9

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *9

pnp: PnP ACPI init

ACPI: bus type pnp registered

pnp: PnP ACPI: found 15 devices

ACPI: ACPI bus type pnp unregistered

PCI: Using ACPI for IRQ routing

ACPI: Power Button (FF) [PWRF]

ACPI: Power Button (CM) [PWRB]

ACPI: Invalid PBLK length [5]

ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 16

ACPI: PCI Interrupt 0000:00:0c.0[A] -> GSI 19 (level, low) -> IRQ 17

ACPI: PCI Interrupt 0000:00:0c.1[B] -> GSI 16 (level, low) -> IRQ 18

ACPI: PCI Interrupt 0000:00:02.2[D] -> GSI 19 (level, low) -> IRQ 17

ACPI: PCI Interrupt 0000:00:02.3[A] -> GSI 23 (level, low) -> IRQ 19

Also, I have never had this system shutdown properly going back to the 2.4.X kernel (it was a while ago, not sure what the X was).

----------

## yabbadabbadont

If you use grub as your bootloader, you might try the following to see if using real-mode apm can power off your machine.

At the grub menu, (hit escape to get a menu if you don't normally see one), hit the 'c' key to get a grub command prompt.

Type 'halt' (without the tick marks) and hit enter.  Does the machine poweroff?

----------

## Insanity5902

It should be under 

```

  │ │                  Processor type and features  --->                                                │ │  

  │ │                        [ ] Local APIC support on uniprocessors                                    │ │  

```

----------

## bubba_24

@yabbadabbadont: A success there. I ran 'halt' from the grub command prompt and the system powered off.  I'm not sure what this means though.  I tried compiling APM into the kernel, but I still had the same issue (would not power off).  I'll have to give it another shot.

@Insanity5902: I still can't see that option.  Not sure if it matters, but I'm using Kernel 2.6.24-r8

----------

## yabbadabbadont

In the section of the kernel configuration where you enable the APM options, there should be an option about "Use real mode APM for poweroff" or something like that.  You might try enabling that option.  Also, note that the kernel will use ACPI before APM if both are included in the kernel.  You have to use some kernel options in your grub config to force use of APM in that case.

Edit: Forget that.  I just checked in gentoo-sources-2.6.24-r8 and there aren't any APM options.  I guess APM has been removed from the newer kernels.  Hooray for progress...   :Rolling Eyes: 

----------

## bubba_24

I found the APM settings in the 2.6.24-r8 kernel, they're under Power Management --> APM (Advanced Power Management BIOS support.  You don't see the option until you enable "Suspend to RAM and standby" for some reason.

Here are my APM settings in the kernel:

CONFIG_APM=y

CONFIG_APM_IGNORE_USER_SUSPEND=y

# CONFIG_APM_DO_ENABLE is not set

# CONFIG_APM_CPU_IDLE is not set

# CONFIG_APM_DISPLAY_BLANK is not set

CONFIG_APM_ALLOW_INTS=y

CONFIG_APM_REAL_MODE_POWER_OFF=y

I'm using these kernel options (with no luck so far): kernel /boot/kernel-2.6.24-r8-apm root=/dev/hda4 apm=on acpi=off noapic

----------

## yabbadabbadont

No wonder I didn't see them...  except, when I "grep -i apm /usr/src/linux/.config" no results are found.  I edited my config file to be sure, and none of those options are listed.  I would think that they would be there, but disabled... but they aren't even there.  Very strange.

Anyway, if the options you currently have don't work, and they look correct to me, then I'm willing to bet that your shutdown is hanging up inside a kernel module somewhere.  In my case, it is the sata_promise driver, but I've read of others that have it hang inside of wireless network card drivers and even others in their sound card drivers.  I'm not sure which, if any, debugging options can be enabled to try to trace it.  I'm sorry that I haven't been of much help.

Edit: Really strange.  The options show up, like you said, if suspend is enabled.  I wonder why they aren't in the .config?  Oh well.  When I want to shutdown now, I just reboot and take the "Poweroff" option that I added to my grub.conf file.  (it just issues the grub "halt" command)

```
 cat /boot/grub/grub.conf 

default 0

timeout 10

color cyan/blue white/blue

title Gentoo

root (hd0,1)

kernel /bzImage root=/dev/hda3 vga=775 quiet

title Windows

rootnoverify (hd0,0)

makeactive

chainloader +1

title Poweroff

halt

```

----------

## bubba_24

I finally have this issue solved.  When I add "acpi=ht" to the end of my kernel line in grub.conf, the system shuts down properly.  I have no idea why this works, but it does.

Thanks for everyone's help!

----------

