# [unsolved] Shutdown doesn't power off.

## noup

Hello everyone.

I've got this problem around for some time, and now decided to give it a try and solve it. What makes this hard, is the fact that this only happens sometimes, not always.

As the title says, the shutdown process runs as usually but, after showing "System Halted", it doesn't really halt. This only happens on shutdown, reboots have always worked ok.

I have a pretty recent system (has some months), and so i'm using ACPI, which is compiled into the kernel. The kernel i'm using is gentoo-2.6.11-r5, and i've got every ACPI option enabled in the kernel, except "Video, Laptop Extras, Debug Statements, Power Management Timer Support and ACPI0004,PNP0A05 and PNP0A06 Container Driver".

This is a bad thing, because i frequently shutdown my system remotely, and it's not good to come back in a day or two to find out it was ON the whole time...

Any help?

----------

## suso

 *noup wrote:*   

> Hello everyone.
> 
> I've got this problem around for some time, and now decided to give it a try and solve it. What makes this hard, is the fact that this only happens sometimes, not always.
> 
> As the title says, the shutdown process runs as usually but, after showing "System Halted", it doesn't really halt. This only happens on shutdown, reboots have always worked ok.
> ...

 

Wait, your subject line and body don't seem to agree  you seem to be talking about shutdowns (-h), right? Are you talking about a problem where shutdown -h does not shut the power off after halting?

----------

## noup

 *suso wrote:*   

> 
> 
> Wait, your subject line and body don't seem to agree  you seem to be talking about shutdowns (-h), right? Are you talking about a problem where shutdown -h does not shut the power off after halting?

 

aargh, i just noticed my title got cut, it's fixed now.

yes, that's what i meant. i usually don't do a "shutdown -h", i simply use "halt", which i think that is equivalent.

----------

## tomvollerthun

Adding apm=power-off to the kernel parameters fixed that problem for me.

----------

## Gentree

adding "button" to kernel config under

 power management -> acpi

 fixed it for me.

kernel needs to simulate a hardware button press to power off.

HTH8)

----------

## noup

 *tomvollerthun wrote:*   

> Adding apm=power-off to the kernel parameters fixed that problem for me.

 

I'm using ACPI, shouldn't that be acpi=power-off or something? I'll try that anyway, though.

 *Gentree wrote:*   

> 
> 
> adding "button" to kernel config under
> 
> power management -> acpi
> ...

 

i already have that enabled in the kernel. what i do not have enabled is the "video" and "timer support", but i don't think these would cause my problem..

----------

## Kern3lP4nic

I had to enable the "AC adapter" entry in ACPI Support to solve this problem and I am not on a laptop...

----------

## noup

 *Kern3lP4nic wrote:*   

> I had to enable the "AC adapter" entry in ACPI Support to solve this problem and I am not on a laptop...

 

I've got that enabled too. As i said, this is what i have for ACPI:

```

[*] ACPI Support

[*]   Sleep States (EXPERIMENTAL)

<*>   AC Adapter

<*>   Battery

<*>   Button

< >   Video

<*>   Fan

<*>   Processor

<*>     Thermal Zone

< >   ASUS/Medion Laptop Extras

```

----------

## noup

Ok, it happened again... so putting "apm=poweroff" in the kernel parameters didn't work out that well... i've also tried using the "poweroff" command instead of just "halt", and the results were the same.

Anyone has a clue about what can be related to this? Is it ACPI or something? Perhaps something that isn't being correctly disconnected at shutdown (is there any way to check this)? I don't have a clue where to restart now...

----------

## syg00

That's interesting. I gave up on "shutdown", as I didn't want to waste time chasing it up.

But I've never had poweroff fail to shut the machine down.

----------

## noup

 *syg00 wrote:*   

> That's interesting. I gave up on "shutdown", as I didn't want to waste time chasing it up.
> 
> But I've never had poweroff fail to shut the machine down.

 

Bah... this is one of those things that really wastes your time when trying to fix it. And even worse is the fact that it happens totaly at random. Some times it works, sometimes it doesn't. This makes me to believe that the problem is connected to something not correctly unloaded at shutdown, but every init script outputs [OK] when stopped at shutdown...  :Confused: 

----------

## noup

9 months later, my computer still doesn't seem to poweroff correctly. i'm now using gentoo-sources-2.6.14-r5 and sometimes it does poweroff, but other times it sticks with the "system halted" screen, and thhe computer doesn't poweroff.

is anyone else having this kind of behaviour?

----------

## jmk

Iv'e got the same problem.

Iv'e noticed that if I don't load X I have no problems shutting down. It also works to issue halt in grub's mini-shell. A part from that I've given up. Iv'e posted a bit on this subject and recived some friendly advice by I really haven't gotten anywhere on solving the issue.  :Sad: 

For reference:

https://forums.gentoo.org/viewtopic-t-337612-start-0-postdays-0-postorder-asc-highlight-.html

https://forums.gentoo.org/viewtopic-t-383477-start-0-postdays-0-postorder-asc-highlight-.html

https://forums.gentoo.org/viewtopic-t-305474-start-0-postdays-0-postorder-asc-highlight-.html

----------

## noup

 *jmk wrote:*   

