PDA

View Full Version : How to poweroff when shutting down system?



delpi
5th March 2004, 04:20 AM
When I shutdown my computer, it seems that it is just halting the computer.

How can I change this so that it would poweroff? :confused:

Thank you...

bosox
5th March 2004, 04:27 AM
Originally posted by delpi
When I shutdown my computer, it seems that it is just halting the computer.

How can I change this so that it would poweroff? :confused:

Thank you...

so after you issue the shutdown command does your system bring a screen up that says shutting down process and unmouting file system? does your HD stop spinning and your fans shutoff or do they keep running?

delpi
5th March 2004, 04:43 AM
Yes...after I issued the shutdown command...the system unmounts the filesystem and stop services.

The last sentence shown of the shutdown process is: Power down.

After that I have to manually press the power button to turn it off.

Jman
5th March 2004, 05:43 AM
From the "Power Down" output, I believe the system really tried to power down. If it stopped at halting the system, that would for sure require a flick of the power switch. This may have something to do with your hardware and BIOS, depending on how old it is. One thing to try: run
/sbin/poweroff as root. If that doesn't completely power down the system, you probably will have to flick the switch. I've got a very old machine running linux that doesn't completely power down either. Not that I need to reboot often. :)

bosox
5th March 2004, 06:09 AM
Originally posted by Jman
From the "Power Down" output, I believe the system really tried to power down. If it stopped at halting the system, that would for sure require a flick of the power switch. This may have something to do with your hardware and BIOS, depending on how old it is. One thing to try: run
/sbin/poweroff as root. If that doesn't completely power down the system, you probably will have to flick the switch. I've got a very old machine running linux that doesn't completely power down either. Not that I need to reboot often. :)

I would also check the power mangment settings in your bios

delpi
5th March 2004, 07:01 AM
But on Windows XP I have no problems with it. My PC will power off when shutdown in Windows XP.

So...i thought this might be a linux specific problem.

Is there a shutdown script where I can edit or something?

foolish
5th March 2004, 03:38 PM
Is this a custom kernel? do you have apm/acpi enabled? Have you tried using poweoff instead of halt or shutdown?

mellowiz
5th March 2004, 04:03 PM
You may want to have a look at the following page:
http://acpi.sourceforge.net/
Plenty of good info on the topic there...

/mw

skoona
6th March 2004, 02:13 AM
Based on what you said about XP actually powering off; we can assume Linux can do it also.

If linux was to do it - it would used the services of APM or APIC. Here are some basic steps to investigate.
A. Verify APM and or APIC is configured in your kernel. Or use a un-modified kernel from yor distribution - which does have both configured into the stock kernel.
B. Confirm that its enabled, by looking through dmesg; or by adding these to you boot command in grub.conf "apm=on apic=off" w/o quotes. Try it with apm on, then try it with apm off and apic on...
C. Read this: a link to APM info. http://www.mail-archive.com/eug-lug@efn.org/msg16221.html
Also, read the Fedora Release Notes...
D: Scan the system logs to find messages related to either APM or APIC, using those messages ask another questions.


Comment: I have a dual-cpu system. I had the exact same problem until I changed my boot parms to TURN ON apic.

delpi
6th March 2004, 05:58 PM
1. I've check my kernel. It has ACPI but not APM.

2. Kernel message related to ACPI and APM:

ACPI: have wakeup address 0xc0001000
ACPI: RSDP (v000 IntelR ) @ 0x000f7b10
ACPI: RSDT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3000
ACPI: FADT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3040
ACPI: MADT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff75c0
ACPI: DSDT (v001 INTELR AWRDACPI 0x00001000 MSFT 0x0100000e) @ 0x00000000
ACPI: Subsystem revision 20031002
ACPI: Interpreter disabled.

apm: BIOS not found.

3. I've tried both:

apm=on acpi=off
apm=off acpi=on

Both have no effect on my system.

4. What should I do?

dillee1
7th March 2004, 07:17 PM
Some old BIOS (various VIA vp3 chipset for example) requires the kernel to switch to real mode b4 it halt the system.

