From owner-acpi-jp@jp.FreeBSD.org Sun Nov 10 06:12:55 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id gA9LCtG56367;
	Sun, 10 Nov 2002 06:12:55 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from axe-inc.co.jp (axegw.axe-inc.co.jp [61.199.217.66])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id gA9LCtm56309
	for <acpi-jp@jp.FreeBSD.org>; Sun, 10 Nov 2002 06:12:55 +0900 (JST)
	(envelope-from takawata@axe-inc.co.jp)
Received: from localhost.axe-inc.co.jp (localhost.axe-inc.co.jp [127.0.0.1])
	by axe-inc.co.jp (8.9.3+3.2W/3.7W) with SMTP id GAA10487;
	Sun, 10 Nov 2002 06:12:49 +0900 (JST)
Message-Id: <200211092112.GAA10487@axe-inc.co.jp>
X-Authentication-Warning: axegw.axe-inc.co.jp: localhost.axe-inc.co.jp [127.0.0.1] didn't use HELO protocol
To: acpi-jp@jp.FreeBSD.org, iedowse@maths.tcd.ie
Cc: current@freebsd.org, frode@nordahl.net
In-reply-to: Your message of "Sat, 09 Nov 2002 20:33:03 GMT."
             <200211092033.aa99235@salmon.maths.tcd.ie>
From: Takanori Watanabe <takawata@axe-inc.co.jp>
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Sun, 10 Nov 2002 06:12:49 +0900
X-Sequence: acpi-jp 1934
Subject: [acpi-jp 1934] Re: acpid implementation? 
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: takawata@axe-inc.co.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+021107

In message <200211092033.aa99235@salmon.maths.tcd.ie>, Ian Dowse wrote:
>I've been using the following far-from-ideal patch for a while now -
>it just supplies binary integers to /dev/acpi whenever the sleep
>state changes. The choice of encoding of data is stupid, and the
>acpiread() doesn't do blocking - I just use it in a script like

I mean just like it by the following sentence.

==
Next way is that make /dev/acpictl node that can open
exclusively and catch the power event by it, like apmd.
==

This way requires that the event reading proceess should 
be only one, so we need another device node to read event.


>
>	while :; do
>		sleep 5
>		acpidat="`wc -c < /dev/acpi`"
>		if [ "$acpidat" -gt 0 ]; then
>			killall -HUP moused
>		fi
>	done

The options

options         PSM_HOOKRESUME          #hook the system resume event, useful
                                        #for some laptops
options         PSM_RESETAFTERSUSPEND   #reset the device at the resume event

will resolve your problem without the patch.
It is the problem that there are no way to pass device flags
when an ISA-like devices are probed through PnP way.
If it exist, you will not required to rebuild kernel, but
insert two lines to /boot/device.hints .