> Iv'e got the same problem.
> 
> Iv'e noticed that if I don't load X I have no problems shutting down. It also works to issue halt in grub's mini-shell. A part from that I've given up. Iv'e posted a bit on this subject and recived some friendly advice by I really haven't gotten anywhere on solving the issue. 
> 
> For reference:
> ...

 

Thanks for the references, there were some things i hadn't tried in there. But my case seems to be different, because i can't disable local apic support (required by SMP for hyperthreading), and i don't have "battery" and "ac-power" enabled, because i have a desktop system. Don't know if that would make the difference, though.

About the grub mini-shell, you mean issuing halt before the computer has even booted?

----------

## jmk

 *noup wrote:*   

>  i can't disable local apic support (required by SMP for hyperthreading), and i don't have "battery" and "ac-power" enabled, because i have a desktop system. Don't know if that would make the difference, though.

  It didn't do anything for me. I tried them all.  :Sad:  If you have better luck please let me know.

 *noup wrote:*   

> About the grub mini-shell, you mean issuing halt before the computer has even booted?

  Yup, at the boot menu press "c" to get a shell and type halt. My box shuts down with out a problem. Well, it shows it's not a hardware problem.

----------

## noup

 *jmk wrote:*   

> If you have better luck please let me know.

 

Okay.

 *noup wrote:*   

> About the grub mini-shell, you mean issuing halt before the computer has even booted?

  Yup, at the boot menu press "c" to get a shell and type halt. My box shuts down with out a problem. Well, it shows it's not a hardware problem.[/quote]

But, does poweroff never function in your computer, or just sometimes? In my case, it's like 50-50.

----------

## jmk

It never works, unless I don't start x. 

If I start x in any way I can forget about the machine powering off by itself.

As long as I don't let xdm start at boot it shuts down fine.  

ACPI is working, the box changes runlevel if I unplug the AC-adapter. It commences shutdown if I press the powerbutton.

Depending on what I want to do, it goes through all the poweroff stages. 

The only thing it doesn't do is cut power to the box, leaving me with the fan going and monitor on, displaying the text

```
Power Down
```

or

```
Reboot
```

on the last line depending an what I asked it to do. No error messages anywere.

----------

## noup

Ok, in my case it only happens some times and the message is "System Halted".

Since it only happens some times, it is difficult to diagnose for me, because i can't really relate this to anything.   :Confused: 

----------

## cogitate

I'm not sure that I can help, but my box works fine with the following kernel setup for ACPI

```
[*]ACPI Support

< >   AC Adapter

< >   Battery

<*>   Button

<*>   Video (not needed)

< >   Generic Hotkey

<*>   Fan

<*>   Processor

<*>      Thermal Zone
```

Everything else in ACPI is off. I do have Legacy Power Management API in the kernel though (under power management options). The kernel is 2.6.15-gentoo-r1. This is a P4 box i'm using as a server, so there is no X on the box. I do have SMP enabled, so that doesn't stop it from working. APM is off obviously.

I had this problem on an old box and I don't remember if I ever did get it solved or not. I'd be more than happy to go through every bit of my system to try to find what makes it work for me.

----------

## jdgill0

noup,

Is your computer a DELL computer?  I have run into this problem with DELL computers in the recent past.  Unfortunately, I never found a solution  :Sad:   I have never had this problem except with DELL computers, of which I built cluster with and ran into this problem.

----------

## Tolstoi

I had this problem a few months ago, don't know how I solved it. Now it appeared again. It vanished suddenly for a day and turned up again. I'm trying to find out what kernel options to enable to get rid of it. It's a desktop. I think I'll look at an old kernel config where it was working.

----------

## Tolstoi

So I turned on some of the ACPI options in the Kernel today and it works. It's an IBM Desktop.

```

# Power management options (ACPI, APM)

#

CONFIG_PM=y

CONFIG_PM_LEGACY=y

# CONFIG_PM_DEBUG is not set

#

# ACPI (Advanced Configuration and Power Interface) Support

#

CONFIG_ACPI=y

# CONFIG_ACPI_AC is not set

# CONFIG_ACPI_BATTERY is not set

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

# CONFIG_ACPI_HOTKEY is not set

CONFIG_ACPI_FAN=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_IBM 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_X86_PM_TIMER=y

# CONFIG_ACPI_CONTAINER is not set

```

----------

## mks99

My machine wouldn't power down on shutdown  either. For me, completely turning off support for legacy USB devices helped.

BTW: I don't have the slightest idea what legacy USB devices have to do with whether or not a machine is able to switch the power off.

I simply tried this setting since another machine of mine would hang while booting the kernel when an USB keyboard was plugged in. Here turning off legacy USB support helped. So I thought it might be worth a shot on the machine with the power off problem. It was worth it.

----------

## mks99

 *mks99 wrote:*   

> My machine wouldn't power down on shutdown  either. For me, completely turning off support for legacy USB devices helped.

 

I'm talking about a BIOS setting here. Should have said so in the first place.

----------

## Caustiq

I have ran into this problem for one of my gentoo servers and the solution was to make a change in the BIOS under 'Power Management.' "PM controlled by APM: Enabled" changed to disabled.

----------

## Tolstoi

Yes, I got APM disabled completely in the kernel, because it's disabled in my BIOS too. Only got some ACPI options built in.

----------

