NetBSD Problem Report #49024

From makoto@gw.ki.nu  Mon Jul 21 02:33:36 2014
Return-Path: <makoto@gw.ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9291EA6562
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 21 Jul 2014 02:33:36 +0000 (UTC)
Message-Id: <201407210226.s6L2QbL5000736@gw.ki.nu>
Date: Mon, 21 Jul 2014 11:26:37 +0900 (JST)
From: makoto@ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@NetBSD.org
Subject: Powerd invokes lid_switch by acpilid only ONCE after boot
X-Send-Pr-Version: 3.95

>Number:         49024
>Category:       kern
>Synopsis:       Powerd invokes lid_switch by acpilid only ONCE after boot
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 21 02:35:00 +0000 2014
>Closed-Date:    Thu Jan 01 20:51:36 +0000 2015
>Last-Modified:  Thu Jan 01 20:51:36 +0000 2015
>Originator:     Makoto Fujiwara
>Release:        NetBSD 6.99.47
>Organization:
KINU Corporation

>Environment:


System: NetBSD gw.ki.nu 6.99.47 NetBSD 6.99.47 (GENERIC.201407200700Z) #0: Sun Jul 20 09:09:34 UTC 2014 builds@b43.netbsd.org:/home/builds/ab/HEAD/i386/201407200700Z-obj/home/source/ab/HEAD/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Powerd invokes lid_switch by acpilid only ONCE after boot (Panasonic Lets' Note R4)
>How-To-Repeat:
(1) Have note-PC cable of hw.acpi.sleep.states = S3, say,
  sysctl hw.acpi.sleep.states           returns
  hw.acpi.sleep.states = S0 S3 S4 S5
(2) Install NetBSD 6.x
(3) Boot the PC and make sure following command makes PC to sleep.
  sysctl -w hw.acpi.sleep.states= 3
(4) Open lid may wake up the PC.
(5) Have /etc/powerd/scripts/lid_switch setup as explained in
   man 4 acpilid
  --------
   (Taking care network device)
  # Suspend.
  #
  if /sbin/sysctl hw.acpi.sleep.state >/dev/null 2>&1; then
     /sbin/sysctl -w hw.acpi.sleep.state=3
  fi

  (Taking care network device)
  ----------
  (and have powerd is enabled in /etc/rc.conf)

(6) check if following works
  (a) closing lid to sleep
  (b) opening lid to wake up
  (c) 'sysctl -w hw.acpi.sleep.states= 3' makes sleep

(6c) always work, but (6a) only works once after boot.
/etc/rc.d/powerd restart does not reset this situation.
Currently reboot is required for (6a) to work.

I have above problem on Panasonic Lets' Note R4 with NetBSD
6.1.3 and 6.99.47 (both i386)
dmesg of 6.99.47 is at
http://www.nycbug.org/index.cgi?action=dmesgd&do=view&id=2552

Thanks a lot,

Re:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46870
>Fix:
unknown

>Release-Note:

>Audit-Trail:
From: fukumoto@imasy.or.jp
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/49024
Date: Thu, 24 Jul 2014 22:51:23 +0900 (JST)

 Isn't it similar to PR/46546 ?  Does it change if you add "unset
 _rc_postprocessor_fd" in lid_switch script and try again?


 					FUKUMOTO Atsushi
 					fukumoto@imasy.or.jp

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49024: Powerd invokes lid_switch by acpilid only ONCE after
 boot
Date: Mon, 29 Dec 2014 22:50:52 +0000

 On Mon, Jul 21, 2014 at 02:35:00AM +0000, makoto@ki.nu wrote:
  > (6) check if following works
  >   (a) closing lid to sleep
  >   (b) opening lid to wake up
  >   (c) 'sysctl -w hw.acpi.sleep.states= 3' makes sleep
  > 
  > (6c) always work, but (6a) only works once after boot.
  > /etc/rc.d/powerd restart does not reset this situation.
  > Currently reboot is required for (6a) to work.

 Is this the same as PR 42051? (which contains some analysis/debugging)

 -- 
 David A. Holland
 dholland@netbsd.org

From: Makoto Fujiwara <makoto@ki.nu>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49024: Powerd invokes lid_switch by acpilid only ONCE after boot
Date: Tue, 30 Dec 2014 10:23:31 +0900

 >  Is this the same as PR 42051? (which contains some analysis/debugging)
 Yes, exactly, sorry for not finding this PR
 Thanks a lot,
 ---
 Makoto Fujiwara, 
 Chiba, Japan, Narita Airport and Disneyland prefecture.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 01 Jan 2015 20:51:36 +0000
State-Changed-Why:
Duplicate of 42051.

no worries about not finding it, I only noticed by accident.


>Unformatted:
 Powerd invokes lid_switch by acpilid only ONCE after boot (Panasonic Lets' Note R4)

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.