Re: ACPI "Soft-off" power button only rebooting system, not powering off

Previous thread: [PATCH -mm] memcg: fix handling of shmem migration by Daisuke Nishimura on Tuesday, September 16, 2008 - 9:31 pm. (12 messages)

Next thread: how to change priority of telnet session by gshan on Tuesday, September 16, 2008 - 8:40 pm. (3 messages)
From: Andrew Paprocki
Date: Tuesday, September 16, 2008 - 9:50 pm

I have an AMD / Award BIOS based system which does not properly shut
off when I hold down the power button for 4 seconds. The BIOS is
configured to have "Soft-off" set to "Delay for 4 seconds" which is
supposed to power the machine off if the button is held that long.

I first thought this could be a BIOS bug, but this *only* appears to
happen while Linux is running. If the computer is running WinXP, it
works fine. Also, if I hold down the button for 4 seconds while the
BIOS is in POST, it also works fine. If the kernel has booted, even if
the kernel is not running anymore due to a `halt`, holding the button
down merely reboots the PC after 4 seconds.

Can anyone offer a place to start poking around to see why this only
happens when Linux is running? Would this have to do with the ACPI
code itself? The kernel version does not seem to matter. I first
noticed this on stock Debian 2.6.18-4, and I just reproduced it right
now using 2.6.26.5.

Thanks,
-Andrew
--

From: Pavel Machek
Date: Wednesday, September 17, 2008 - 3:18 am

Well, so the BIOS is broken. 4second hold should power down the
machine regardless of the operating system.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

From: Andrew Paprocki
Date: Wednesday, September 17, 2008 - 5:33 am

Yes, I agree.. I just find it strange that it works on the BIOS screen
as well as in GRUB, but as soon as Linux boots, it no longer works.
Since it works under WinXP, there must be some way to get it to work
properly from the OS side even it if means working around the bug
somehow.

-Andrew
--

From: Pavel Machek
Date: Thursday, September 18, 2008 - 4:06 am

Try noapic/nolapic/nosmp etc... and ask your vendor to fix the bios ;-).

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

From: Stephen Clark
Date: Thursday, September 18, 2008 - 5:12 am

Why do you say it is the BIOS when it shuts down properly from the GRUB prompt 
or from in WINXP?

-- 

"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty
decreases."  (Thomas Jefferson)


--

From: Simon Farnsworth
Date: Thursday, September 18, 2008 - 5:25 am

Because it's only the BIOS that can cause this behaviour.

When you push the power button, the BIOS is invoked. If you release
within 4 seconds, the BIOS sends an ACPI event to the running OS,
telling it that the power button has been pushed.

If you hold it down for 4 or more seconds, the BIOS is supposed to shut
the machine down without the OS knowing what's happening (no ACPI
events, just a loss of power). From your problem description, the BIOS
is noticing *something* about the way Linux sets things up, and
*choosing* to reboot instead of cutting the power.

GRUB doesn't touch hardware without BIOS help, so is unlikely to change
the system state in a way that tickles this BIOS bug; similarly, BIOSes
are tested against current Windows versions by vendors, so they'll have
hacked it around until it worked there.
-- 
Hope this helps,

Simon Farnsworth

--

From: Bill Davidsen
Date: Thursday, September 18, 2008 - 6:53 am

Such as setting a bit to reboot instead of powering off? There are lots of bits 
down in low memory which one BIOS or another use, so it may be functioning as 
intended. You might look for an additional option to reboot instead of power 
down, a feature I think may have been intended for systems without a hardware 

This certainly may be a bug (ie. unintended behavior), but it may be a feature 
which Linux is enabling unintentionally. Having to use the power button on a 
Linux system would worry me more than having to press the button a second time 
during reboot.

-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

--

Previous thread: [PATCH -mm] memcg: fix handling of shmem migration by Daisuke Nishimura on Tuesday, September 16, 2008 - 9:31 pm. (12 messages)

Next thread: how to change priority of telnet session by gshan on Tuesday, September 16, 2008 - 8:40 pm. (3 messages)