# searching commands like 'poweroff' in portage / no poweroff

## f.kater

Hi,

since I have changed from SuSE 7.3 to gentoo my system does not power off (after executing shutdown -h 0)... That's my main problem right now... (I have tried several kernels now with APM and with or without ACPI...)

My second problem is: 'poweroff' is an unknown command to my system. I'd like to install it - but which package in portage is to install?emerge -s "poweroff" doesn't find anything. Is poweroff only a synonym to shutdown -h 0 ?

How can I make it to find the right package in general? 

Thank you for any help

 Felix

----------

## fghellar

You can use halt instead of poweroff.

----------

## f.kater

Thank you.

The problem remains  :Sad: 

halt -p / shutdow -h 0 do not power off the system. The last lines on my screen are:

... Unmounting filesystems ... Remounting remaining filesystems readonly ... Power off ... /sbin/rc: return: can only 'return'from a function or sourced script.

Do you have any idea?

Felix

----------

## pjp

Did you compile power management into the kernel?  Someone correct me, but I thought the actual power off part would only work with power managment (APM or ACPI) enabled.

----------

## FyreFiend

I think kanuslupus is right. There should be something in the kernel config around powering off with a busted BIOS (I check the helps in the power management section). My box wouldn't power it's self down until I add that to the kernel.

----------

## craftyc

If you compile the Advanced Power Management BIOS Support, under General setup, then it should work. (Well it works for me anyway   :Smile:  )

----------

## f.kater

Yes, I've now compiled a lot of kernels with nearly any existing combination of ACPI on /off, APM on/off but the system still doesn't power off  :Sad: 

halt -p, shutdown -h 0, ... do not work.

the system goes down, it says "power off", then the hard disk is switched off (but not the computer itself) and at the end of the shutdown tasks there is this strange message (I've mentionend above):

/sbin/rc: return: can only 'return'from a function or sourced script

What the hell does this stand for?

further information:

- I tried emerging and unmerging acpid and / or apmd

- I tried switching off ACPI in BIOS - not possible

- the computer was powerd off fine with SuSE7.3 and Windows

Any further idea, guys?

----------

## fghellar

Maybe this can help...

----------

## craftyc

How about using the .config file from your SuSe system?

----------

## f.kater

 *fghellar wrote:*   

> Maybe this can help...

 

hidee hidee hidee heeee

houdee houdee houdee hooo

THIS was the solution! Thanks to all of the 80 readers and writers of these postings and especially to fghellar!

Here a short summary in my words to everybody with the same problem:

A mainboard supports ether ACPI or APM. Figure out what's the right for your board (the newer it is the more likely it is ACPI)  and so don't compile your kernel with both options on but only the right one.

Felix

----------

## fghellar

As Autobot's sig says, "One is glad to be of service."  :Smile: 

----------

