NetBSD Problem Report #37506

From martin@duskware.de  Sun Dec  9 12:57:21 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 44FE063BAF4
	for <gnats-bugs@gnats.netbsd.org>; Sun,  9 Dec 2007 12:57:21 +0000 (UTC)
Message-Id: <20071209124703.77E9763B946@narn.NetBSD.org>
Date: Sun,  9 Dec 2007 12:47:03 +0000 (UTC)
From: grid@bmk.com.au
Reply-To: grid@bmk.com.au
To: netbsd-bugs-owner@NetBSD.org
Subject: Have to hold power button for 5 seconds to turn off Laptop after "halt" command.
X-Send-Pr-Version: www-1.0

>Number:         37506
>Category:       kern
>Synopsis:       Have to hold power button for 5 seconds to turn off Laptop after "halt" command.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jmcneill
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 09 13:00:00 +0000 2007
>Closed-Date:    Mon Mar 02 20:46:42 +0000 2009
>Last-Modified:  Mon Mar 02 20:46:42 +0000 2009
>Originator:     Brendan Kosowski
>Release:        4.0_RC5 i386
>Organization:
B.M.K. Industries
>Environment:
NetBSD  4.0_RC5 NetBSD 4.0_RC5 (GENERIC_LAPTOP) #0: Wed Nov 28 13:56:07 PST 2007  builds@wb34:/home/builds/ab/netbsd-4-0-RC5/i386/200711280522Z-obj/home/builds/ab/netbsd-4-0-RC5/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
>Description:
Laptop Model: HP Compaq nx6310 (RE952PA)

Have to hold power button for 5 seconds to turn off Laptop after "halt" command.
>How-To-Repeat:
1.) # halt
2.) Wait for "The operating system has halted"
3.) Press power button (no response)
4.) Press and hold power button for 5 seconds (turns off)

>Fix:
> boot -c
uc> disable acpi
uc> disable azalia (NOTE: azalia causes Laptop to freeze with no acpi)
uc> exit

>Release-Note:

>Audit-Trail:
From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/37506: Have to hold power button for 5 seconds to turn off
 Laptop after "halt" command.
Date: Sun, 9 Dec 2007 09:05:34 -0500 (EST)

 On Sun, 9 Dec 2007, grid@bmk.com.au wrote:
 >> How-To-Repeat:
 > 1.) # halt
 > 2.) Wait for "The operating system has halted"
 > 3.) Press power button (no response)
 > 4.) Press and hold power button for 5 seconds (turns off)

 This is expected behaviour. Have you tried 'halt -p'? From the man page:

   -p      Attempt to powerdown the system.  If the powerdown fails, or the
           system does not support software powerdown, the system will halt.
           This option is only valid for halt.

 Cheers,
 Jared

From: Antti Kantee <pooka@cs.hut.fi>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/37506: Have to hold power button for 5 seconds to turn off Laptop after "halt" command.
Date: Sun, 9 Dec 2007 17:45:20 +0200

 On Sun Dec 09 2007 at 09:05:34 -0500, Jared D. McNeill wrote:
 > On Sun, 9 Dec 2007, grid@bmk.com.au wrote:
 > >>How-To-Repeat:
 > >1.) # halt
 > >2.) Wait for "The operating system has halted"
 > >3.) Press power button (no response)
 > >4.) Press and hold power button for 5 seconds (turns off)
 > 
 > This is expected behaviour.

 No, it's not.  The submitter clearly stated you don't get the delay with
 a non-acpi kernel.

 -- 
 Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
 http://www.iki.fi/pooka/                          http://www.NetBSD.org/
     "la qualité la plus indispensable du cuisinier est l'exactitude"

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Antti Kantee <pooka@cs.hut.fi>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/37506: Have to hold power button for 5 seconds to turn off
 Laptop after "halt" command.
Date: Sun, 9 Dec 2007 10:50:29 -0500 (EST)

 On Sun, 9 Dec 2007, Antti Kantee wrote:
 > No, it's not.  The submitter clearly stated you don't get the delay with
 > a non-acpi kernel.

 And that's normal. As soon as we take control over the soft power button 
 (by entering ACPI mode), this is how things work. A short press generates 
 an interrupt, and a long press bypasses this mechanism and powers off the 
 machine directly. Since the kernel is already halted at this point, 
 we can't really handle it.

 If the submitter didn't first run 'halt', he could have pressed the power 
 button and the system would have gracefully powered off on its own.

 Cheers,
 Jared

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Antti Kantee <pooka@cs.hut.fi>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/37506: Have to hold power button for 5 seconds to turn off
 Laptop after "halt" command.
