linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ACPI "Soft-off" power button only rebooting system, not powering off
@ 2008-09-17  4:50 Andrew Paprocki
  2008-09-17 10:18 ` Pavel Machek
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Paprocki @ 2008-09-17  4:50 UTC (permalink / raw)
  To: LKML

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACPI "Soft-off" power button only rebooting system, not powering off
  2008-09-17  4:50 ACPI "Soft-off" power button only rebooting system, not powering off Andrew Paprocki
@ 2008-09-17 10:18 ` Pavel Machek
  2008-09-17 12:33   ` Andrew Paprocki
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2008-09-17 10:18 UTC (permalink / raw)
  To: Andrew Paprocki; +Cc: LKML

On Wed 2008-09-17 00:50:03, Andrew Paprocki wrote:
> 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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACPI "Soft-off" power button only rebooting system, not powering off
  2008-09-17 10:18 ` Pavel Machek
@ 2008-09-17 12:33   ` Andrew Paprocki
  2008-09-18 11:06     ` Pavel Machek
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Paprocki @ 2008-09-17 12:33 UTC (permalink / raw)
  To: Pavel Machek; +Cc: LKML

On Wed, Sep 17, 2008 at 6:18 AM, Pavel Machek <pavel@suse.cz> wrote:
> On Wed 2008-09-17 00:50:03, Andrew Paprocki wrote:
>> 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
>
> Well, so the BIOS is broken. 4second hold should power down the
> machine regardless of the operating system.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACPI "Soft-off" power button only rebooting system, not powering off
  2008-09-17 12:33   ` Andrew Paprocki
@ 2008-09-18 11:06     ` Pavel Machek
  2008-09-18 12:12       ` Stephen Clark
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2008-09-18 11:06 UTC (permalink / raw)
  To: Andrew Paprocki; +Cc: LKML

On Wed 2008-09-17 08:33:50, Andrew Paprocki wrote:
> On Wed, Sep 17, 2008 at 6:18 AM, Pavel Machek <pavel@suse.cz> wrote:
> > On Wed 2008-09-17 00:50:03, Andrew Paprocki wrote:
> >> 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
> >
> > Well, so the BIOS is broken. 4second hold should power down the
> > machine regardless of the operating system.
> 
> 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.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACPI "Soft-off" power button only rebooting system, not powering off
  2008-09-18 11:06     ` Pavel Machek
@ 2008-09-18 12:12       ` Stephen Clark
  2008-09-18 12:25         ` Simon Farnsworth
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Clark @ 2008-09-18 12:12 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Andrew Paprocki, LKML

Pavel Machek wrote:
> On Wed 2008-09-17 08:33:50, Andrew Paprocki wrote:
>> On Wed, Sep 17, 2008 at 6:18 AM, Pavel Machek <pavel@suse.cz> wrote:
>>> On Wed 2008-09-17 00:50:03, Andrew Paprocki wrote:
>>>> 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
>>> Well, so the BIOS is broken. 4second hold should power down the
>>> machine regardless of the operating system.
>> 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.
> 
> Try noapic/nolapic/nosmp etc... and ask your vendor to fix the bios ;-).
> 
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)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACPI "Soft-off" power button only rebooting system, not powering off
  2008-09-18 12:12       ` Stephen Clark
@ 2008-09-18 12:25         ` Simon Farnsworth
  2008-09-18 13:53           ` Bill Davidsen
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Farnsworth @ 2008-09-18 12:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Pavel Machek, Andrew Paprocki, LKML

Stephen Clark wrote:
> Pavel Machek wrote:
>> On Wed 2008-09-17 08:33:50, Andrew Paprocki wrote:
>>> On Wed, Sep 17, 2008 at 6:18 AM, Pavel Machek <pavel@suse.cz> wrote:
>>>> On Wed 2008-09-17 00:50:03, Andrew Paprocki wrote:
>>>>> 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
>>>> Well, so the BIOS is broken. 4second hold should power down the
>>>> machine regardless of the operating system.
>>> 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.
>>
>> Try noapic/nolapic/nosmp etc... and ask your vendor to fix the bios ;-).
>>
> Why do you say it is the BIOS when it shuts down properly from the GRUB
> prompt or from in WINXP?
> 
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACPI "Soft-off" power button only rebooting system, not powering off
  2008-09-18 12:25         ` Simon Farnsworth
@ 2008-09-18 13:53           ` Bill Davidsen
  0 siblings, 0 replies; 8+ messages in thread
From: Bill Davidsen @ 2008-09-18 13:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-kernel, Pavel Machek, Andrew Paprocki

Simon Farnsworth wrote:
> Stephen Clark wrote:
>> Pavel Machek wrote:
>>> On Wed 2008-09-17 08:33:50, Andrew Paprocki wrote:
>>>> On Wed, Sep 17, 2008 at 6:18 AM, Pavel Machek <pavel@suse.cz> wrote:
>>>>> On Wed 2008-09-17 00:50:03, Andrew Paprocki wrote:
>>>>>> 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
>>>>> Well, so the BIOS is broken. 4second hold should power down the
>>>>> machine regardless of the operating system.
>>>> 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.
>>> Try noapic/nolapic/nosmp etc... and ask your vendor to fix the bios ;-).
>>>
>> Why do you say it is the BIOS when it shuts down properly from the GRUB
>> prompt or from in WINXP?
>>
> 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.
> 
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 
RESET button.

> 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.

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACPI "Soft-off" power button only rebooting system, not powering    off
       [not found]         ` <bdrAs-5Xa-7@gated-at.bofh.it>
@ 2008-09-18 15:04           ` Bodo Eggert
  0 siblings, 0 replies; 8+ messages in thread
From: Bodo Eggert @ 2008-09-18 15:04 UTC (permalink / raw)
  To: Simon Farnsworth, linux-kernel, Pavel Machek, Andrew Paprocki, LKML

Simon Farnsworth <simon@farnz.org.uk> wrote:
>>>>> On Wed 2008-09-17 00:50:03, Andrew Paprocki wrote:

>>>>>> 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.

> 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.

Each MB I know takes about eight seconds of pressing the power button to
switch "off". Besides that, having a four-seconds-delay seems rather useless
if you'd switch from "0s -> shutdown, 4 s -> hard shutdown" to "0 s ->
suspend, 4 s -> hard shutdown". I never tried it myself*, but I'd expect
"0 s-> suspend, 4 s -> shutdown, 8 s -> hard shutdown".

If I happen to be correct here, you'd be looking at the wrong side of the
correct tree.


*)I'd fail, because I put in a relais, which would cut the power anyway.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-09-18 14:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-17  4:50 ACPI "Soft-off" power button only rebooting system, not powering off Andrew Paprocki
2008-09-17 10:18 ` Pavel Machek
2008-09-17 12:33   ` Andrew Paprocki
2008-09-18 11:06     ` Pavel Machek
2008-09-18 12:12       ` Stephen Clark
2008-09-18 12:25         ` Simon Farnsworth
2008-09-18 13:53           ` Bill Davidsen
     [not found] <bcXj3-fH-1@gated-at.bofh.it>
     [not found] ` <bd3HN-9P-11@gated-at.bofh.it>
     [not found]   ` <bd4ul-1dy-43@gated-at.bofh.it>
     [not found]     ` <bdpS9-3CD-19@gated-at.bofh.it>
     [not found]       ` <bdqEr-4Iy-19@gated-at.bofh.it>
     [not found]         ` <bdrAs-5Xa-7@gated-at.bofh.it>
2008-09-18 15:04           ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).