Power switch not working

Al Plant noc at hdk5.net
Sun Apr 7 20:44:31 UTC 2013


Polytropon wrote:
> On Sat, 06 Apr 2013 20:51:58 -0700, Ronald F. Guilmette wrote:
>> I'll be attending to those thing, but for now I'd just like to know
>> why, when I do "shutdown -h now" and then let the system come down to
>> the point where it says "Press any key to reboot" pressing the power
>> switch at that point no longer causes the system to actually power down.
>> If fact it does nothing.
> 
> This is to be expected. When you press the power switch, a
> signal will be sent to the OS which causes a "custom action",
> which in most cases is to shutdown the system and then power
> it off. This is what "shutdown -p now" does.
> 
> When you use "shutdown -h now" the system will be shut down.
> When you _then_ press the button, there's nothing left to
> act. Your only choice is to hold the button for about 4 seconds
> which will cause a "hardware switch-off".
> 
> Just a question: Why don't you simply press the button from
> out of a "safe" system state (e. g. when you've logged out)?
> It will cause the "ACPI message system" to tell the OS to
> shut down and power off - which you seem to intend.
> 
> For example, I've programmed Ctrl+Alt+Moon on my Sun USB keyboard
> to exactly perform that action. But I can press the button
> at any time to have the same operation performed.
> 
> 
> 
>> I'm guessing that this relates to some BIOS setting that I need to diddle,
>> but which one?  Something to do with ACPI?
> 
> Usually the BIOS settings are okay for the normal case: to
> send the "shutdown + poweroff signal". However, you can select
> the other variant, "immediately power off" ("forced power off")
> in the CMOS setup. Pressing the button, even with a running OS,
> will then switch the machine off, no matter in which state it is.
> 
> 
> 
>> I'm ignorant about this stuff.  Guidance would be appreciated.  Thanks.
> 
> In the past, this kind of operation has been performed via APM.
> When APM has been fully supported, it was abolished and replaced
> by ACPI. At the time ACPI is fully working, standard-compliant
> and supported among all the many vendors, it will be obsoleted
> by something different, probably UEFI, and the fun restarts. :-)
> 
> 
> 
>> P.S.   I *did* hook up the case power switch correctly.  It does do the
>> Right Thing when I'm just in the BIOS.
> 
> This is also to be expected: In the BIOS, and _any_ stage prior
> to loading the OS, there will be only one thing the button can
> do: power the system off immediately.
> 
> 
> 
>> But running FreeBSD seems to
>> cause it (the case power switch) to be ignored.
> 
> Check the BIOS settings, the switch should be programmed to
> something like "soft power-off", it's "the other thing" to
> whatever caption has been chosen for "immediately power
> off" (forced by the 4 second press).
> 
> When in FreeBSD, pressing the button should shutdown the
> system and then power it off. Allow this process few seconds
> to work. You can easily examine if it's working properly
> when you have a look at the system messages on ttyv0.
> 
> I cannot remember the correct messages because I'm too lazy
> to press this switch when Ctrl+Alt+Moon is so much more
> comfortable - thank you, Sun Microsystems. :-)
> 
> If this does _not_ happen, the BIOS setting makes the button
> send the wrong "message" (maybe "sleep" or some other strange
> ACPI stuff).
> 
> 
> 
##########


Aloha .. Poly and Ron,

FYI:

I have a box with FreeBSD 10.* on it for testing networks and gateways. 
It fails to shutdown by pressing the power button after the 4 seconds 
the screen fills with junk codes and the only way to turn the unit off 
is by the power switch on the power supply or pulling the plug. With 
FreeBSD 8 or below on this box you could shutdown from the 4 second 
power switch function as expected.

I wouldn't use this box in a production setting.

~Al Plant - Honolulu, Hawaii -  Phone:  808-284-2740
   + http://hawaiidakine.com + http://freebsdinfo.org +
   + http://aloha50.net   - Supporting - FreeBSD  7.2 - 8.0 - 9* +
   < email: noc at hdk5.net >
"All that's really worth doing is what we do for others."- Lewis Carrol



More information about the freebsd-questions mailing list