DragonFly users List (threaded) for 2006-11
DragonFly BSD
DragonFly users List (threaded) for 2006-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ACPI: getting front-panel power button to cause shutdown


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Tue, 28 Nov 2006 17:59:41 +0900

On Sat, Nov 25, 2006 at 08:04:26PM +0000, David Murray wrote:
> I'm trying to get the front-panel power button to shut the system down 
> (cleanly).  Currently when I press it, nothing discernible happens (no 
> console messages, nothing logged, and certainly no shutdown).

Some of machines around me have this problem too, but I have never cared
to investigate :)

>  shutdown -p now, and
>  acpiconf -s 5
> 
> both work just fine, which makes me think nothing's fundamentally broken.

[looks ok to me too]

> Can anyone suggest what I might do to diagnose what's going on?  I'll 
> happily provide more info, if it helps.

Pressing the power button delivers an interrupt to the acpi driver,
and it triggers an event handler which winds up to call a function
acpi_SetSleepState(), so the first step is to see if an interrupt is
delivered to the acpi driver.
  $ vmstat -i |grep acpi
  (press power button)
  $ vmstat -i |grep acpi

The number doesn't change on machines with non-working power button here,
so I need to find why it's not.
But if it does on your machine, try rebuilding the driver with debugging
support and see what's happening:
  % sh
  $ export MAKEOBJDIRPREFIX=$HOME/obj ACPI_DEBUG=yes
  $ cd /sys/dev/acpica5
  $ make obj && make depend
  $ su
  (you're asked the root password here)
  # make install
  # echo 'debug.acpi.layer="ACPI_EVENTS ACPI_BUTTON"'>>/boot/loader.conf
  # echo 'debug.acpi.level="ACPI_LV_FUNCTIONS ACPI_LV_INFO"'>>/boot/loader.conf
  # reboot

Cheers.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]