Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 1999 17:37:47 -0700
From:      Warner Losh <imp@village.org>
To:        "Douglas K. Rand" <rand@aero.und.edu>
Cc:        mobile@FreeBSD.ORG, kientzle@acm.org
Subject:   Re: APM power-off code 
Message-ID:  <199901140037.RAA02498@harmony.village.org>
In-Reply-To: Your message of "Wed, 13 Jan 1999 16:25:12 CST." <13981.7496.997589.210295@dev-null.aero.und.edu> 
References:  <13981.7496.997589.210295@dev-null.aero.und.edu>  <369C0195.2DE70CB3@acm.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <13981.7496.997589.210295@dev-null.aero.und.edu> "Douglas K. Rand" writes:
: Has anybody ever seen the opposite of Tim's code? That is to the
: equivalent of a /sbin/halt when the power button is pressed? We have a 
: lab of systems and often people just hit the dang power button. It'd
: be nice that if they do such stupid things the system just does a
: fairly graceful (but quick) halt and poweroff.

Right now that would be kinda hard to do.  The reason it would be hard
is that you get a power down request and the kernel immediately tells
the bios to do its thing.  There is no way to migrate this into
userland as there is no apm daemon.  It wouldn't be too hard to catch
the user requested shutdown event and do a system halt, if we're not
already doing that.  Hmmm, looking at the APM events that the apm
driver understands it would appear that there isn't one for user
requested power off.

I have APM debugging enabled on my libretto.  When I pressed the power
button, the machine turned off.  No messages were reported.  And the
machine didn't dismount the disk....  There may be a bios setting that
will control this, but I've not seen it.

Warner

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901140037.RAA02498>