windows do switch back to 16bit mode b4 it call for halt, linux don't do that by default.

You can enable that real_mode_power_off with a kernel recompile. and it shoud fix the problem.

skoona
7th March 2004, 11:59 PM
ACPI: Interpreter disabled.

This is a key message. It shows the ACPI is not fully operational and thus will not poweroff the machine. You will know youv'e made it when that message reads enabled.

What to do next ? I need a little info;
A. Is your machine a Laptop ?
B. Does your BIOS support APM? (motherboard vendor/model - and I will go look at their manual)
C. What Kernel are you running? It's odd the APM is not configured in your kernel!
D. How many processors in you machine?

Comment:
Why ask about Laptops? Laptop power management is different than normal desktops and has different settings.

Why ask about BIOS? Mainboards are equipped to support power management in one of two general ways: APM or ACPI, many MB support both and allow you to choose different levels of support. You may need to enable setting in BIOS. Or you problem may be fixed by simply updating your bios (WARNING: Do this as a last resort, or when you are absolutely sure its the problem: Flashing bios is dangerous)

Why ask about kernel version? Most of us know or can quickly check whqat's in a stock kernel from fedora. However a custom kernel is an unknown - and requires that we tell you specifically which config setting have to be on, etc. Example we know a stock kernel had APM compile in - you say yours does not (why do you say that?)

Why ask how many processors? Dual CPU or greater systems will only use ACPI for power management. Single CPU systems can use either. The one you need to focus on can be determined from your answer.

Query: Did the command 'poweroff' shutdown your machine and power it off ? (yes/no)

Query: Are you able to re-compile your kernel? if yes, attach your current '.config' file.

Query: have you tried booting a standard kernel and using the 'poweroff' command ?

Lastly, attach a copy of your 'dmesg' output. (dmesg >myfile.txt, then attach myfile.txt to your replay)

James,

delpi
8th March 2004, 04:32 AM
Answer:

A. My machine is a desktop

B. I dont think my motherboard (Abit-IS7E) supports APM according to this spec http://www2.abit.com.tw/page/en/motherboard/motherboard_detail.php?pMODEL_NAME=IS7-E&fMTYPE=Socket%20478&pPRODINFO=Specifications

C. My kernel version: 2.4.22-1.2135.nptl

D. Uniprocessor

E. Did the command 'poweroff' shutdown your machine and power it off ? - No

F. Query: Are you able to re-compile your kernel? - Yes. There is no curent config file in my /usr/scr/linux-2.4. But /usr/scr/linux-2.4/configs have a few copies.

G. Query: have you tried booting a standard kernel and using the 'poweroff' command ? - No

mhelios
8th March 2004, 08:56 AM
My kernel version: 2.4.22-1.2135.nptl

I would strongly suggest you upgrade to the latest (2174) kernel. I don't remember an power management issues being specifically addresses, but it *may just fix it. :)

skoona
8th March 2004, 05:19 PM
I don't know the history of kernel patches and what was fixed when... However, I was on ...2166 when I resolved this problem; and a un-modified by me kernel with the boot options of "apm=off acpi=on" was the change.

It's worth a kernel upgrade !

Based on your other responses it looks like ACPI is the power management scheme we need to focus on. I will review your myfile later today when I get home. Also, no .config suggest that you haven't modified your kernel - if that true then the POWEROFF command should hanve worked!

I would leave the "apm=off acpi=on" parms in place. The message "ACPI: Interpreter enabled" will be a marker that we are close to fixing this problem or are done.

James,

delpi
8th March 2004, 05:33 PM
If that's the case, i'll think i'll update my kernel instead. ;)

Thanks for your time... :D

skoona
8th March 2004, 09:47 PM
Go for the most current. Today I run ...2174nptl.

Misc: During your next reboot check the bios setting for "PnP Aware OS: disabled" It should be disabled for Linux.

Let us know if the new kernel fixes it, and the kernel parms are required.

James,

delpi
9th March 2004, 10:20 AM
It works now...! New kernel and kernel parm is required. :)

Thanks again....

skoona
9th March 2004, 02:50 PM
Glad to hear it.


James,