From owner-freebsd-questions@FreeBSD.ORG Sun Apr 7 04:05:03 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CC3D72A5 for ; Sun, 7 Apr 2013 04:05:03 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 7B6D71BD for ; Sun, 7 Apr 2013 04:05:03 +0000 (UTC) Received: from r56.edvax.de (port-92-195-80-247.dynamic.qsc.de [92.195.80.247]) by mx01.qsc.de (Postfix) with ESMTP id 799FC3DC5F; Sun, 7 Apr 2013 06:04:59 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r3745729002807; Sun, 7 Apr 2013 06:05:07 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 7 Apr 2013 06:05:07 +0200 From: Polytropon To: "Ronald F. Guilmette" Subject: Re: Power switch not working Message-Id: <20130407060507.76fd8bd1.freebsd@edvax.de> In-Reply-To: <2317.1365306718@server1.tristatelogic.com> References: <2317.1365306718@server1.tristatelogic.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 04:05:03 -0000 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). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...