From owner-freebsd-current@FreeBSD.ORG Tue Aug 19 11:49:42 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B695A16A4BF for ; Tue, 19 Aug 2003 11:49:42 -0700 (PDT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1660C43FBF for ; Tue, 19 Aug 2003 11:49:42 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 14609 invoked from network); 19 Aug 2003 18:49:38 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 19 Aug 2003 18:49:38 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h7JIna9s090481; Tue, 19 Aug 2003 14:49:36 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3F4265FA.2070607@math.missouri.edu> Date: Tue, 19 Aug 2003 14:49:59 -0400 (EDT) From: John Baldwin To: Stephen Montgomery-Smith cc: freebsd-current@freebsd.org Subject: Re: ACPI on Tyan Motherboard X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2003 18:49:43 -0000 On 19-Aug-2003 Stephen Montgomery-Smith wrote: > John Baldwin wrote: >> On 19-Aug-2003 Stephen Montgomery-Smith wrote: >> >>>I am guessing that this 4 second delay is part of how FreeBSD wants it. If that >>>is the case, it shows that the power button is working as it should - it is the >>>power-down process that is not working right. >> >> >> No, the 4 second countdown thing is in the BIOS/hardware and is not OS >> dependent at all. If the box doesn't properly shut off when you hold >> the power button for 4 seconds, that is a hardware or BIOS bug and >> something FreeBSD has no control over. >> > > FreeBSD must have some control over this process, because in FreeBSD-4.8 and > RedHat 9.0 (which make no attempt to access ACPI), the power button immediately > powers down the computer. The same is also true if I start FreeBSD-current with > ACPI support switched off. (Windows 2000 also works fast, but the Windows 2000 > OS first cleanly shuts down the file system.) > > But now that people are mentioning this 4 second issue, I have now also noticed > that if I do "halt -p" under FreeBSD-current, the OS does all its shutdown > stuff, prints the message "Uptime xxxxx", and then waits about 4 seconds before > doing its powerdown attempt. Here's how it works: The BIOS/hardware monitor the power button. When an OS tells the BIOS that it is ACPI, then the BIOS doesn't do an instant turn off when the power button is pressed, but waits to do so until the power button has been held down for 4 seconds. If the power button after 4 seconds doesn't work, it's still a hardware problem. FreeBSD can not fix your hardware problem. When you press the power button with an ACPI OS running, the hardware sends an interrupt to the OS. The OS then shuts down and asks the BIOS (via ACPI) to power off the machine. If the machine doesn't physically turn off, it's because your BIOS is screwed up and didn't handle the power down command properly. The fact that the 4 second trick (which as above bypasses FreeBSD completely and has the BIOS call that power down method itself) produces the same broken results means that this bug is in your hardware. FreeBSD sleeps for a bit when it does a halt -p as a workaround for broken IDE disks which claim that writes have hit the media when they are still in the disks cache, so that is a separate issue. If you want more info on ACPI and how it works, feel free to head on over to www.acpi.info and read the spec for yourself. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/