Date: Sun, 9 Dec 2007 10:58:05 -0500 (EST)

 On Sun, 9 Dec 2007, Antti Kantee wrote:
 > Then don't call it expected behaviour, call it an expected bug.

 The hardware is designed to work this way.

 Cheers,
 Jared

From: Antti Kantee <pooka@cs.hut.fi>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/37506: Have to hold power button for 5 seconds to turn off Laptop after "halt" command.
Date: Sun, 9 Dec 2007 17:55:43 +0200

 On Sun Dec 09 2007 at 10:50:29 -0500, Jared D. McNeill wrote:
 > On Sun, 9 Dec 2007, Antti Kantee wrote:
 > >No, it's not.  The submitter clearly stated you don't get the delay with
 > >a non-acpi kernel.
 > 
 > And that's normal. As soon as we take control over the soft power button 
 > (by entering ACPI mode), this is how things work. A short press generates 
 > an interrupt, and a long press bypasses this mechanism and powers off the 
 > machine directly. Since the kernel is already halted at this point, 
 > we can't really handle it.

 Then don't call it expected behaviour, call it an expected bug.
 I certainly don't expect it and frankly it annoys me if I accidentally
 mistype halt without -p and am not quick enough to tap the power button
 before the kernel halts.

 -- 
 Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
 http://www.iki.fi/pooka/                          http://www.NetBSD.org/
     "la qualité la plus indispensable du cuisinier est l'exactitude"

From: jnemeth@victoria.tc.ca (John Nemeth)
To: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org, grid@bmk.com.au
Cc: 
Subject: Re: kern/37506: Have to hold power button for 5 seconds to turn off Laptop after "halt" command.
Date: Sun, 9 Dec 2007 12:05:51 -0800

 On Mar 27,  4:07am, "Jared D. McNeill" wrote:
 } 
 } From: "Jared D. McNeill" <jmcneill@invisible.ca>
 } To: Antti Kantee <pooka@cs.hut.fi>
 } Subject: Re: kern/37506: Have to hold power button for 5 seconds to turn off
 }  Laptop after "halt" command.
 } Date: Sun, 9 Dec 2007 10:58:05 -0500 (EST)
 } 
 }  On Sun, 9 Dec 2007, Antti Kantee wrote:
 }  > Then don't call it expected behaviour, call it an expected bug.
 }  
 }  The hardware is designed to work this way.

      Personally, I don't really care about this issue, but would it be
 possible to "shutdown" ACPI when the system is halted or tell the BIOS
 that we no longer wish to handle the power button?

 }-- End of excerpt from "Jared D. McNeill"

Responsible-Changed-From-To: kern-bug-people->jmcneill
Responsible-Changed-By: jmcneill@NetBSD.org
Responsible-Changed-When: Thu, 26 Feb 2009 13:59:05 +0000
Responsible-Changed-Why:
I checked in a fix.


State-Changed-From-To: open->pending-pullups
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Thu, 26 Feb 2009 13:59:05 +0000
State-Changed-Why:
[pullup-5 #526] Transfer the system from ACPI to Legacy mode if RB_HALT is set


From: "Jared D. McNeill" <jmcneill@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/37506 CVS commit: src/sys/arch
Date: Thu, 26 Feb 2009 13:56:46 +0000 (UTC)

 Module Name:	src
 Committed By:	jmcneill
 Date:		Thu Feb 26 13:56:46 UTC 2009

 Modified Files:
 	src/sys/arch/amd64/amd64: machdep.c
 	src/sys/arch/i386/i386: machdep.c

 Log Message:
 PR# port-i386/40751: power button does not work after halt
 PR# kern/37506: Have to hold power button for 5 seconds to turn off Laptop
     after "halt" command.

 Transfer the system from ACPI to Legacy mode if RB_HALT is set.


 To generate a diff of this commit:
 cvs rdiff -r1.127 -r1.128 src/sys/arch/amd64/amd64/machdep.c
 cvs rdiff -r1.662 -r1.663 src/sys/arch/i386/i386/machdep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Mon, 02 Mar 2009 20:46:42 +0000
State-Changed-Why:
Fixed in 5.0.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.