[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Laptop's power button made to suspend?



-- Hall Stevenson <hallstevenson@mindspring.com> wrote
(on Friday, 28 February 2003, 10:28 PM -0500):
> * Matthew Weier O'Phinney (matthew@weierophinney.net) [030228 21:15]:
> > -- Eduardo Duenez <e_duenez@hotmail.com> wrote
> > (on Friday, 28 February 2003, 06:48 PM -0500):
> > > Is it possible to configure my Woody laptop so if the power button is
> > > pressed (say, by mistake) then the laptop only goes into suspend mode rather
> > > than just turning immediately and forcefully?  Or at least to make it
> > > shutdown cleanly?  I've played with other people's laptops (running Windoze)
> > > and it works more or less as follows: just pressing the power button equals
> > > suspend, and holding it down for a second or two really equals shutting down
> > > forcefully.  Would be nice to emulate this behavior...
> > 
> > Usually this is a BIOS setting, and has little to do with the OS.
> 
> I don't think this is much different than people wanting to type
> "shutdown -h now" and the machine power *off*. It *can* be done with
> modern motherboards and I believe, ATX power supplies. 

Right, and the BIOS controls that behaviour. The apm module of the
kernel, for instance, communicates to the system BIOS, telling it to
power down when you do the 'shutdown -h now' command. 

(If you don't have the apm modules running, the kernel gives you a
message at the end "Power off" -- and you have to manually turn off the
machine.)

> If one simply tells the BIOS that when the power button is held down and
> it forces a poweroff, I'd hope you're running a journaling FS and didn't
> have processes running in the background.

Exactly -- which is why the OP was wondering if there'd be a way to get
around this. Another poster has mentioned ACPI; I'm not familiar with
how it works as I don't have any ACPI-enabled machines.

The info I gave is based on what I've seen on several laptops' (as well
as desktops') configuration items in the BIOS for power and suspend
buttons -- things such as not powering down unless the power button is
held in for 4 seconds, etc.

-- 
Matthew Weier O'Phinney
matthew@weierophinney.net



Reply to: