NetBSD Problem Report #40751

From www@NetBSD.org  Tue Feb 24 23:13:06 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7E89863C1C2
	for <gnats-bugs@gnats.netbsd.org>; Tue, 24 Feb 2009 23:13:06 +0000 (UTC)
Message-Id: <20090224231306.55EEA63C1C1@www.NetBSD.org>
Date: Tue, 24 Feb 2009 23:13:06 +0000 (UTC)
From: ad@netbsd.org
Reply-To: ad@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: power button does not work after halt
X-Send-Pr-Version: www-1.0

>Number:         40751
>Category:       port-i386
>Synopsis:       power button does not work after halt
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 24 23:15:01 +0000 2009
>Closed-Date:    Tue Feb 24 23:22:15 +0000 2009
>Last-Modified:  Thu Feb 26 14:00:11 +0000 2009
>Originator:     Andrew Doran
>Release:        5.0_RC2
>Organization:
The NetBSD Project
>Environment:
i386 smp
>Description:
as per summary.

>How-To-Repeat:
type halt.
decide you want to power it off after all.
press power button, it doesn't work.
>Fix:
?

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: pooka@NetBSD.org
State-Changed-When: Wed, 25 Feb 2009 01:22:15 +0200
State-Changed-Why:
duplicate of kern/37506


From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: port-i386/40751: power button does not work after halt
Date: Tue, 24 Feb 2009 18:24:02 -0500

 This is a multi-part message in MIME format.
 --------------050807020304030405040100
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit

 ad@netbsd.org wrote:
 >> How-To-Repeat:
 > type halt.
 > decide you want to power it off after all.
 > press power button, it doesn't work.

 Does the attached patch help?

 --------------050807020304030405040100
 Content-Type: text/plain;
  name="pr40751.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="pr40751.patch"

 Index: amd64/amd64/machdep.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/amd64/amd64/machdep.c,v
 retrieving revision 1.127
 diff -u -p -r1.127 machdep.c
 --- amd64/amd64/machdep.c	17 Feb 2009 01:39:25 -0000	1.127
 +++ amd64/amd64/machdep.c	24 Feb 2009 23:23:28 -0000
 @@ -714,6 +714,10 @@ haltsys:

  	x86_broadcast_ipi(X86_IPI_HALT);

 +#if NACPI > 0
 +	AcpiDisable();
 +#endif
 +
  	if (howto & RB_HALT) {
  		printf("\n");
  		printf("The operating system has halted.\n");
 Index: i386/i386/machdep.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/i386/i386/machdep.c,v
 retrieving revision 1.661
 diff -u -p -r1.661 machdep.c
 --- i386/i386/machdep.c	13 Feb 2009 22:41:02 -0000	1.661
 +++ i386/i386/machdep.c	24 Feb 2009 23:23:28 -0000
 @@ -944,6 +944,10 @@ haltsys:
  #endif
  	}

 +#if NACPI > 0
 +	AcpiDisable();
 +#endif
 +
  	if (howto & RB_HALT) {
  		printf("\n");
  		printf("The operating system has halted.\n");

 --------------050807020304030405040100--

From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org, port-i386-maintainer@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-i386/40751: power button does not work after halt 
Date: Wed, 25 Feb 2009 17:25:15 +0100

 jmcneill@invisible.ca said:
 > Does the attached patch help? 

 While pressing the power button for 4 seconds or so is OK for me:
 Your patch works as intended on my box, but I'd limit its effect
 to the RB_HALT case because it is just a possible point of failure
 and might hang an unattended reboot if something goes wrong.

 best regards
 Matthias




 -------------------------------------------------------------------
 -------------------------------------------------------------------
 Forschungszentrum Juelich GmbH
 52425 Juelich

 Sitz der Gesellschaft: Juelich
 Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
 Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
 Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
 Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
 Dr. Sebastian M. Schmidt
 -------------------------------------------------------------------
 -------------------------------------------------------------------

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: M.Drochner@fz-juelich.de
Cc: gnats-bugs@NetBSD.org, port-i386-maintainer@NetBSD.org, 
 gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-i386/40751: power button does not work after halt
Date: Wed, 25 Feb 2009 11:29:38 -0500

 Matthias Drochner wrote:
 > jmcneill@invisible.ca said:
 >> Does the attached patch help? 
 > 
 > While pressing the power button for 4 seconds or so is OK for me:
 > Your patch works as intended on my box, but I'd limit its effect
 > to the RB_HALT case because it is just a possible point of failure
 > and might hang an unattended reboot if something goes wrong.

 I wasn't sure what to do there, do we want the power button to behave 
 differently if reboot fails? What's the likelyhood of reboot actually 
 failing at that stage?

From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org, port-i386-maintainer@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-i386/40751: power button does not work after halt 
Date: Wed, 25 Feb 2009 17:43:20 +0100

 jmcneill@invisible.ca said:
 > do we want the power button to behave  differently if reboot fails?
 > What's the likelyhood of reboot actually  failing at that stage?

 If the machine doesn't reset we have a more serious bug,
 and the box is in a state which needs manual help anyway,
 so I wouldn't care about that case.

 best regards
 Matthias




 -------------------------------------------------------------------
 -------------------------------------------------------------------
 Forschungszentrum Juelich GmbH
 52425 Juelich

 Sitz der Gesellschaft: Juelich
 Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
 Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
 Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
 Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
 Dr. Sebastian M. Schmidt
 -------------------------------------------------------------------
 -------------------------------------------------------------------

From: "Jared D. McNeill" <jmcneill@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40751 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.

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