# Power down after a shut down.

## barlad

Hello there, 

there is a little problem with my gentoo I would like to solve. When I do a "shutdown -h now" to shut down the computer, everything works fine but the process stops at "Power down"  and the power does not go down, I have to turn off the power  manually. 

The option is enabled in the bios (actually, I don't think there is even that option in the bios but it works in windows XP so I assume it is "enabled"  :Smile:  ) and I am pretty sure I  configured the kernel properly : I activated the "power down button event" support.

I am using a P4 HT (smp system) on an ASUSTEK P4G8X motherboard with a 2.4.19-gentoo-r10 kernel.

If any of you has got an idea to solve the problem...

Thanks in advance.

----------

## xces

You'll need one of the powermanagement daemons, e.g. apmd or acpid. It depends on which flag you enabled in your kernel.

If you have enabled APM in your kernel emerge apmd otherwise emerge acpid. That should do...

----------

## barlad

ok, thanks much. I will look into it!

----------

## Tormented-Soul

 *Quote:*   

> You'll need one of the powermanagement daemons, e.g. apmd or acpid. It depends on which flag you enabled in your kernel.
> 
> If you have enabled APM in your kernel emerge apmd otherwise emerge acpid. That should do...

 

i don't need a daemon fpr this to take effect...just compiled apm as kernelmodule, which is loaded upon booting, and thats all...gentoo shuts down niecely  :Smile: 

----------

## barlad

I didn't compile APM (I read in the help section that it was close to useless with smp system and since I own a P4 HT, I guess it's considered as a smp system). I did activate ACPI support though, I will emerge the daemon tonight and see if it works.

----------

## barlad

I just upgraded my kernel to 2.4.20-r1 (gentoo sources) and made sure to compile with the ACPI support. acpid is working perfectly. The shutdown still does not work though.

I am pretty sure ACPI is working though because when I press the "pwr off" button,  the pc shuts down (although I still have to turn down power manually)

Guess I forgot an option or there is an incompatibility with my motherboard somehow.

----------

## dedeaux

I have had a dual p3 mb -- ecs d6vaa for a while and the shrinkwrapped distros have used apm w/o issue and shutdown powers off the machine.  

In getting my install of Gentoo off the ground I am after a similar solution.

My machine won't power off either.  I am using apm over acpi right now as acpi locks up the machine.

Can anyone share their setup who have similar hardware?  Dual p3 via chipset.  What kernel options you use, daemons, etc...  Thanks.

----------

## CodeHacker84

I have an AMD K-6 400 based machine that I had the same problem with...in order to get the thing to shut down when I told it to, I had to enable the option "Use real-mode APM BIOS call to power off" under power management support under General Setup in the kernel configuration menu.  If this option does what it says it does, that means a drop fom priveleged mode right before shutdown, and a BIOS interrupt call.  I don't know how ACPI's interrupt vectors are set up, so I really don't know what effect this would have on a machine designed for ACPI, but it might do what you need it to.

----------

## robfish

My solution (after reading several threads):-

Check motherboard and/or bios.

If ACPI is enabled then enable it in the kernel and disable APM (in the kernel)

Then emerge acpid

Then rc-update del apmd default

Then rc-update add acpid default

----------

## kraylus

i dont think a p4 w/ "hyper-threading" counts as a smp system  :Wink:  compiling apm and enable apm at startup into the kernel should get you going though. i wouldn't use acpi unless you have to. i've heard bad things about it.

----------

## ejahn1

Interestingly, when I compile in either APM or ACPI support, I get a boot-time message from either the APM or ACPI daemon that kernal support for APM or ACPI doesn't exist.  I've tried all sorts of combinations of settings but no luck.  Next I'm going to try loading APM as a module instead of compiling in.  Has anyone else had this problem (non-recognition of kernal apm/acpi support) and is there a work-around?  I use the latest gentoo-sources kernal source.

----------

## ejahn1

Update to last post:

autoloading the apm module didn't work either: upon booting it says "apm module failed to load".  I am perplexed about power management in Gentoo, which is just something that always just "used to work" under other distros with this same hardware.  Good thing I don't use a laptop...

----------

## CountZero

What worked for me was when you configure the kernel select the Power Management section, don't enable ACPI just Advanced Power Management BIOS support (compile it in, don't compile it as a module).  That's it.  It powers off just fine for me.

----------

## ejahn1

Thanks CountZero, I tried that, but no luck.  Whichever one I pick (APM, APCI, or both with the corresponding daemons activated) I am told at boot-up that kernel support for APM or ACPI doesn't exist.  I think this might be a gentoo-sources kernel problem, but am not sure.  My hardware is pretty simple: late model MSI motherboard with APM and APCI support.

----------

## Beekster

During my last round of "making a better kernel" earlier this month I had a similar problem.  On shutdown, it woudln't power off, except the hard drives did shutdown or enter sleep mode.  Was bizarre.

I'm running Gentoo-Sources 2.4.19-r10 on a P4 system, on an Asus P4TE (?? I think...) m/b.

Some experimenting led to using some of ACPI, and not APM.  I'm sure APM had worked in the past, but hey, you go with what works.

Here's what I assume is the relevant part of my .config

Note that I haven't had to emerge either apmd or acpid to get powering off to work.

```

# at the end of the "General setup" section:

CONFIG_PM=y

CONFIG_ACPI=y

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_BUSMGR=y

CONFIG_ACPI_SYS=y

CONFIG_ACPI_CPU=y

CONFIG_ACPI_BUTTON=y

# CONFIG_ACPI_AC is not set

# CONFIG_ACPI_EC is not set

# CONFIG_ACPI_CMBATT is not set

# CONFIG_ACPI_THERMAL is not set

# CONFIG_APM is not set

```

Hope it helps someone.

----------

## ejahn1

Beekster wrote:  *Quote:*   

> "During my last round of "making a better kernel" earlier this month I had a similar problem. On shutdown, it woudln't power off, except the hard drives did shutdown or enter sleep mode. Was bizarre. 
> 
> 

 

...that's exactly what happens on shutdown for me also!  hard drives power down, fan goes off, etc, but the power light stays on.  My .config file (below) is similar now to the one you posted, but my computer keeps thinking the kernel has no APCI support compiled in.

```

CONFIG_PM=y

# CONFIG_APM is not set

#

# ACPI Support

#

CONFIG_ACPI=y

# CONFIG_ACPI_HT_ONLY is not set

CONFIG_ACPI_BOOT=y

CONFIG_ACPI_BUS=y

CONFIG_ACPI_INTERPRETER=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_PCI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_SYSTEM=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_TOSHIBA is not set

# CONFIG_ACPI_DEBUG is not set

```

----------

## maxmg

if you're going to use apm over acpi, you might need some external program to keep the cpu cool - i used to have to run lvcool. i must stress i don't know if this is still an issue, or indeed how widespread that problem was (sony pcgfx 502, athlon processor)but given gentoo's cpu demands, it would seem best to chack first.

----------

## ejahn1

I got ACPI/Power Down working  :Smile:   Not sure what I did differently this time.  I recompiled, added some non-related SCSI support, played with devfsd.config stuff, and it works now.  The dmesg quits complaining about lack of kernel support and loads apcid fine.  It seems like a bug was squashed in the gentoo-sources kernel, but the version is the same, so beats me.  Oh well, I'm happy.

----------

## beng

 *Quote:*   

> if you're going to use apm over acpi, you might need some external program to keep the cpu cool

 

Don't think so -- kernel will issue halt command to CPU whether ACPI or APM is compiled in or not.

----------

