From owner-freebsd-current  Mon Feb 15 09:06:05 1999
Return-Path: <owner-freebsd-current@FreeBSD.ORG>
Received: (from majordom@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id JAA01104
          for freebsd-current-outgoing; Mon, 15 Feb 1999 09:06:05 -0800 (PST)
          (envelope-from owner-freebsd-current@FreeBSD.ORG)
Received: from uni-sb.de (uni-sb.de [134.96.252.33])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA01051
          for <current@FreeBSD.ORG>; Mon, 15 Feb 1999 09:06:01 -0800 (PST)
          (envelope-from rock@wurzelausix.CS.Uni-SB.DE)
Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31])
	by uni-sb.de (8.9.3/1999020800) with ESMTP id SAA29177;
	Mon, 15 Feb 1999 18:05:57 +0100 (CET)
Received: from wurzelausix.cs.uni-sb.de (quadratix.cs.uni-sb.de [134.96.222.2])
	by cs.uni-sb.de (8.9.3/1999020800) with ESMTP id SAA08264;
	Mon, 15 Feb 1999 18:05:56 +0100 (CET)
X-Authentication-Warning: mail.cs.uni-sb.de: Host quadratix.cs.uni-sb.de [134.96.222.2] claimed to be wurzelausix.cs.uni-sb.de
Received: (from rock@localhost)
	by wurzelausix.cs.uni-sb.de (8.9.1/wjp/19980821) id SAA13182;
	Mon, 15 Feb 1999 18:05:51 +0100 (CET)
Date: Mon, 15 Feb 1999 18:05:51 +0100 (CET)
From: "D. Rock" <rock@wurzelausix.CS.Uni-SB.DE>
Message-Id: <199902151705.SAA13182@wurzelausix.cs.uni-sb.de>
To: garbanzo@hooked.net, jose@we.lc.ehu.es
Cc: current@FreeBSD.ORG
Subject: Re: How to power off an ATX power supply machine on shutdown ?
Sender: owner-freebsd-current@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG

> > > Is a delay needed between the final sync's and the actual power off?
> > 
> > Apparently so.  There is/was a recently added sysctl for this purpose.
> > Poke around in the archives.
> > 
> 
> Was that sysctl added to the -STABLE branch? I am running 3.1-BETA
> and I cannot find it.
No, they were added after the split and weren't backported to the 3.x branch.

But if you are impatient, you could just grab a copy of
sys/kern/kern_shutdown.c from a 4.0 branch and copy it to your tree.
The added sysctl is for now the only difference in this file.

Then you can specify somewhere in your rc files
sysctl -w kern.shutdown.poweroff_delay = x
with x measured in ms.

I have only seen one machine so far which suffers this problem of powering
off the machine too fast. On all other machines I know of either the mainboard
or the power supply (don't know which) have a small delay before powering off
the machine, which seems to be long enough for the drives to flush their
buffers.
On this particular machine, I set the delay to 1.5 seconds, and I never got
unclean filesystems again.

Daniel

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message