chris said:
I am stuck using a laptop for an embedded solution. I need the laptop to tun
off as soon as it looses AC power. I tried using the low power settings and
using the shutdown computer settings but I have found it is buggy. Is there a
setting to do this or maybe a script I can use?
I don't understand the "low power settings", because *low* power
settings are only applicable to use on *battery* . i.e. it's not low
*power*, but low power *capacity*.
If with "shutdown computer settings" you mean *AC* power related
settings, then there *are* no such settings (only battery power related
ones).
So I'll assume that with "shutdown", you actually mean *stand-by* or
*hibernate*.
The "shutdown" settings being 'buggy' probably mean that the *system*
is buggy. There are lots of situations where a system will not shutdown/
go-to-standby/hibernate, because some software activity is 'hanging'. So
you have to fix that *first*, i.e. by doing repeated manual and timed
shutdowns/standbys/hibernates until that works flawlessly *each* time.
As to the actual solution: You can not do a quick *shutdown*, but you
can force a timed *standby* after 1 minute. So *first* let the system
go to standby after 1 minute and *then* to *hibernate* after some
acceptable time. If you combine that with the low battery power options,
you can force the system to *shutdown* after the battery has drained
enough.